xunge/DecIR huggingface dataset:
/* Variables and functions */
char *specfile_stringdupenv(char *);
void specfile_noresetstring(char **target, char *edata) {
  if (*target) {
    return;
  }
  *target = specfile_stringdupenv(edata);
  return;
}


x86 assembly (clang, -O0):
<specfile_noresetstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1133 <specfile_noresetstring+0x23>
jmp    1146 <specfile_noresetstring+0x36>
mov    -0x10(%rbp),%rdi
call   1030 <specfile_stringdupenv@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<specfile_noresetstring>:
push   %rbx
cmpq   $0x0,(%rdi)
je     1119 <specfile_noresetstring+0x9>
pop    %rbx
ret
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <specfile_stringdupenv@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @specfile_noresetstring(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** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i8* @specfile_stringdupenv(i8* %10)
%12 = load i8**, i8*** %3
store i8* %11, i8** %12
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @specfile_noresetstring(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i8* @specfile_stringdupenv(i8* %1)
store i8* %6, i8** %0
br label %7
7: ; preds = %2, %5
ret void
}
unsigned int bwap32(unsigned int x) {
  unsigned int test = 0xff;
  if (((unsigned char *)&test)[0] == 0xff)
    return (x & 0xff000000) >> 24 | (x & 0x00ff0000) >> 8 |
           (x & 0x0000ff00) << 8 | (x & 0x000000ff) << 24;
  else
    return x;
}


x86 assembly (clang, -O0):
<bwap32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0xff,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
cmp    $0xff,%eax
jne    115a <bwap32+0x5a>
mov    -0x8(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    -0x8(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <bwap32+0x60>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bwap32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 255, i32* %4
%5 = bitcast i32* %4 to i8*
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 255
br i1 %9, label %10, label %26
10: ; preds = %1
%11 = load i32, i32* %3
%12 = and i32 %11, -16777216
%13 = lshr i32 %12, 24
%14 = load i32, i32* %3
%15 = and i32 %14, 16711680
%16 = lshr i32 %15, 8
%17 = or i32 %13, %16
%18 = load i32, i32* %3
%19 = and i32 %18, 65280
%20 = shl i32 %19, 8
%21 = or i32 %17, %20
%22 = load i32, i32* %3
%23 = and i32 %22, 255
%24 = shl i32 %23, 24
%25 = or i32 %21, %24
store i32 %25, i32* %2
br label %28
26: ; preds = %1
%27 = load i32, i32* %3
store i32 %27, i32* %2
br label %28
28: ; preds = %26, %10
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @bwap32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ clearError();
void *dlopen(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ getSharedObjectLoadFlags();
int /*<<< orphan*/ logError();
void *loadSharedObject(const char *path) {
  void *object;
  clearError();
  object = dlopen(path, getSharedObjectLoadFlags());
  if (!object)
    logError();
  return object;
}


x86 assembly (clang, -O0):
<loadSharedObject>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clearError@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <getSharedObjectLoadFlags@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1060 <dlopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1183 <loadSharedObject+0x43>
mov    $0x0,%al
call   1050 <logError@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loadSharedObject>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <clearError@plt>
xor    %eax,%eax
call   1040 <getSharedObjectLoadFlags@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <dlopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116b <loadSharedObject+0x2b>
xor    %eax,%eax
call   1050 <logError@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @loadSharedObject(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i32 (...) @clearError()
%5 = load i8*, i8** %2
%6 = call i32 (...) @getSharedObjectLoadFlags()
%7 = call i8* @dlopen(i8* %5, i32 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = call i32 (...) @logError()
br label %12
12: ; preds = %10, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @loadSharedObject(i8* %0) {
%2 = tail call i32 (...) @clearError()
%3 = tail call i32 (...) @getSharedObjectLoadFlags()
%4 = tail call i8* @dlopen(i8* %0, i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @logError()
br label %8
8: ; preds = %6, %1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
Erro(int error_code) {
  if (error_code == 404)
    printf("Erro 404- Livro nao encontrado\n");
  else
    printf("Erro nao especificado!\n");
}


x86 assembly (clang, -O0):
<Erro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x194,-0x8(%rbp)
jne    1139 <Erro+0x29>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
jmp    1145 <Erro+0x35>
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Erro>:
cmp    $0x194,%edi
lea    0xefa(%rip),%rax
lea    0xedc(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Erro 404- Livro nao encontrado\0A\00"
@.str.1 = [24 x i8] c"Erro nao especificado!\0A\00"
define i32 @Erro(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 404
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@str = [23 x i8] c"Erro nao especificado!\00"
@str.2 = [31 x i8] c"Erro 404- Livro nao encontrado\00"
define i32 @Erro(i32 %0) {
%2 = icmp eq i32 %0, 404
%3 = select i1 %2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 undef
}
/* Type definitions */
typedef int u_char;

/* Variables and functions */
int /*<<< orphan*/ memcmp(char const *, char const *, int);
int etherIsMulticast(u_char *mac) {
  u_char broadcast[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
  return (!memcmp((const char *)mac, (const char *)broadcast, 6));
}


x86 assembly (clang, -O0):
<etherIsMulticast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xedd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x6,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<etherIsMulticast>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x6,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.etherIsMulticast.broadcast = [6 x i32] [i32 255, i32 255, i32 255, i32 255, i32 255, i32 255]
define i32 @etherIsMulticast(i32* %0) {
%2 = alloca i32*
%3 = alloca [6 x i32]
store i32* %0, i32** %2
%4 = bitcast [6 x i32]* %3 to i8*
%5 = load i32*, i32** %2
%6 = bitcast i32* %5 to i8*
%7 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 0
%8 = bitcast i32* %7 to i8*
%9 = call i32 @memcmp(i8* %6, i8* %8, i32 6)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@__const.etherIsMulticast.broadcast = [6 x i32] [i32 255, i32 255, i32 255, i32 255, i32 255, i32 255]
define i32 @etherIsMulticast(i32* %0) {
%2 = alloca [6 x i32]
%3 = bitcast [6 x i32]* %2 to i8*
%4 = bitcast i32* %0 to i8*
%5 = call i32 @memcmp(i8* %4, i8* %3, i32 6)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double fdmi_get_time(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ((double)(tv.tv_sec) + (double)(tv.tv_usec) * 0.001 * 0.001);
}


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

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

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

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @fdmi_get_time() {
%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 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fmul double %9, 1.000000e-03
%11 = tail call double @llvm.fmuladd.f64(double %10, double 1.000000e-03, double %6)
ret double %11
}
int isupper(int c) {
  unsigned char x = c & 0xff;
  return (x >= 'A' && x <= 'Z') || (x >= 192 && x <= 222 && x != 215);
}


x86 assembly (clang, -O0):
<isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1131 <isupper+0x31>
movzbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x6(%rbp)
jle    1170 <isupper+0x70>
movzbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0xc0,%ecx
mov    %al,-0x7(%rbp)
jl     116a <isupper+0x6a>
movzbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0xde,%ecx
mov    %al,-0x7(%rbp)
jg     116a <isupper+0x6a>
movzbl -0x5(%rbp),%eax
cmp    $0xd7,%eax
setne  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper>:
movzbl %dil,%ecx
lea    -0x41(%rcx),%edx
mov    $0x1,%eax
cmp    $0x1a,%edx
jb     1129 <isupper+0x29>
lea    -0xc0(%rcx),%edx
xor    %eax,%eax
cmp    $0x1e,%edx
ja     1129 <isupper+0x29>
xor    %eax,%eax
cmp    $0xd7,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @isupper(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 255
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp sge i32 %8, 65
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = icmp sle i32 %12, 90
br i1 %13, label %28, label %14
14: ; preds = %10, %1
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = icmp sge i32 %16, 192
br i1 %17, label %18, label %26
18: ; preds = %14
%19 = load i8, i8* %3
%20 = zext i8 %19 to i32
%21 = icmp sle i32 %20, 222
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %3
%24 = zext i8 %23 to i32
%25 = icmp ne i32 %24, 215
br label %26
26: ; preds = %22, %18, %14
%27 = phi i1 [ false, %18 ], [ false, %14 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %10
%29 = phi i1 [ true, %10 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -65
%4 = icmp ult i32 %3, 26
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = add nsw i32 %2, -192
%7 = icmp ult i32 %6, 31
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = icmp ne i32 %2, 215
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %5, %8, %1
%12 = phi i32 [ 1, %1 ], [ 0, %5 ], [ %10, %8 ]
ret i32 %12
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr8setBank0(int);
int /*<<< orphan*/ ppuSetNameTblHorizontal();
int /*<<< orphan*/ ppuSetNameTblVertical();
int /*<<< orphan*/ prg16setBank0(int);
void m78a_setParams8XXX(uint16_t addr, uint8_t val) {
  (void)addr;
  prg16setBank0((val & 7) << 14);
  chr8setBank0(((val >> 4) & 0xF) << 13);
  if ((val & 0x8) == 0)
    ppuSetNameTblHorizontal();
  else
    ppuSetNameTblVertical();
}


x86 assembly (clang, -O0):
<m78a_setParams8XXX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0x7,%edi
shl    $0xe,%edi
call   1030 <prg16setBank0@plt>
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
and    $0xf,%edi
shl    $0xd,%edi
call   1040 <chr8setBank0@plt>
mov    -0x8(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
jne    1188 <m78a_setParams8XXX+0x48>
mov    $0x0,%al
call   1050 <ppuSetNameTblHorizontal@plt>
jmp    118f <m78a_setParams8XXX+0x4f>
mov    $0x0,%al
call   1060 <ppuSetNameTblVertical@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m78a_setParams8XXX>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
and    $0x7,%edi
shl    $0xe,%edi
call   1030 <prg16setBank0@plt>
mov    %ebx,%edi
shl    $0x9,%edi
and    $0x1e000,%edi
call   1040 <chr8setBank0@plt>
xor    %eax,%eax
test   $0x8,%bl
jne    116d <m78a_setParams8XXX+0x2d>
pop    %rbx
jmp    1050 <ppuSetNameTblHorizontal@plt>
pop    %rbx
jmp    1060 <ppuSetNameTblVertical@plt>

LLVM IR (-O0):
define void @m78a_setParams8XXX(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 = and i32 %6, 7
%8 = shl i32 %7, 14
%9 = call i32 @prg16setBank0(i32 %8)
%10 = load i32, i32* %4
%11 = ashr i32 %10, 4
%12 = and i32 %11, 15
%13 = shl i32 %12, 13
%14 = call i32 @chr8setBank0(i32 %13)
%15 = load i32, i32* %4
%16 = and i32 %15, 8
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (...) @ppuSetNameTblHorizontal()
br label %22
20: ; preds = %2
%21 = call i32 (...) @ppuSetNameTblVertical()
br label %22
22: ; preds = %20, %18
ret void
}

LLVM IR (-O2):
define void @m78a_setParams8XXX(i32 %0, i32 %1) {
%3 = shl i32 %1, 14
%4 = and i32 %3, 114688
%5 = tail call i32 @prg16setBank0(i32 %4)
%6 = shl i32 %1, 9
%7 = and i32 %6, 122880
%8 = tail call i32 @chr8setBank0(i32 %7)
%9 = and i32 %1, 8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 (...) @ppuSetNameTblHorizontal()
br label %15
13: ; preds = %2
%14 = tail call i32 (...) @ppuSetNameTblVertical()
br label %15
15: ; preds = %13, %11
ret void
}
RX0RX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((p0[x0]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<RX0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114b <RX0RX1+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <RX0RX1+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0RX1>:
movslq %edx,%rax
movzwl (%r8,%rax,2),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @RX0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* %4, i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i16, i16* %5, i64 %10
%12 = load i16, i16* %11
%13 = icmp sle i16 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
int order_of_magnitude(double n) {
  int int_n = (int)n;
  int prod = 1;
  int i;
  for (i = 0;; i++) {
    prod *= 0.1;
    if (int_n * prod < 10) {
      return i;
    }
  }
}


x86 assembly (clang, -O0):
<order_of_magnitude>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
cmp    $0xa,%eax
jge    114c <order_of_magnitude+0x4c>
mov    -0x14(%rbp),%eax
pop    %rbp
ret
jmp    1151 <order_of_magnitude+0x51>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111f <order_of_magnitude+0x1f>

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

LLVM IR (-O0):
define i32 @order_of_magnitude(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store double %0, double* %2
%6 = load double, double* %2
%7 = fptosi double %6 to i32
store i32 %7, i32* %3
store i32 1, i32* %4
store i32 0, i32* %5
br label %8
8: ; preds = %20, %1
%9 = load i32, i32* %4
%10 = sitofp i32 %9 to double
%11 = fmul double %10, 1.000000e-01
%12 = fptosi double %11 to i32
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = mul nsw i32 %13, %14
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %19
17: ; preds = %8
%18 = load i32, i32* %5
ret i32 %18
19: ; preds = %8
br label %20
20: ; preds = %19
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %8
}

LLVM IR (-O2):
define i32 @order_of_magnitude(double %0) {
ret i32 0
}
/* Variables and functions */
int nclistnull(void *e) { return e == NULL; }


x86 assembly (clang, -O0):
<nclistnull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nclistnull>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @nclistnull(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @nclistnull(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
void f2(_Bool p) {
  if (p) {
#pragma omp barrier
  }
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
testb  $0x1,-0x1(%rbp)
je     111b <f2+0x1b>
jmp    111b <f2+0x1b>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f2(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @f2(i1 zeroext %0) {
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_sdssumpw(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_sdssumpw(N, x, stride);
  printf("sum: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1040 <stdlib_strided_sdssumpw@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_sdssumpw@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_sdssumpw(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_sdssumpw(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ malloc_update_mallinfo();
void malloc_stats() { malloc_update_mallinfo(); }


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

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

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

LLVM IR (-O2):
define void @malloc_stats() {
%1 = tail call i32 (...) @malloc_update_mallinfo()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_25519_to_bytes(uintptr_t, uintptr_t);
void fiat_25519_to_bytes(uint8_t out1[32], const uint64_t arg1[5]) {
  internal_fiat_25519_to_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


x86 assembly (clang, -O0):
<fiat_25519_to_bytes>:
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 <internal_fiat_25519_to_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fiat_25519_to_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_25519_to_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_25519_to_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_25519_to_bytes(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
scalar_t__ getpid();
scalar_t__ time(int /*<<< orphan*/ *);
int make_seed(void) {
  return (int)(((long)time(NULL) + (long)getpid()) % (long)1000000);
}


x86 assembly (clang, -O0):
<make_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
add    %rcx,%rax
mov    $0xf4240,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_seed>:
push   %rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%rcx
add    %rbx,%rcx
movabs $0x431bde82d7b634db,%rdx
de 1b 43
mov    %rcx,%rax
imul   %rdx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x12,%rdx
add    %eax,%edx
imul   $0xf4240,%edx,%eax
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @make_seed() {
%1 = call i64 @time(i32* null)
%2 = call i64 (...) @getpid()
%3 = add nsw i64 %1, %2
%4 = srem i64 %3, 1000000
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @make_seed() {
%1 = tail call i64 @time(i32* null)
%2 = tail call i64 (...) @getpid()
%3 = add nsw i64 %2, %1
%4 = srem i64 %3, 1000000
%5 = trunc i64 %4 to i32
ret i32 %5
}
unsigned long __attribute__((always_)) x86_pushf_cli(void) {
  unsigned long result;
  asm volatile("pushf; cli; pop %0" : "=g"(result));
  return result;
}


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

x86 assembly (clang, -O2):
<x86_pushf_cli>:
pushf
cli
pop    -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i64 @x86_pushf_cli() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load i64, i64* %1
ret i64 %3
}
/* Variables and functions */
unsigned int getUShort(char *);
unsigned int handleGoto(char *assembled, unsigned int currentPoint,
                        unsigned int length) {
  return getUShort(&assembled[currentPoint]);
}


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

x86 assembly (clang, -O2):
<handleGoto>:
mov    %esi,%eax
add    %rax,%rdi
jmp    1030 <getUShort@plt>

LLVM IR (-O0):
define i32 @handleGoto(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = call i32 @getUShort(i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @handleGoto(i8* %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @getUShort(i8* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strlen(char *);
void cmdline_parser_print_version(void) {
  printf("%s %s\n", (strlen("oNMI") ? "oNMI" : "oNMI"), "0.1");
}


x86 assembly (clang, -O0):
<cmdline_parser_print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xedc(%rip),%rdi
call   1030 <strlen@plt>
lea    0xed0(%rip),%rsi
cmp    $0x0,%rax
cmovne %rsi,%rsi
lea    0xeba(%rip),%rdi
lea    0xebf(%rip),%rdx
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdline_parser_print_version>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xee7(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [5 x i8] c"oNMI\00"
@.str.2 = [4 x i8] c"0.1\00"
define void @cmdline_parser_print_version() {
%1 = call i64 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [5 x i8] c"oNMI\00"
@.str.2 = [4 x i8] c"0.1\00"
define void @cmdline_parser_print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void rop3_60_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = T ^ S;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_60_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_60_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_60_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = xor i32 %9, %11
%13 = trunc i32 %12 to i8
store i8 %13, i8* %7
%14 = load i8, i8* %7
%15 = zext i8 %14 to i32
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = and i32 %15, %18
%20 = load i8, i8* %6
%21 = zext i8 %20 to i32
%22 = xor i32 %21, -1
%23 = and i32 %19, %22
%24 = load i8*, i8** %4
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = and i32 %26, %28
%30 = or i32 %23, %29
%31 = load i8*, i8** %4
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = and i32 %33, %35
%37 = or i32 %30, %36
%38 = trunc i32 %37 to i8
%39 = load i8*, i8** %4
store i8 %38, i8* %39
ret void
}

LLVM IR (-O2):
define void @rop3_60_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
int openair0_stop(int dummy) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @openair0_stop(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Oscar();
int main() {
  int i;
  for (i = 0; i < 10; i++)
    Oscar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <Oscar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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, 10
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 (...) @Oscar()
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() {
%1 = tail call i32 (...) @Oscar()
%2 = tail call i32 (...) @Oscar()
%3 = tail call i32 (...) @Oscar()
%4 = tail call i32 (...) @Oscar()
%5 = tail call i32 (...) @Oscar()
%6 = tail call i32 (...) @Oscar()
%7 = tail call i32 (...) @Oscar()
%8 = tail call i32 (...) @Oscar()
%9 = tail call i32 (...) @Oscar()
%10 = tail call i32 (...) @Oscar()
ret i32 0
}
lowercase(cp) char *cp;
{
  if ((('A' <= *cp && 'Z' >= *cp)))
    *cp += 0x20;
}


x86 assembly (clang, -O0):
<lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     113c <lowercase+0x3c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x5a,%eax
cmp    %ecx,%eax
jl     113c <lowercase+0x3c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lowercase>:
mov    (%rdi),%al
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     110e <lowercase+0xe>
add    $0x20,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define i32 @lowercase(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp sle i32 65, %6
br i1 %7, label %8, label %19
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sge i32 90, %11
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = add nsw i32 %16, 32
%18 = trunc i32 %17 to i8
store i8 %18, i8* %14
br label %19
19: ; preds = %13, %8, %1
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @lowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nuw nsw i8 %2, 32
store i8 %6, i8* %0
br label %7
7: ; preds = %5, %1
ret i32 undef
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int /*<<< orphan*/ xa_debug(int, char *);
int ice_strcasecmp(const char *s1, const char *s2) {
  if (!s1 || !s2) {
    xa_debug(1, "ERROR: ice_strcasecmp() called with NULL pointers");
    return 0;
  }
  return strcasecmp(s1, s2);
}


x86 assembly (clang, -O0):
<ice_strcasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <ice_strcasecmp+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1163 <ice_strcasecmp+0x43>
mov    $0x1,%edi
lea    0xeae(%rip),%rsi
call   1040 <xa_debug@plt>
movl   $0x0,-0x4(%rbp)
jmp    1173 <ice_strcasecmp+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ice_strcasecmp>:
test   %rdi,%rdi
je     112f <ice_strcasecmp+0xf>
test   %rsi,%rsi
je     112f <ice_strcasecmp+0xf>
jmp    1030 <strcasecmp@plt>
push   %rax
lea    0xec9(%rip),%rsi
mov    $0x1,%edi
call   1040 <xa_debug@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"ERROR: ice_strcasecmp() called with NULL pointers\00"
define i32 @ice_strcasecmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %8, %2
%12 = call i32 @xa_debug(i32 1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %17
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i32 @strcasecmp(i8* %14, i8* %15)
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %11
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [50 x i8] c"ERROR: ice_strcasecmp() called with NULL pointers\00"
define i32 @ice_strcasecmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @xa_debug(i32 1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %2
%9 = tail call i32 @strcasecmp(i8* %0, i8* %1)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %9, %8 ], [ 0, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x5d() {
  Assert_real((isalnum(93) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              470, ("isalnum should be 0 for ]"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x5d>:
push   %rax
mov    $0x5d,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1d6,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for ]\00"
define void @t_isalnum_0x5d() {
%1 = call i64 @isalnum(i32 93)
%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 470, i8* getelementptr inbounds ([26 x i8], [26 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for ]\00"
define void @t_isalnum_0x5d() {
%1 = tail call i64 @isalnum(i32 93)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 470, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ update_line(int /*<<< orphan*/, char *);
void redisplay_line(char *buff) { update_line(0, buff); }


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

x86 assembly (clang, -O2):
<redisplay_line>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <update_line@plt>

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

LLVM IR (-O2):
define void @redisplay_line(i8* %0) {
%2 = tail call i32 @update_line(i32 0, i8* %0)
ret void
}
void DH_check_pub_key(void) {}


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

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

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

LLVM IR (-O2):
define void @DH_check_pub_key() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x88() {
  Assert_real((isgraph(136) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              685, ("isgraph should be 0 for 0x88"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x88>:
push   %rax
mov    $0x88,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2ad,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x88\00"
define void @t_isgraph_0x88() {
%1 = call i64 @isgraph(i32 136)
%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 685, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x88\00"
define void @t_isgraph_0x88() {
%1 = tail call i64 @isgraph(i32 136)
%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 685, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ __getpgid(int /*<<< orphan*/);
pid_t getpgrp(void) { return __getpgid(0); }


x86 assembly (clang, -O0):
<getpgrp>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <__getpgid@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @getpgrp() {
%1 = call i32 @__getpgid(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getpgrp() {
%1 = tail call i32 @__getpgid(i32 0)
ret i32 %1
}
/* Type definitions */
struct DSPObject {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct DSPObject *);
void dsp_panoramizer_dispose(struct DSPObject *obj0) {
  if (obj0) {
    free(obj0);
  }
}


x86 assembly (clang, -O0):
<dsp_panoramizer_dispose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <dsp_panoramizer_dispose+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsp_panoramizer_dispose>:
test   %rdi,%rdi
je     111a <dsp_panoramizer_dispose+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.DSPObject = type { i32 }
define void @dsp_panoramizer_dispose(%struct.DSPObject* %0) {
%2 = alloca %struct.DSPObject*
store %struct.DSPObject* %0, %struct.DSPObject** %2
%3 = load %struct.DSPObject*, %struct.DSPObject** %2
%4 = icmp ne %struct.DSPObject* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.DSPObject*, %struct.DSPObject** %2
%7 = call i32 @free(%struct.DSPObject* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.DSPObject = type { i32 }
define void @dsp_panoramizer_dispose(%struct.DSPObject* %0) {
%2 = icmp eq %struct.DSPObject* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.DSPObject* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint16_t;
struct timeval {
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint16_t default_transaction_id_fn(void) {
  uint16_t trans_id;
  struct timeval tv;
  gettimeofday(&tv, NULL);
  trans_id = tv.tv_usec & 0xffff;
  return trans_id;
}


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

x86 assembly (clang, -O2):
<default_transaction_id_fn>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movzwl (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @default_transaction_id_fn() {
%1 = alloca i32
%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 i32, i32* %4
%6 = and i32 %5, 65535
store i32 %6, i32* %1
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @default_transaction_id_fn() {
%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 i32, i32* %4
%6 = and i32 %5, 65535
ret i32 %6
}