xunge/DecIR huggingface dataset:
/* Variables and functions */
double pow(double, int);
double f(double x, double num) { return pow(x, 3) - num; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
subsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movsd  %xmm1,(%rsp)
mov    $0x3,%edi
call   1030 <pow@plt>
subsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @pow(double %5, i32 3)
%7 = load double, double* %4
%8 = fsub double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @f(double %0, double %1) {
%3 = tail call double @pow(double %0, i32 3)
%4 = fsub double %3, %1
ret double %4
}
int mal_tx_chunks(int len) { return (len + 4080 - 1) / 4080; }


x86 assembly (clang, -O0):
<mal_tx_chunks>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xff0,%eax
sub    $0x1,%eax
mov    $0xff0,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<mal_tx_chunks>:
mov    %edi,%eax
add    $0xfef,%eax
cltq
imul   $0xffffffff80808081,%rax,%rax
shr    $0x20,%rax
add    %edi,%eax
add    $0xfef,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0xb,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mal_tx_chunks(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 4080
%5 = sub nsw i32 %4, 1
%6 = sdiv i32 %5, 4080
ret i32 %6
}

LLVM IR (-O2):
define i32 @mal_tx_chunks(i32 %0) {
%2 = add nsw i32 %0, 4079
%3 = sdiv i32 %2, 4080
ret i32 %3
}
void debug_etd_freed(struct imx21 *imx21) {}


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

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

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

LLVM IR (-O2):
%struct.imx21 = type opaque
define void @debug_etd_freed(%struct.imx21* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handler_not_implemented(char *);
void defaultPrefetchAbortHandler() {
  handler_not_implemented("PREFETCH_ABORT_HANDLER");
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"PREFETCH_ABORT_HANDLER\00"
define void @defaultPrefetchAbortHandler() {
%1 = call i32 @handler_not_implemented(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"PREFETCH_ABORT_HANDLER\00"
define void @defaultPrefetchAbortHandler() {
%1 = tail call i32 @handler_not_implemented(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emsg(char *);
void movebyte() { emsg("Command disabled@- use ':set memmove' to enable "); }


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"Command disabled@- use ':set memmove' to enable \00"
define void @movebyte() {
%1 = call i32 @emsg(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"Command disabled@- use ':set memmove' to enable \00"
define void @movebyte() {
%1 = tail call i32 @emsg(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ *strchr(char *, unsigned char const);
bool attr_char_nonalnum(unsigned char const c) {
  assert('\0' != c);
  return NULL != strchr("!#$&+-.^_`|~", c);
}


x86 assembly (clang, -O0):
<attr_char_nonalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xeb6(%rip),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attr_char_nonalnum>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1040 <assert@plt>
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"!#$&+-.^_`|~\00"
define i32 @attr_char_nonalnum(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp ne i32 0, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8, i8* %2
%9 = call i32* @strchr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 zeroext %8)
%10 = icmp ne i32* null, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [13 x i8] c"!#$&+-.^_`|~\00"
define i32 @attr_char_nonalnum(i8 zeroext %0) {
%2 = icmp ne i8 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32* @strchr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
size_t calculateIndex(size_t bucketCount, int hash) {
  return ((size_t)hash) & (bucketCount - 1);
}


x86 assembly (clang, -O0):
<calculateIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateIndex>:
movslq %esi,%rcx
lea    -0x1(%rdi),%rax
and    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @calculateIndex(i64 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = add i64 %0, -1
%5 = and i64 %4, %3
ret i64 %5
}
/* Variables and functions */
int mmio_read(int);
int /*<<< orphan*/ mmio_write(int, unsigned char);
void uart_putc(unsigned char byte) {
  while (mmio_read((0x20201000 + 0x18)) & (1 << 5)) {
  }
  mmio_write((0x20201000 + 0x00), byte);
}


x86 assembly (clang, -O0):
<uart_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x20201018,%edi
call   1030 <mmio_read@plt>
and    $0x20,%eax
cmp    $0x0,%eax
je     1149 <uart_putc+0x29>
jmp    112e <uart_putc+0xe>
mov    $0x20201000,%edi
movzbl -0x1(%rbp),%esi
call   1040 <mmio_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_putc>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20201018,%edi
call   1030 <mmio_read@plt>
test   $0x20,%al
jne    1130 <uart_putc+0x10>
movzbl %bl,%esi
mov    $0x20201000,%edi
pop    %rbx
jmp    1040 <mmio_write@plt>

LLVM IR (-O0):
define void @uart_putc(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = call i32 @mmio_read(i32 538972184)
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
%10 = call i32 @mmio_write(i32 538972160, i8 zeroext %9)
ret void
}

LLVM IR (-O2):
define void @uart_putc(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @mmio_read(i32 538972184)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i32 @mmio_write(i32 538972160, i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsage() {
  printf("\n\t\tUsage: ./ccs\n"
         "\t\t         -h [display this help message]\n"
         "\t\t         -t threshold theta in a range 0.0 - 1.0\n"
         "\t\t         -o output file\n"
         "\t\t         -i input microarray expression file (processed data)\n"
         "\t\t         -m optional parameter maximum expected biclusters in a "
         "range 1 - number_of_rows_in_input_data_matrix with a default 1000\n"
         "\t\t         -g optional parameter minimum percentage of gene "
         "overlap between merged biclusters in a range 0-100 with a default "
         "100 percent for full overlap\n"
         "\t\t         -p optional output file format : 0 for standard format, "
         "1 for BiBench bicluster format and default is 0\n");
}


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

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

LLVM IR (-O0):
@.str = [602 x i8] c"\0A\09\09Usage: ./ccs\0A\09\09 -h [display this help message]\0A\09\09 -t threshold theta in a range 0.0 - 1.0\0A\09\09 -o output file\0A\09\09 -i input microarray expression file (processed data)\0A\09\09 -m optional parameter maximum expected biclusters in a range 1 - number_of_rows_in_input_data_matrix with a default 1000\0A\09\09 -g optional parameter minimum percentage of gene overlap between merged biclusters in a range 0-100 with a default 100 percent for full overlap\0A\09\09 -p optional output file format : 0 for standard format, 1 for BiBench bicluster format and default is 0\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([602 x i8], [602 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [601 x i8] c"\0A\09\09Usage: ./ccs\0A\09\09 -h [display this help message]\0A\09\09 -t threshold theta in a range 0.0 - 1.0\0A\09\09 -o output file\0A\09\09 -i input microarray expression file (processed data)\0A\09\09 -m optional parameter maximum expected biclusters in a range 1 - number_of_rows_in_input_data_matrix with a default 1000\0A\09\09 -g optional parameter minimum percentage of gene overlap between merged biclusters in a range 0-100 with a default 100 percent for full overlap\0A\09\09 -p optional output file format : 0 for standard format, 1 for BiBench bicluster format and default is 0\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([601 x i8], [601 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strncmp(char const *, char const *, int);
int isaac_strncmp(const char *s1, const char *s2, int len) {
  if (!s1 || !s2)
    return 1;
  return strncmp(s1, s2, len);
}


x86 assembly (clang, -O0):
<isaac_strncmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1139 <isaac_strncmp+0x29>
cmpq   $0x0,-0x18(%rbp)
jne    1145 <isaac_strncmp+0x35>
movl   $0x1,-0x4(%rbp)
jmp    1158 <isaac_strncmp+0x48>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isaac_strncmp>:
test   %rdi,%rdi
je     111f <isaac_strncmp+0xf>
test   %rsi,%rsi
je     111f <isaac_strncmp+0xf>
jmp    1030 <strncmp@plt>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isaac_strncmp(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = icmp ne i8* %11, null
br i1 %12, label %14, label %13
13: ; preds = %10, %3
store i32 1, i32* %4
br label %19
14: ; preds = %10
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = load i32, i32* %7
%18 = call i32 @strncmp(i8* %15, i8* %16, i32 %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @isaac_strncmp(i8* %0, i8* %1, i32 %2) {
%4 = icmp ne i8* %0, null
%5 = icmp ne i8* %1, null
%6 = and i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %2)
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ %8, %7 ], [ 1, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtsi128_si32(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_hadd_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int32_t xx_hsum_epi32_si32(__m128i v_d) {
  v_d = _mm_hadd_epi32(v_d, v_d);
  v_d = _mm_hadd_epi32(v_d, v_d);
  return _mm_cvtsi128_si32(v_d);
}


x86 assembly (clang, -O0):
<xx_hsum_epi32_si32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <_mm_hadd_epi32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <_mm_hadd_epi32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_mm_cvtsi128_si32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xx_hsum_epi32_si32>:
push   %rax
mov    %edi,%esi
call   1040 <_mm_hadd_epi32@plt>
mov    %eax,%edi
mov    %eax,%esi
call   1040 <_mm_hadd_epi32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <_mm_cvtsi128_si32@plt>

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

LLVM IR (-O2):
define i32 @xx_hsum_epi32_si32(i32 %0) {
%2 = tail call i32 @_mm_hadd_epi32(i32 %0, i32 %0)
%3 = tail call i32 @_mm_hadd_epi32(i32 %2, i32 %2)
%4 = tail call i32 @_mm_cvtsi128_si32(i32 %3)
ret i32 %4
}
void SetCWDToEXE(void) {}


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

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

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

LLVM IR (-O2):
define void @SetCWDToEXE() {
ret void
}
/* Variables and functions */
size_t charListLength(char **charList) {
  size_t len = 0;
  if (charList != NULL && *charList != NULL) {
    while (*charList != NULL) {
      len++;
      charList++;
    }
  }
  return len;
}


x86 assembly (clang, -O0):
<charListLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <charListLength+0x5e>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     115e <charListLength+0x5e>
jmp    112e <charListLength+0x2e>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1159 <charListLength+0x59>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    112e <charListLength+0x2e>
jmp    115e <charListLength+0x5e>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charListLength>:
test   %rdi,%rdi
je     1120 <charListLength+0x20>
cmpq   $0x0,(%rdi)
je     1120 <charListLength+0x20>
xor    %ecx,%ecx
nopl   (%rax)
lea    0x1(%rcx),%rax
cmpq   $0x0,0x8(%rdi,%rcx,8)
mov    %rax,%rcx
jne    1110 <charListLength+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @charListLength(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8** [ %10, %6 ], [ %0, %3 ]
%9 = add i64 %7, 1
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i64 [ 0, %3 ], [ 0, %1 ], [ %9, %6 ]
ret i64 %14
}
void toi_initiate_cluster_hibernate(void) {}


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

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

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

LLVM IR (-O2):
define void @toi_initiate_cluster_hibernate() {
ret void
}
double strtod$UNIX2003(const char *nptr, char **endptr) {
  return strtod(nptr, endptr);
}


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

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

LLVM IR (-O0):
define double @"strtod$UNIX2003"(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
%7 = call double @strtod(i8* %5, i8** %6)
ret double %7
}

LLVM IR (-O2):
define double @"strtod$UNIX2003"(i8* %0, i8** nocapture %1) {
%3 = tail call double @strtod(i8* %0, i8** %1)
ret double %3
}
void *my_atomic_fasptr(void *volatile *a, void *v) {
  return __atomic_exchange_n(a, v, 5);
}


x86 assembly (clang, -O0):
<my_atomic_fasptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
xchg   %rax,(%rcx)
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_atomic_fasptr>:
mov    %rsi,%rax
xchg   %rax,(%rdi)
ret

LLVM IR (-O0):
define i8* @my_atomic_fasptr(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %4
store i8* %8, i8** %5
%9 = bitcast i8** %7 to i64*
%10 = bitcast i8** %5 to i64*
%11 = bitcast i8** %6 to i64*
%12 = load i64, i64* %10
%13 = atomicrmw volatile xchg i64* %9, i64 %12 seq_cst
store i64 %13, i64* %11
%14 = bitcast i64* %11 to i8**
%15 = load i8*, i8** %14
ret i8* %15
}

LLVM IR (-O2):
define i8* @my_atomic_fasptr(i8** %0, i8* %1) {
%3 = bitcast i8** %0 to i64*
%4 = ptrtoint i8* %1 to i64
%5 = atomicrmw volatile xchg i64* %3, i64 %4 seq_cst
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_avg_pu8(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test57(__m64 a, __m64 b) { return _mm_avg_pu8(a, b); }


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

x86 assembly (clang, -O2):
<test57>:
jmp    1030 <_mm_avg_pu8@plt>

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

LLVM IR (-O2):
define i32 @test57(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_avg_pu8(i32 %0, i32 %1)
ret i32 %3
}
void __emptyCodeletFunction() {}


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

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

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

LLVM IR (-O2):
define void @__emptyCodeletFunction() {
ret void
}
void McASPRxClkPolaritySet(unsigned int baseAddr, unsigned int polarity) {
  (*((volatile unsigned int *)(baseAddr + (0x70)))) &= ~(0x00000080u);
  (*((volatile unsigned int *)(baseAddr + (0x70)))) |= polarity;
}


x86 assembly (clang, -O0):
<McASPRxClkPolaritySet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xffffff7f,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x70,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPRxClkPolaritySet>:
add    $0x70,%edi
andl   $0xffffff7f,(%rdi)
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @McASPRxClkPolaritySet(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 = add i32 %5, 112
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -129
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = add i32 %12, 112
%14 = zext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = or i32 %16, %11
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @McASPRxClkPolaritySet(i32 %0, i32 %1) {
%3 = add i32 %0, 112
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -129
store volatile i32 %7, i32* %5
%8 = load volatile i32, i32* %5
%9 = or i32 %8, %1
store volatile i32 %9, i32* %5
ret void
}
/* Variables and functions */
scalar_t__ ttyname_r(int, char *, int);
char *ttyname(int fd) {
  static char name[32];
  return ttyname_r(fd, name, 32) ? NULL : name;
}


x86 assembly (clang, -O0):
<ttyname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f1b(%rip),%rsi
mov    $0x20,%edx
call   1030 <ttyname_r@plt>
mov    %rax,%rdx
lea    0x2f07(%rip),%rax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttyname>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rsi
mov    $0x20,%edx
call   1030 <ttyname_r@plt>
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ttyname.name = internal global [32 x i8] zeroinitializer
define i8* @ttyname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @ttyname_r(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @ttyname.name, i64 0, i64 0), i32 32)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* null, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @ttyname.name, i64 0, i64 0)
ret i8* %7
}

LLVM IR (-O2):
@ttyname.name = internal global [32 x i8] zeroinitializer
define i8* @ttyname(i32 %0) {
%2 = tail call i64 @ttyname_r(i32 %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @ttyname.name, i64 0, i64 0), i32 32)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @ttyname.name, i64 0, i64 0), i8* null
ret i8* %4
}
/* Variables and functions */
scalar_t__ GAUnitGaussian();
double GAGaussianFloat(double dev) { return (double)GAUnitGaussian() * dev; }


x86 assembly (clang, -O0):
<GAGaussianFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <GAUnitGaussian@plt>
cvtsi2sd %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GAGaussianFloat>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <GAUnitGaussian@plt>
cvtsi2sd %rax,%xmm1
movsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @GAGaussianFloat(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i64 (...) @GAUnitGaussian()
%4 = sitofp i64 %3 to double
%5 = load double, double* %2
%6 = fmul double %4, %5
ret double %6
}

LLVM IR (-O2):
define double @GAGaussianFloat(double %0) {
%2 = tail call i64 (...) @GAUnitGaussian()
%3 = sitofp i64 %2 to double
%4 = fmul double %3, %0
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fscanf(int /*<<< orphan*/ *, char *, double *);
int /*<<< orphan*/ lua_pushnumber(double);
int read_number(FILE *f) {
  double d;
  if (fscanf(f, "%lf", &d) == 1) {
    lua_pushnumber(d);
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<read_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <fscanf@plt>
cmp    $0x1,%eax
jne    115f <read_number+0x3f>
movsd  -0x18(%rbp),%xmm0
call   1040 <lua_pushnumber@plt>
movl   $0x1,-0x4(%rbp)
jmp    1166 <read_number+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_number>:
push   %rax
lea    0xed8(%rip),%rsi
mov    %rsp,%rdx
call   1030 <fscanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1148 <read_number+0x28>
movsd  (%rsp),%xmm0
call   1040 <lua_pushnumber@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define i32 @read_number(i32* nocapture %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %2
%8 = call i32 @lua_pushnumber(double %7)
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ 1, %6 ], [ 0, %1 ]
ret i32 %10
}
void test_ispunct(void) {
  int i, j;
  for (i = -127; i < 256;)
    j = i, printf("%s: %d -> %d\n", __FUNCTION__, j, ispunct(i++) ? 1 : 0);
}


x86 assembly (clang, -O0):
<test_ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffff81,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1184 <test_ispunct+0x64>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
call   1040 <ispunct@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%esi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%esi
cmovne %eax,%ecx
lea    0xe8f(%rip),%rdi
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <test_ispunct+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ispunct>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xffffff81,%ebx
lea    0xecd(%rip),%r14
lea    0xed4(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1040 <ispunct@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%ebx
cmp    $0x100,%ebp
jne    1140 <test_ispunct+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_ispunct = [13 x i8] c"test_ispunct\00"
define void @test_ispunct() {
%1 = alloca i32
%2 = alloca i32
store i32 -127, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
%11 = call i32 @ispunct(i32 %9)
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_ispunct, i64 0, i64 0), i32 %8, i32 %14)
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_ispunct = [13 x i8] c"test_ispunct\00"
define void @test_ispunct() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -127, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, 1
%4 = tail call i32 @ispunct(i32 %2)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_ispunct, i64 0, i64 0), i32 %2, i32 %6)
%8 = icmp eq i32 %3, 256
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msputwords(int);
void meputwords(int macline) { msputwords(macline); }


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

x86 assembly (clang, -O2):
<meputwords>:
jmp    1030 <msputwords@plt>

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

LLVM IR (-O2):
define void @meputwords(i32 %0) {
%2 = tail call i32 @msputwords(i32 %0)
ret void
}
void funcEmptyStatement() {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<funcEmptyStatement>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <funcEmptyStatement+0x9>
jmp    1109 <funcEmptyStatement+0x9>

x86 assembly (clang, -O2):
<funcEmptyStatement>:
jmp    1100 <funcEmptyStatement>

LLVM IR (-O0):
define void @funcEmptyStatement() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @funcEmptyStatement() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ workDir;

/* Variables and functions */
int /*<<< orphan*/ *getcwd(char *, int);
int /*<<< orphan*/ printf(char *, ...);
void do_pwd() {
  char workDir[1024];
  if (getcwd(workDir, sizeof(workDir)) != NULL) {
    printf("%s\n", workDir);
  } else {
    printf("Unable to change directory!");
  }
}


x86 assembly (clang, -O0):
<do_pwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    -0x400(%rbp),%rdi
mov    $0x400,%esi
call   1040 <getcwd@plt>
cmp    $0x0,%rax
je     1160 <do_pwd+0x40>
lea    -0x400(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    116e <do_pwd+0x4e>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_pwd>:
sub    $0x408,%rsp
mov    %rsp,%rdi
mov    $0x400,%esi
call   1050 <getcwd@plt>
test   %rax,%rax
je     1159 <do_pwd+0x29>
mov    %rsp,%rdi
call   1030 <puts@plt>
add    $0x408,%rsp
ret
lea    0xea0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x408,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [28 x i8] c"Unable to change directory!\00"
define void @do_pwd() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32* @getcwd(i8* %2, i32 1024)
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %10
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"Unable to change directory!\00"
define void @do_pwd() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32* @getcwd(i8* %2, i32 1024)
%4 = icmp eq i32* %3, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @puts(i8* %2)
br label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int WritePrivateProfileString(char *, char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int WritePrivateProfileInt(char *section, char *entry, int value,
                           char *file_name) {
  char buff[10];
  sprintf(buff, "%d", value);
  return WritePrivateProfileString(section, entry, buff, file_name);
}


x86 assembly (clang, -O0):
<WritePrivateProfileInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x2a(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xebb(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x2a(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <WritePrivateProfileString@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WritePrivateProfileInt>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
lea    0xe(%rsp),%r12
mov    %r12,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r14,%rcx
call   1030 <WritePrivateProfileString@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @WritePrivateProfileInt(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca [10 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%11 = load i32, i32* %7
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%16 = load i8*, i8** %8
%17 = call i32 @WritePrivateProfileString(i8* %13, i8* %14, i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @WritePrivateProfileInt(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca [10 x i8]
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%8 = call i32 @WritePrivateProfileString(i8* %0, i8* %1, i8* %6, i8* %3)
ret i32 %8
}
int getchar() { return (-1); }


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

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

LLVM IR (-O0):
define i32 @getchar() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @getchar() {
ret i32 -1
}
void SSMR3DeregisterInternal(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3DeregisterInternal() {
ret void
}
float ft_nan(void) {
  int nan;
  nan = 0x7F800001;
  return (*(float *)&nan);
}


x86 assembly (clang, -O0):
<ft_nan>:
push   %rbp
mov    %rsp,%rbp
movl   $0x7f800001,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @ft_nan() {
%1 = alloca i32
store i32 2139095041, i32* %1
%2 = bitcast i32* %1 to float*
%3 = load float, float* %2
ret float %3
}

LLVM IR (-O2):
define float @ft_nan() {
ret float 0x7FF0000020000000
}
/* Type definitions */
struct bufferevent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _bufferevent_decref_and_unlock(struct bufferevent *);
void bufferevent_unlock(struct bufferevent *bev) {
  _bufferevent_decref_and_unlock(bev);
}


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

x86 assembly (clang, -O2):
<bufferevent_unlock>:
jmp    1030 <_bufferevent_decref_and_unlock@plt>

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

LLVM IR (-O2):
%struct.bufferevent = type { i32 }
define void @bufferevent_unlock(%struct.bufferevent* %0) {
%2 = tail call i32 @_bufferevent_decref_and_unlock(%struct.bufferevent* %0)
ret void
}
int calculate_uchar_max() {
  unsigned char i = 1;
  while (i > 0) {
    ++i;
  }
  --i;
  return i;
}


x86 assembly (clang, -O0):
<calculate_uchar_max>:
push   %rbp
mov    %rsp,%rbp
movb   $0x1,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jle    1122 <calculate_uchar_max+0x22>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    1108 <calculate_uchar_max+0x8>
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @calculate_uchar_max() {
ret i32 255
}
int main(void) {
  int i;
  for (i = 0; i < 100; i++) {
    asm("    .global "
        "point_a"
        "\n"
        "point_a"
        ":\n"
        "    call "
        "x86_trace_dummy"
        "\n");
    asm("    .global "
        "point_b"
        "\n"
        "point_b"
        ":\n"
        "    call "
        "x86_trace_dummy"
        "\n");
    break_here();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    115f <point_b+0x1a>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 (...) @break_here()
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
tail call void asm sideeffect " .global point_a\0Apoint_a:\0A call x86_trace_dummy\0A", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect " .global point_b\0Apoint_b:\0A call x86_trace_dummy\0A", "~{dirflag},~{fpsr},~{flags}"()
%3 = tail call i32 (...) @break_here()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
int test_imm_03uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x03 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_03uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12884901888
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_set_ps(float, float, float, float);
__m128 test_mm_set_ps(float A, float B, float C, float D) {
  return _mm_set_ps(A, B, C, D);
}


x86 assembly (clang, -O0):
<test_mm_set_ps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1030 <_mm_set_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_set_ps>:
jmp    1030 <_mm_set_ps@plt>

LLVM IR (-O0):
define i32 @test_mm_set_ps(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = load float, float* %7
%12 = load float, float* %8
%13 = call i32 @_mm_set_ps(float %9, float %10, float %11, float %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @test_mm_set_ps(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @_mm_set_ps(float %0, float %1, float %2, float %3)
ret i32 %5
}
/* Variables and functions */
double exp(double);
double expshift(double y, double y0) {
  if (y - y0 > -2.0 * 50.) {
    return exp(y - y0 + 50.);
  } else {
    return 0.0;
  }
}


x86 assembly (clang, -O0):
<expshift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1163 <expshift+0x53>
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    116b <expshift+0x5b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expshift>:
subsd  %xmm1,%xmm0
ucomisd 0xee4(%rip),%xmm0
jbe    112b <expshift+0x1b>
addsd  0xee2(%rip),%xmm0
jmp    1030 <exp@plt>
xorpd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @expshift(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fsub double %6, %7
%9 = fcmp ogt double %8, -1.000000e+02
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load double, double* %4
%12 = load double, double* %5
%13 = fsub double %11, %12
%14 = fadd double %13, 5.000000e+01
%15 = call double @exp(double %14)
store double %15, double* %3
br label %17
16: ; preds = %2
store double 0.000000e+00, double* %3
br label %17
17: ; preds = %16, %10
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
define double @expshift(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fcmp ogt double %3, -1.000000e+02
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = fadd double %3, 5.000000e+01
%7 = tail call double @exp(double %6)
br label %8
8: ; preds = %2, %5
%9 = phi double [ %7, %5 ], [ 0.000000e+00, %2 ]
ret double %9
}
void do_nothing(void) { return; }


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

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

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

LLVM IR (-O2):
define void @do_nothing() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x27() {
  Assert_real((isxdigit(39) == 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_isxdigit.c",
              200, ("isxdigit should be 0 for '"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for '\00"
define void @t_isxdigit_0x27() {
%1 = tail call i64 @isxdigit(i32 39)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void fn3(int a, int b[3][4]) {}


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

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

LLVM IR (-O0):
define void @fn3(i32 %0, [4 x i32]* %1) {
%3 = alloca i32
%4 = alloca [4 x i32]*
store i32 %0, i32* %3
store [4 x i32]* %1, [4 x i32]** %4
ret void
}

LLVM IR (-O2):
define void @fn3(i32 %0, [4 x i32]* nocapture %1) {
ret void
}