xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xb2() {
  Assert_real((isspace(178) == 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_isspace.c",
              895, ("isspace should be 0 for 0xb2"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xb2>:
push   %rax
mov    $0xb2,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37f,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb2\00"
define void @t_isspace_0xb2() {
%1 = call i64 @isspace(i32 178)
%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 895, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb2\00"
define void @t_isspace_0xb2() {
%1 = tail call i64 @isspace(i32 178)
%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 895, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ CRYPTO_EX_DATA;

/* Variables and functions */
void dummy_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl,
                void *argp) {}


x86 assembly (clang, -O0):
<dummy_free>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dummy_free(i8* %0, i8* %1, i32* %2, i32 %3, i64 %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i64
%12 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i64 %4, i64* %11
store i8* %5, i8** %12
ret void
}

LLVM IR (-O2):
define void @dummy_free(i8* nocapture %0, i8* nocapture %1, i32* nocapture %2, i32 %3, i64 %4, i8* nocapture %5) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Location_LOC_registerListener();
void Tracking_LOC_registerListener() { Location_LOC_registerListener(); }


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

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

LLVM IR (-O0):
define void @Tracking_LOC_registerListener() {
%1 = call i32 (...) @Location_LOC_registerListener()
ret void
}

LLVM IR (-O2):
define void @Tracking_LOC_registerListener() {
%1 = tail call i32 (...) @Location_LOC_registerListener()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int hammingWeight(uint32_t n) {
  int count = 0;
  while (n != 0) {
    if (n & 0x1 == 1)
      count = count++;
    n = n >> 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<hammingWeight>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1143 <hammingWeight+0x43>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1135 <hammingWeight+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <hammingWeight+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hammingWeight(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(unsigned int, int /*<<< orphan*/ *);
void write32u(FILE *f, unsigned int i) {
  putc(i, f);
  putc(i >> 8, f);
  putc(i >> 16, f);
  putc(i >> 24, f);
}


x86 assembly (clang, -O0):
<write32u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
shr    $0x8,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
shr    $0x10,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
shr    $0x18,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write32u>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %ebx,%edi
shr    $0x8,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %ebx,%edi
shr    $0x10,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
shr    $0x18,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @write32u(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 = load i32*, i32** %3
%7 = call i32 @putc(i32 %5, i32* %6)
%8 = load i32, i32* %4
%9 = lshr i32 %8, 8
%10 = load i32*, i32** %3
%11 = call i32 @putc(i32 %9, i32* %10)
%12 = load i32, i32* %4
%13 = lshr i32 %12, 16
%14 = load i32*, i32** %3
%15 = call i32 @putc(i32 %13, i32* %14)
%16 = load i32, i32* %4
%17 = lshr i32 %16, 24
%18 = load i32*, i32** %3
%19 = call i32 @putc(i32 %17, i32* %18)
ret void
}

LLVM IR (-O2):
define void @write32u(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @putc(i32 %1, i32* %0)
%4 = lshr i32 %1, 8
%5 = tail call i32 @putc(i32 %4, i32* %0)
%6 = lshr i32 %1, 16
%7 = tail call i32 @putc(i32 %6, i32* %0)
%8 = lshr i32 %1, 24
%9 = tail call i32 @putc(i32 %8, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, temp;
  scanf("%d", &n);
  temp = n;
  printf("%d", temp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%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
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
unsigned int f84(unsigned int x, int y __attribute__((unused))) {
  return (x << 1) + (x >> ((-1) & (8 * 4 - 1)));
}


x86 assembly (clang, -O0):
<f84>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f84(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 = shl i32 %5, 1
%7 = load i32, i32* %3
%8 = lshr i32 %7, 31
%9 = add i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f84(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 1)
ret i32 %3
}
void destroy_hrtimer_on_stack(struct hrtimer *timer) {}


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

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

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

LLVM IR (-O2):
%struct.hrtimer = type opaque
define void @destroy_hrtimer_on_stack(%struct.hrtimer* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NOROM_IntUnregister(int);
void stub1(uint32_t);
void WatchdogIntUnregister(void) {
  ((void (*)(uint32_t ui32Interrupt))(
      (uint32_t *)(((uint32_t *)0x10000180)[12]))[5])(30);
  NOROM_IntUnregister(30);
}


x86 assembly (clang, -O0):
<WatchdogIntUnregister>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000180,%eax
mov    0x60(%rax),%rax
mov    $0x1e,%edi
call   *0x28(%rax)
mov    $0x1e,%edi
call   1030 <NOROM_IntUnregister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntUnregister>:
push   %rax
mov    0x100001e0,%rax
10
mov    $0x1e,%edi
call   *0x28(%rax)
mov    $0x1e,%edi
pop    %rax
jmp    1030 <NOROM_IntUnregister@plt>

LLVM IR (-O0):
define void @WatchdogIntUnregister() {
%1 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 268435840 to i64*), i64 12)
%2 = inttoptr i64 %1 to i64*
%3 = getelementptr inbounds i64, i64* %2, i64 5
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to void (i64)*
%6 = call i32 @NOROM_IntUnregister(i32 30)
ret void
}

LLVM IR (-O2):
define void @WatchdogIntUnregister() {
%1 = load i64, i64* inttoptr (i64 268435936 to i64*)
%2 = inttoptr i64 %1 to i64*
%3 = getelementptr inbounds i64, i64* %2, i64 5
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to void (i64)*
tail call void %5(i64 30)
%6 = tail call i32 @NOROM_IntUnregister(i32 30)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _cc3_delay_us_4(int);
void _cc3_camera_reset() {
  (*(volatile unsigned long *)((0xE002800C))) = 0x8000;
  _cc3_delay_us_4(1);
  (*(volatile unsigned long *)((0xE0028004))) = 0x8000;
  _cc3_delay_us_4(1);
  (*(volatile unsigned long *)((0xE002800C))) = 0x8000;
  _cc3_delay_us_4(1);
}


x86 assembly (clang, -O0):
<_cc3_camera_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe002800c,%eax
movq   $0x8000,(%rax)
mov    $0x1,%edi
call   1030 <_cc3_delay_us_4@plt>
mov    $0xe0028004,%eax
movq   $0x8000,(%rax)
mov    $0x1,%edi
call   1030 <_cc3_delay_us_4@plt>
mov    $0xe002800c,%eax
movq   $0x8000,(%rax)
mov    $0x1,%edi
call   1030 <_cc3_delay_us_4@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cc3_camera_reset>:
push   %rbx
mov    $0xe002800c,%ebx
movq   $0x8000,(%rbx)
mov    $0x1,%edi
call   1030 <_cc3_delay_us_4@plt>
movq   $0x8000,-0x8(%rbx)
mov    $0x1,%edi
call   1030 <_cc3_delay_us_4@plt>
movq   $0x8000,(%rbx)
mov    $0x1,%edi
pop    %rbx
jmp    1030 <_cc3_delay_us_4@plt>

LLVM IR (-O0):
define void @_cc3_camera_reset() {
store volatile i64 32768, i64* inttoptr (i64 3758260236 to i64*)
%1 = call i32 @_cc3_delay_us_4(i32 1)
store volatile i64 32768, i64* inttoptr (i64 3758260228 to i64*)
%2 = call i32 @_cc3_delay_us_4(i32 1)
store volatile i64 32768, i64* inttoptr (i64 3758260236 to i64*)
%3 = call i32 @_cc3_delay_us_4(i32 1)
ret void
}

LLVM IR (-O2):
define void @_cc3_camera_reset() {
store volatile i64 32768, i64* inttoptr (i64 3758260236 to i64*)
%1 = tail call i32 @_cc3_delay_us_4(i32 1)
store volatile i64 32768, i64* inttoptr (i64 3758260228 to i64*)
%2 = tail call i32 @_cc3_delay_us_4(i32 1)
store volatile i64 32768, i64* inttoptr (i64 3758260236 to i64*)
%3 = tail call i32 @_cc3_delay_us_4(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void end_user_section() { write("ganttproject.gan", "\t</resources>\n", NULL); }


x86 assembly (clang, -O0):
<end_user_section>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_user_section>:
lea    0xee9(%rip),%rdi
lea    0xef3(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ganttproject.gan\00"
@.str.1 = [15 x i8] c"\09</resources>\0A\00"
define void @end_user_section() {
%1 = call i32 @write(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"ganttproject.gan\00"
@.str.1 = [15 x i8] c"\09</resources>\0A\00"
define void @end_user_section() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
__attribute__((__naked__)) void SGVObjcMsgSendSuper2StretTrampolineSwift(void) {
  asm volatile("addq $"
               "16"
               ", "
               "%%rsi"
               "\n\t"
               "jmp "
               "_objc_msgSendSuper2_stret"
               "\n\t"
               :
               :
               : "rsi", "rdi");
}


x86 assembly (clang, -O0):
<SGVObjcMsgSendSuper2StretTrampolineSwift>:
add    $0x10,%rsi
jmp    1030 <_objc_msgSendSuper2_stret@plt>

x86 assembly (clang, -O2):
<SGVObjcMsgSendSuper2StretTrampolineSwift>:
add    $0x10,%rsi
jmp    1030 <_objc_msgSendSuper2_stret@plt>

LLVM IR (-O0):
define void @SGVObjcMsgSendSuper2StretTrampolineSwift() {
unreachable
}

LLVM IR (-O2):
define void @SGVObjcMsgSendSuper2StretTrampolineSwift() {
tail call void asm sideeffect "addq $$16, %rsi\0A\09jmp _objc_msgSendSuper2_stret\0A\09", "~{rsi},~{rdi},~{dirflag},~{fpsr},~{flags}"()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ phred64ToPhred(char);
char phredToPhred33(int /*<<< orphan*/);
void phred64ToPhred33(char *p64, int l) {
  int i;
  for (i = 0; i < l; i++) {
    p64[i] = phredToPhred33(phred64ToPhred(p64[i]));
  }
}


x86 assembly (clang, -O0):
<phred64ToPhred33>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1175 <phred64ToPhred33+0x55>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <phred64ToPhred@plt>
mov    %eax,%edi
call   1030 <phredToPhred33@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <phred64ToPhred33+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phred64ToPhred33>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    115e <phred64ToPhred33+0x3e>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <phred64ToPhred@plt>
mov    %eax,%edi
call   1030 <phredToPhred33@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <phred64ToPhred33+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @phred64ToPhred33(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @phred64ToPhred(i8 signext %9)
%11 = tail call signext i8 @phredToPhred33(i32 %10)
store i8 %11, i8* %8
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
void BN_hex2bn(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_hex2bn() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float);
void dump(float *buf, size_t len, FILE *out) {
  int i;
  for (i = 0; i < len; ++i) {
    fprintf(out, "%f\n", buf[i]);
  }
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1164 <dump+0x54>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
lea    0xeaf(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <dump+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %rsi,%rsi
je     114a <dump+0x3a>
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xed0(%rip),%r12
movss  (%r15,%rbx,4),%xmm0
mov    %r14,%rdi
mov    %r12,%rsi
call   1030 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1130 <dump+0x20>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @dump(float* nocapture %0, i64 %1, i32* nocapture %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %12, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds float, float* %0, i64 %6
%8 = load float, float* %7
%9 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %8)
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %5
12: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ I2CMasterBaseValid(unsigned long);
void I2CMasterTimeoutSet(unsigned long ulBase, unsigned long ulValue) {
  DEBUG_ASSERT(I2CMasterBaseValid(ulBase));
  (*((volatile unsigned long *)(ulBase + 0x00000024))) = ulValue;
}


x86 assembly (clang, -O0):
<I2CMasterTimeoutSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <I2CMasterBaseValid@plt>
mov    %eax,%edi
call   1040 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x24(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterTimeoutSet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <I2CMasterBaseValid@plt>
mov    %eax,%edi
call   1040 <DEBUG_ASSERT@plt>
mov    %r14,0x24(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @I2CMasterTimeoutSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @I2CMasterBaseValid(i64 %5)
%7 = call i32 @DEBUG_ASSERT(i32 %6)
%8 = load i64, i64* %4
%9 = load i64, i64* %3
%10 = add i64 %9, 36
%11 = inttoptr i64 %10 to i64*
store volatile i64 %8, i64* %11
ret void
}

LLVM IR (-O2):
define void @I2CMasterTimeoutSet(i64 %0, i64 %1) {
%3 = tail call i32 @I2CMasterBaseValid(i64 %0)
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = add i64 %0, 36
%6 = inttoptr i64 %5 to i64*
store volatile i64 %1, i64* %6
ret void
}
void foo265(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo265(i32 %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ wint_t;

/* Variables and functions */
int iswcntrl(int);
bool invalidFunctionArgBool_iswcntrl(bool b, wint_t c) {
  (void)iswcntrl(b);
  return iswcntrl(c != 0);
}


x86 assembly (clang, -O0):
<invalidFunctionArgBool_iswcntrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <iswcntrl@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <iswcntrl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArgBool_iswcntrl>:
push   %rbx
mov    %rsi,%rbx
call   1030 <iswcntrl@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
pop    %rbx
jmp    1030 <iswcntrl@plt>

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

LLVM IR (-O2):
define i32 @invalidFunctionArgBool_iswcntrl(i32 %0, i64 %1) {
%3 = tail call i32 @iswcntrl(i32 %0)
%4 = icmp ne i64 %1, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @iswcntrl(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("Hola\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"Hola\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
int isgraph(int c) { return (c >= 0x21 && c <= 0x7E) ? 1 : 0; }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x21,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isgraph+0x20>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 33
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ rec2(int);
int main() {
  int x = __VERIFIER_nondet_int();
  rec2(x);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @rec2(i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_rwlock_rdlock(int /*<<< orphan*/ *);
void __attribute__((__unused__))
_hash_pthread_rwlock_rlock_hnode_hh(void *m,
                                    void *_HU_d __attribute__((__unused__))) {
  pthread_rwlock_t *rwlck = (pthread_rwlock_t *)m;
  pthread_rwlock_rdlock(rwlck);
}


x86 assembly (clang, -O0):
<_hash_pthread_rwlock_rlock_hnode_hh>:
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    -0x18(%rbp),%rdi
call   1030 <pthread_rwlock_rdlock@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hash_pthread_rwlock_rlock_hnode_hh>:
jmp    1030 <pthread_rwlock_rdlock@plt>

LLVM IR (-O0):
define void @_hash_pthread_rwlock_rlock_hnode_hh(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = call i32 @pthread_rwlock_rdlock(i32* %8)
ret void
}

LLVM IR (-O2):
define void @_hash_pthread_rwlock_rlock_hnode_hh(i8* %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @pthread_rwlock_rdlock(i32* %3)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x >= 0 && y >= 1) {
    x = x - y;
    y = __VERIFIER_nondet_int();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jl     114c <main+0x3c>
cmpl   $0x1,-0xc(%rbp)
setge  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    1174 <main+0x64>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %ebx,%ebx
js     1141 <main+0x31>
mov    %eax,%ebp
test   %eax,%eax
jle    1141 <main+0x31>
nopl   (%rax)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
sub    %ebp,%ebx
js     1141 <main+0x31>
mov    %eax,%ebp
test   %eax,%eax
jg     1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 1
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %19
14: ; preds = %12
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %2
%18 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %18, i32* %3
br label %6
19: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp sgt i32 %1, -1
%4 = icmp sgt i32 %2, 0
%5 = select i1 %3, i1 %4, i1 false
br i1 %5, label %6, label %14
6: ; preds = %0, %6
%7 = phi i32 [ %10, %6 ], [ %2, %0 ]
%8 = phi i32 [ %9, %6 ], [ %1, %0 ]
%9 = sub nsw i32 %8, %7
%10 = tail call i32 (...) @__VERIFIER_nondet_int()
%11 = icmp sgt i32 %9, -1
%12 = icmp sgt i32 %10, 0
%13 = select i1 %11, i1 %12, i1 false
br i1 %13, label %6, label %14
14: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_usage(void) {
  puts("\nUsage:  'RT-model-name' [OPTIONS]\n"
       "\n"
       "OPTIONS:\n"
       "  -h  print usage\n"
       "  -v  verbose output\n"
       "  -p <priority>  set rt task priority (default 99)\n"
       "  -e  external clock\n"
       "  -w  wait to start\n"
       "  -V  print version\n"
       "\n");
}


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

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

LLVM IR (-O0):
@.str = [198 x i8] c"\0AUsage: 'RT-model-name' [OPTIONS]\0A\0AOPTIONS:\0A -h print usage\0A -v verbose output\0A -p <priority> set rt task priority (default 99)\0A -e external clock\0A -w wait to start\0A -V print version\0A\0A\00"
define void @print_usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([198 x i8], [198 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [198 x i8] c"\0AUsage: 'RT-model-name' [OPTIONS]\0A\0AOPTIONS:\0A -h print usage\0A -v verbose output\0A -p <priority> set rt task priority (default 99)\0A -e external clock\0A -w wait to start\0A -V print version\0A\0A\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([198 x i8], [198 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double MPI_Wtime() {
  double time;
  struct timeval tv;
  gettimeofday(&tv, NULL);
  time = 1.0 * tv.tv_sec + 1.0e-6 * tv.tv_usec;
  return time;
}


x86 assembly (clang, -O0):
<MPI_Wtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPI_Wtime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @MPI_Wtime() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%7 = load double, double* %6
%8 = fmul double 0x3EB0C6F7A0B5ED8D, %7
%9 = call double @llvm.fmuladd.f64(double 1.000000e+00, double %5, double %8)
store double %9, double* %1
%10 = load double, double* %1
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @MPI_Wtime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = fmul double %7, 0x3EB0C6F7A0B5ED8D
%9 = fadd double %5, %8
ret double %9
}
int h2_char(const void *key) { return 1 + (*(const char *)key % (11 - 2)); }


x86 assembly (clang, -O0):
<h2_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2_char>:
movsbl (%rdi),%eax
imul   $0x39,%eax,%ecx
movzwl %cx,%edx
shr    $0x9,%ecx
shr    $0xf,%edx
add    %cl,%dl
movzbl %dl,%ecx
lea    (%rcx,%rcx,8),%ecx
sub    %cl,%al
add    $0x1,%al
movsbl %al,%eax
ret

LLVM IR (-O0):
define i32 @h2_char(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = srem i32 %5, 9
%7 = add nsw i32 1, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @h2_char(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = srem i8 %2, 9
%4 = add nsw i8 %3, 1
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int getLength(int);
uint16_t getNextBlock(uint16_t currPos) {
  return (currPos + getLength(currPos)) % 15000;
}


x86 assembly (clang, -O0):
<getNextBlock>:
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   1030 <getLength@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    $0x3a98,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNextBlock>:
push   %rbx
mov    %edi,%ebx
call   1030 <getLength@plt>
add    %ebx,%eax
cltq
imul   $0x45e7b273,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x3a98,%ecx,%ecx
sub    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getNextBlock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @getLength(i32 %4)
%6 = add nsw i32 %3, %5
%7 = srem i32 %6, 15000
ret i32 %7
}

LLVM IR (-O2):
define i32 @getNextBlock(i32 %0) {
%2 = tail call i32 @getLength(i32 %0)
%3 = add nsw i32 %2, %0
%4 = srem i32 %3, 15000
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, unsigned long);
void gt_permute_word_init(char *w, unsigned long l) { memset(w, 0, l); }


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

x86 assembly (clang, -O2):
<gt_permute_word_init>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @gt_permute_word_init(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glAlphaFunc(unsigned int, float);
void AlphaFunc(unsigned int f, float a) { glAlphaFunc(f, a); }


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

x86 assembly (clang, -O2):
<AlphaFunc>:
jmp    1030 <glAlphaFunc@plt>

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

LLVM IR (-O2):
define void @AlphaFunc(i32 %0, float %1) {
%3 = tail call i32 @glAlphaFunc(i32 %0, float %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void __w_le_u32(const void *p, const uint32_t val) { *((uint32_t *)(p)) = val; }


x86 assembly (clang, -O0):
<__w_le_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__w_le_u32>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @__w_le_u32(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int main(void) {
  int *b;
  ++b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void worker_bport_notify() {}


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

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

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

LLVM IR (-O2):
define void @worker_bport_notify() {
ret void
}
void g_value_dup_string() {}


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

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

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

LLVM IR (-O2):
define void @g_value_dup_string() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void test5() {
  int x = 0xFFFFFFFF;
  int px = &x;
  *(char *)px = 0x21;
  *(char *)(px + 1) = 0x43;
  *(char *)(px + 2) = 0x65;
  *(char *)(px + 3) = 0x87;
  printf("Testing writing (char*): 0x%08x\n", x);
}


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %eax,-0x8(%rbp)
movslq -0x8(%rbp),%rax
movb   $0x21,(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x43,(%rax)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
cltq
movb   $0x65,(%rax)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
cltq
movb   $0x87,(%rax)
mov    -0x4(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
lea    0x4(%rsp),%rax
cltq
movl   $0x87654321,(%rax)
mov    0x4(%rsp),%esi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Testing writing (char*): 0x%08x\0A\00"
define void @test5() {
%1 = alloca i32
%2 = alloca i32
store i32 -1, i32* %1
%3 = ptrtoint i32* %1 to i32
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
store i8 33, i8* %6
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
store i8 67, i8* %10
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 2
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
store i8 101, i8* %14
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 3
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
store i8 -121, i8* %18
%19 = load i32, i32* %1
%20 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Testing writing (char*): 0x%08x\0A\00"
define void @test5() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
%3 = ptrtoint i32* %1 to i64
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
%6 = inttoptr i64 %5 to i8*
store i8 33, i8* %6
%7 = or i64 %5, 1
%8 = inttoptr i64 %7 to i8*
store i8 67, i8* %8
%9 = or i64 %5, 2
%10 = inttoptr i64 %9 to i8*
store i8 101, i8* %10
%11 = or i64 %5, 3
%12 = inttoptr i64 %11 to i8*
store i8 -121, i8* %12
%13 = load i32, i32* %1
%14 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %13)
ret void
}
/* Variables and functions */
long long madd(int);
long long foo() { return madd(0x0000000100000001LL); }


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

x86 assembly (clang, -O2):
<foo>:
mov    $0x1,%edi
jmp    1030 <madd@plt>

LLVM IR (-O0):
define i64 @foo() {
%1 = call i64 @madd(i32 1)
ret i64 %1
}

LLVM IR (-O2):
define i64 @foo() {
%1 = tail call i64 @madd(i32 1)
ret i64 %1
}
void g_completion_complete() {}


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

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

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

LLVM IR (-O2):
define void @g_completion_complete() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, char const *, int);
int main() {
  int i, searchlen;
  const char *arg;
  foo(i, arg, searchlen);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 undef, i8* undef, i32 undef)
ret i32 0
}
int bootstage_stash(void *base, int size) { return 0; }


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

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

LLVM IR (-O0):
define i32 @bootstage_stash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @bootstage_stash(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t prince_k0_to_k0_prime(const uint64_t k0) {
  uint64_t k0_ror1 = (k0 >> 1) | (k0 << 63);
  uint64_t k0_prime = k0_ror1 ^ (k0 >> 63);
  return k0_prime;
}


x86 assembly (clang, -O0):
<prince_k0_to_k0_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%edx
mov    $0x3f,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%edx
mov    $0x3f,%ecx
sar    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @prince_k0_to_k0_prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = load i32, i32* %2
%8 = shl i32 %7, 63
%9 = or i32 %6, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = ashr i32 %11, 63
%13 = xor i32 %10, %12
store i32 %13, i32* %4
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
define i32 @prince_k0_to_k0_prime(i32 %0) {
ret i32 poison
}
void oth_display_reset() {}


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

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

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

LLVM IR (-O2):
define void @oth_display_reset() {
ret void
}
/* Type definitions */
typedef int fpu_control_t;

/* Variables and functions */
int FE_ALL_EXCEPT;
int /*<<< orphan*/ _FPU_GETCW(int);
int /*<<< orphan*/ _FPU_SETCW(int);
int feenableexcept(int excepts) {
  fpu_control_t temp, old_flag;
  _FPU_GETCW(temp);
  old_flag = (temp >> 5) & FE_ALL_EXCEPT;
  excepts &= FE_ALL_EXCEPT;
  temp |= excepts << 5;
  _FPU_SETCW(temp);
  return old_flag;
}


x86 assembly (clang, -O0):
<feenableexcept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <_FPU_GETCW@plt>
mov    -0x8(%rbp),%eax
sar    $0x5,%eax
mov    0x2ea0(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x5,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_FPU_SETCW@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<feenableexcept>:
push   %rax
call   1030 <_FPU_GETCW@plt>
mov    $0xffffffff,%edi
call   1040 <_FPU_SETCW@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
define i32 @feenableexcept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @_FPU_GETCW(i32 %5)
%7 = load i32, i32* %3
%8 = ashr i32 %7, 5
%9 = load i32, i32* @FE_ALL_EXCEPT
%10 = and i32 %8, %9
store i32 %10, i32* %4
%11 = load i32, i32* @FE_ALL_EXCEPT
%12 = load i32, i32* %2
%13 = and i32 %12, %11
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = shl i32 %14, 5
%16 = load i32, i32* %3
%17 = or i32 %16, %15
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = call i32 @_FPU_SETCW(i32 %18)
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
define i32 @feenableexcept(i32 %0) {
%2 = tail call i32 @_FPU_GETCW(i32 undef)
%3 = tail call i32 @_FPU_SETCW(i32 -1)
ret i32 0
}