xunge/DecIR huggingface dataset:
int main() {
  foo();
  asm volatile("int3");
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
tail call void asm sideeffect "int3", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
int pem64_encode_bytes_length(int nbytes) { return ((nbytes + 2) / 3) * 4; }


x86 assembly (clang, -O0):
<pem64_encode_bytes_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pem64_encode_bytes_length>:
add    $0x2,%edi
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
shl    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @pem64_encode_bytes_length(i32 %0) {
%2 = add nsw i32 %0, 2
%3 = sdiv i32 %2, 3
%4 = shl nsw i32 %3, 2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(char *);
char *my_getcwd();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  char *path;
  path = my_getcwd();
  if (!path) {
    perror("getcwd");
    exit(1);
  }
  puts(path);
  free(path);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <my_getcwd@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1192 <main+0x42>
lea    0xe7d(%rip),%rdi
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x18(%rbp),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <my_getcwd@plt>
test   %rax,%rax
jne    1173 <main+0x23>
lea    0xe9c(%rip),%rdi
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"getcwd\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* (...) @my_getcwd()
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = icmp ne i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = call i32 @puts(i8* %14)
%16 = load i8*, i8** %6
%17 = call i32 @free(i8* %16)
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"getcwd\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @my_getcwd()
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = tail call i32 @puts(i8* %3)
%10 = tail call i32 @free(i8* %3)
%11 = tail call i32 @exit(i32 0)
unreachable
}
double alea(void) { return 0.5; }


x86 assembly (clang, -O0):
<alea>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @alea() {
ret double 5.000000e-01
}

LLVM IR (-O2):
define double @alea() {
ret double 5.000000e-01
}
/* Variables and functions */
int /*<<< orphan*/ call_my_realloc_array_ok(int *);
int *xmalloc(int);
int call_call_my_realloc_array_ok() {
  int *p;
  p = xmalloc(sizeof(int));
  call_my_realloc_array_ok(p);
}


x86 assembly (clang, -O0):
<call_call_my_realloc_array_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <call_my_realloc_array_ok@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_call_my_realloc_array_ok>:
push   %rax
mov    $0x4,%edi
call   1030 <xmalloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <call_my_realloc_array_ok@plt>

LLVM IR (-O0):
define i32 @call_call_my_realloc_array_ok() {
%1 = alloca i32
%2 = alloca i32*
%3 = call i32* @xmalloc(i32 4)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @call_my_realloc_array_ok(i32* %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @call_call_my_realloc_array_ok() {
%1 = tail call i32* @xmalloc(i32 4)
%2 = tail call i32 @call_my_realloc_array_ok(i32* %1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponseGeneric(void const *, char *, char *, char *);
void UpnpResponse_MediaRenderer_AVTransport_SetPlayMode(const void *UPnPToken) {
  UpnpResponseGeneric(UPnPToken, "urn:schemas-upnp-org:service:AVTransport:1",
                      "SetPlayMode", "");
}


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

x86 assembly (clang, -O2):
<UpnpResponse_MediaRenderer_AVTransport_SetPlayMode>:
lea    0xee9(%rip),%rsi
lea    0xf0d(%rip),%rdx
lea    0xf05(%rip),%rcx
jmp    1030 <UpnpResponseGeneric@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"urn:schemas-upnp-org:service:AVTransport:1\00"
@.str.1 = [12 x i8] c"SetPlayMode\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpResponse_MediaRenderer_AVTransport_SetPlayMode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @UpnpResponseGeneric(i8* %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"urn:schemas-upnp-org:service:AVTransport:1\00"
@.str.1 = [12 x i8] c"SetPlayMode\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpResponse_MediaRenderer_AVTransport_SetPlayMode(i8* %0) {
%2 = tail call i32 @UpnpResponseGeneric(i8* %0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int test_imm_AEint64_lowword_mem(long long *val) {
  return ((*val) & (0xAE << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_AEint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 174
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pow(int, int);
scalar_t__ rint(int /*<<< orphan*/);
int intpow(int x, int y) { return (int)rint(pow(x, y)); }


x86 assembly (clang, -O0):
<intpow>:
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   1040 <pow@plt>
mov    %eax,%edi
call   1030 <rint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intpow>:
push   %rax
call   1040 <pow@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <rint@plt>

LLVM IR (-O0):
define i32 @intpow(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 @pow(i32 %5, i32 %6)
%8 = call i64 @rint(i32 %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @intpow(i32 %0, i32 %1) {
%3 = tail call i32 @pow(i32 %0, i32 %1)
%4 = tail call i64 @rint(i32 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sighup_handler() {
  cleanup();
  exit(0);
}


x86 assembly (clang, -O0):
<sighup_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cleanup@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sighup_handler>:
push   %rax
xor    %eax,%eax
call   1030 <cleanup@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @sighup_handler() {
%1 = call i32 (...) @cleanup()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @sighup_handler() {
%1 = tail call i32 (...) @cleanup()
%2 = tail call i32 @exit(i32 0)
unreachable
}
int main() {
  ;
  {
    ;
    ;
  };
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void calculate_orbit(double *values, float c, double (*F)(float, double)) {
  int i = 0;
  for (i = 1; i <= 500; i++) {
    values[i] = F(c, values[i - 1]);
  }
}


x86 assembly (clang, -O0):
<calculate_orbit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jg     1168 <calculate_orbit+0x68>
mov    -0x18(%rbp),%rax
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rcx
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movsd  (%rcx,%rdx,8),%xmm1
call   *%rax
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1123 <calculate_orbit+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_orbit>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
movss  %xmm0,0xc(%rsp)
mov    %rdi,%r15
movsd  (%rdi),%xmm1
mov    $0x1,%ebx
xchg   %ax,%ax
movss  0xc(%rsp),%xmm0
call   *%r14
movaps %xmm0,%xmm1
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    $0x1f5,%rbx
jne    1120 <calculate_orbit+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @calculate_orbit(double* nocapture %0, float %1, double (float, double)* nocapture %2) {
%4 = load double, double* %0
br label %5
5: ; preds = %3, %5
%6 = phi double [ %4, %3 ], [ %8, %5 ]
%7 = phi i64 [ 1, %3 ], [ %10, %5 ]
%8 = tail call double %2(float %1, double %6)
%9 = getelementptr inbounds double, double* %0, i64 %7
store double %8, double* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, 501
br i1 %11, label %12, label %5
12: ; preds = %5
ret void
}
void final_check(const struct ebt_u_entry *entry,
                 const struct ebt_entry_watcher *watcher, const char *name,
                 unsigned int hookmask, unsigned int time) {}


x86 assembly (clang, -O0):
<final_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ebt_u_entry = type opaque
%struct.ebt_entry_watcher = type opaque
define void @final_check(%struct.ebt_u_entry* %0, %struct.ebt_entry_watcher* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca %struct.ebt_u_entry*
%7 = alloca %struct.ebt_entry_watcher*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store %struct.ebt_u_entry* %0, %struct.ebt_u_entry** %6
store %struct.ebt_entry_watcher* %1, %struct.ebt_entry_watcher** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
%struct.ebt_u_entry = type opaque
%struct.ebt_entry_watcher = type opaque
define void @final_check(%struct.ebt_u_entry* nocapture %0, %struct.ebt_entry_watcher* nocapture %1, i8* nocapture %2, i32 %3, i32 %4) {
ret void
}
void McSrv_DisableIrq(void) {}


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

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

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

LLVM IR (-O2):
define void @McSrv_DisableIrq() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_UNLCK;
int _fd_get_lock(int, int /*<<< orphan*/, int /*<<< orphan*/);
int fd_release_lock(int fd) { return (_fd_get_lock(fd, F_SETLK, F_UNLCK)); }


x86 assembly (clang, -O0):
<fd_release_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
call   1030 <_fd_get_lock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_release_lock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
jmp    1030 <_fd_get_lock@plt>

LLVM IR (-O0):
@F_SETLK = global i32 0
@F_UNLCK = global i32 0
define i32 @fd_release_lock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETLK
%5 = load i32, i32* @F_UNLCK
%6 = call i32 @_fd_get_lock(i32 %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@F_SETLK = global i32 0
@F_UNLCK = global i32 0
define i32 @fd_release_lock(i32 %0) {
%2 = load i32, i32* @F_SETLK
%3 = load i32, i32* @F_UNLCK
%4 = tail call i32 @_fd_get_lock(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x7c() {
  Assert_real((isupper(124) == 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_isupper.c",
              625, ("isupper should be 0 for |"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x7c>:
push   %rax
mov    $0x7c,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x271,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for |\00"
define void @t_isupper_0x7c() {
%1 = call i64 @isupper(i32 124)
%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 625, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for |\00"
define void @t_isupper_0x7c() {
%1 = tail call i64 @isupper(i32 124)
%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 625, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_entry_set_invisible_char() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_set_invisible_char() {
ret void
}
/* Type definitions */
struct rtrb_table {
  int dummy;
};

/* Variables and functions */
void **rtrb_probe(struct rtrb_table *, void *);
void *rtrb_replace(struct rtrb_table *table, void *item) {
  void **p = rtrb_probe(table, item);
  if (p == NULL || *p == item)
    return NULL;
  else {
    void *r = *p;
    *p = item;
    return r;
  }
}


x86 assembly (clang, -O0):
<rtrb_replace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <rtrb_probe@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     114d <rtrb_replace+0x3d>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
jne    115a <rtrb_replace+0x4a>
movq   $0x0,-0x8(%rbp)
jmp    1178 <rtrb_replace+0x68>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtrb_replace>:
push   %rbx
mov    %rsi,%rbx
call   1030 <rtrb_probe@plt>
test   %rax,%rax
je     112e <rtrb_replace+0x1e>
mov    %rax,%rcx
mov    (%rax),%rax
cmp    %rbx,%rax
je     112e <rtrb_replace+0x1e>
mov    %rbx,(%rcx)
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.rtrb_table = type { i32 }
define i8* @rtrb_replace(%struct.rtrb_table* %0, i8* %1) {
%3 = tail call i8** @rtrb_probe(%struct.rtrb_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
br i1 %7, label %9, label %8
8: ; preds = %5
store i8* %1, i8** %3
br label %9
9: ; preds = %2, %5, %8
%10 = phi i8* [ %6, %8 ], [ null, %5 ], [ null, %2 ]
ret i8* %10
}
int AMCTimingEvent_SetTimeout(struct AMCTimingEvent *timeEvent,
                              const struct timeval *timeout) {
  return -1;
}


x86 assembly (clang, -O0):
<AMCTimingEvent_SetTimeout>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.AMCTimingEvent = type opaque
%struct.timeval = type opaque
define i32 @AMCTimingEvent_SetTimeout(%struct.AMCTimingEvent* %0, %struct.timeval* %1) {
%3 = alloca %struct.AMCTimingEvent*
%4 = alloca %struct.timeval*
store %struct.AMCTimingEvent* %0, %struct.AMCTimingEvent** %3
store %struct.timeval* %1, %struct.timeval** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.AMCTimingEvent = type opaque
%struct.timeval = type opaque
define i32 @AMCTimingEvent_SetTimeout(%struct.AMCTimingEvent* nocapture readnone %0, %struct.timeval* nocapture readnone %1) {
ret i32 -1
}
void DL_InitDownload(void) {}


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

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

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

LLVM IR (-O2):
define void @DL_InitDownload() {
ret void
}
/* Variables and functions */
int SIGINT;
int /*<<< orphan*/ printf(char *);
void sig_usr(int signo) {
  if (signo == SIGINT)
    printf("Got SIGINT\n");
  else
    printf("Unknown signal number\n");
}


x86 assembly (clang, -O0):
<sig_usr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
jne    113e <sig_usr+0x2e>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    114a <sig_usr+0x3a>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_usr>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
lea    0xef6(%rip),%rax
lea    0xed9(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [12 x i8] c"Got SIGINT\0A\00"
@.str.1 = [23 x i8] c"Unknown signal number\0A\00"
define void @sig_usr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@str = [22 x i8] c"Unknown signal number\00"
@str.2 = [11 x i8] c"Got SIGINT\00"
define void @sig_usr(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
%4 = select i1 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret void
}
int load_bind_configuration_from_file(
    struct bind_configuration_t *bind_configuration, char *configuration_path) {
  return 0;
}


x86 assembly (clang, -O0):
<load_bind_configuration_from_file>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bind_configuration_t = type opaque
define i32 @load_bind_configuration_from_file(%struct.bind_configuration_t* %0, i8* %1) {
%3 = alloca %struct.bind_configuration_t*
%4 = alloca i8*
store %struct.bind_configuration_t* %0, %struct.bind_configuration_t** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.bind_configuration_t = type opaque
define i32 @load_bind_configuration_from_file(%struct.bind_configuration_t* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
unsigned int foo(unsigned int x, unsigned int y) {
  unsigned int z;
  if (x >= y)
    return 1;
  if (y == x)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jb     1136 <foo+0x26>
movl   $0x1,-0x4(%rbp)
jmp    1150 <foo+0x40>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1149 <foo+0x39>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
cmp    %esi,%edi
setae  %al
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp uge i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %18
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %11
store i32 0, i32* %3
br label %18
18: ; preds = %17, %10
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp uge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int inmultire(int x, int y) { return x * y; }


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

x86 assembly (clang, -O2):
<inmultire>:
mov    %edi,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @inmultire(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 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @inmultire(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ jump();
int main(void) {
  switch (1) {
  case 0:
    if (jump())
      goto end;
    foo();
  end:
    break;
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
test   %al,%al
jne    115f <main+0x3f>
jmp    113e <main+0x1e>
mov    $0x0,%al
call   1040 <jump@plt>
cmp    $0x0,%eax
je     1153 <main+0x33>
jmp    115a <main+0x3a>
mov    $0x0,%al
call   1030 <foo@plt>
jmp    1164 <main+0x44>
jmp    1164 <main+0x44>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
switch i32 1, label %9 [
i32 0, label %2
]
2: ; preds = %0
%3 = call i32 (...) @jump()
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %8
6: ; preds = %2
%7 = call i32 (...) @foo()
br label %8
8: ; preds = %6, %5
br label %10
9: ; preds = %0
br label %10
10: ; preds = %9, %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int do_655() { return 655; }


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

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

LLVM IR (-O0):
define i32 @do_655() {
ret i32 655
}

LLVM IR (-O2):
define i32 @do_655() {
ret i32 655
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *ptrmust(void *ptr) {
  if (!ptr)
    abort();
  return ptr;
}


x86 assembly (clang, -O0):
<ptrmust>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112e <ptrmust+0x1e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrmust>:
test   %rdi,%rdi
je     1119 <ptrmust+0x9>
mov    %rdi,%rax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i8* @ptrmust(i8* readnone returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret i8* %0
}
int test_imm_28uint16_mem(unsigned short *val) {
  return ((*val) & (0x28 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_28uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 40
%7 = icmp ne i32 %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_28uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 40
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char toupper(char);
char *uc(char *data) {
  int i;
  for (i = 0; data[i] != '\0'; i++)
    data[i] = toupper(data[i]);
  return data;
}


x86 assembly (clang, -O0):
<uc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1164 <uc+0x54>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <uc+0x13>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <uc+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <uc+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @uc(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8 [ %11, %4 ], [ %2, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = tail call signext i8 @toupper(i8 signext %6)
store i8 %8, i8* %7
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int f2(int);
int f3(int f3arg) {
  int f3loc;
  f3loc = f2(f3arg - 1);
  return f3loc;
}


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

x86 assembly (clang, -O2):
<f3>:
add    $0xffffffff,%edi
jmp    1030 <f2@plt>

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

LLVM IR (-O2):
define i32 @f3(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 @f2(i32 %2)
ret i32 %3
}
/* Variables and functions */
int syscall(int, int, int);
int ioprio_get(int pid) { return syscall(252, 1, pid); }


x86 assembly (clang, -O0):
<ioprio_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xfc,%edi
mov    $0x1,%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioprio_get>:
mov    %edi,%edx
mov    $0xfc,%edi
mov    $0x1,%esi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @ioprio_get(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @syscall(i32 252, i32 1, i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @ioprio_get(i32 %0) {
%2 = tail call i32 @syscall(i32 252, i32 1, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fn(int /*<<< orphan*/);
int main(void) {
  fn(0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fn(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ A();
int main() {
  A();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @A()
ret i32 0
}
/* Type definitions */
typedef double int64_t;

/* Variables and functions */
int64_t fastFloor(double x) {
  int64_t xi = (int64_t)x;
  return x < xi ? xi - 1 : xi;
}


x86 assembly (clang, -O0):
<fastFloor>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1142 <fastFloor+0x42>
movsd  -0x10(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    114c <fastFloor+0x4c>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @fastFloor(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store double %4, double* %3
%5 = load double, double* %2
%6 = load double, double* %3
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load double, double* %3
%10 = fsub double %9, 1.000000e+00
br label %13
11: ; preds = %1
%12 = load double, double* %3
br label %13
13: ; preds = %11, %8
%14 = phi double [ %10, %8 ], [ %12, %11 ]
ret double %14
}

LLVM IR (-O2):
define double @fastFloor(double returned %0) {
ret double %0
}
/* Variables and functions */
int __builtin_arm_crc32cb(int, char);
int crc32cb(int a, char b) { return __builtin_arm_crc32cb(a, b); }


x86 assembly (clang, -O0):
<crc32cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%esi
call   1030 <__builtin_arm_crc32cb@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @crc32cb(i32 %0, i8 signext %1) {
%3 = tail call i32 @__builtin_arm_crc32cb(i32 %0, i8 signext %1)
ret i32 %3
}
int zfcp_reqlist_hash(unsigned long req_id) { return req_id % 128; }


x86 assembly (clang, -O0):
<zfcp_reqlist_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x7f,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zfcp_reqlist_hash>:
mov    %rdi,%rax
and    $0x7f,%eax
ret

LLVM IR (-O0):
define i32 @zfcp_reqlist_hash(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = urem i64 %3, 128
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @zfcp_reqlist_hash(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 127
ret i32 %3
}
void print_qt(unsigned char *qt) {}


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

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

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

LLVM IR (-O2):
define void @print_qt(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arc_rtie();
void test_rtie(void) { __builtin_arc_rtie(); }


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

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

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

LLVM IR (-O2):
define void @test_rtie() {
%1 = tail call i32 (...) @__builtin_arc_rtie()
ret void
}
void wait() {}


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

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

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

LLVM IR (-O2):
define void @wait() {
ret void
}
void __start() {}


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

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

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

LLVM IR (-O2):
define void @__start() {
ret void
}
/* Type definitions */
struct cymkd_parser {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ consume(struct cymkd_parser *);
char next(struct cymkd_parser *);
bool newlines(struct cymkd_parser *parser) {
  if (next(parser) == '\n') {
    consume(parser);
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<newlines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <next@plt>
movsbl %al,%eax
cmp    $0xa,%eax
jne    1156 <newlines+0x36>
mov    -0x10(%rbp),%rdi
call   1040 <consume@plt>
movl   $0x1,-0x4(%rbp)
jmp    115d <newlines+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newlines>:
push   %rbx
mov    %rdi,%rbx
call   1030 <next@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xa,%cl
jne    113f <newlines+0x1f>
mov    %rbx,%rdi
call   1040 <consume@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.cymkd_parser = type { i32 }
define i32 @newlines(%struct.cymkd_parser* %0) {
%2 = alloca i32
%3 = alloca %struct.cymkd_parser*
store %struct.cymkd_parser* %0, %struct.cymkd_parser** %3
%4 = load %struct.cymkd_parser*, %struct.cymkd_parser** %3
%5 = call signext i8 @next(%struct.cymkd_parser* %4)
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load %struct.cymkd_parser*, %struct.cymkd_parser** %3
%10 = call i32 @consume(%struct.cymkd_parser* %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):
%struct.cymkd_parser = type { i32 }
define i32 @newlines(%struct.cymkd_parser* %0) {
%2 = tail call signext i8 @next(%struct.cymkd_parser* %0)
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @consume(%struct.cymkd_parser* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ glutBitmapTimesRoman24;
unsigned glob_glutBitmapTimesRoman24(void) {
  return (unsigned)&glutBitmapTimesRoman24;
}


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

x86 assembly (clang, -O2):
<glob_glutBitmapTimesRoman24>:
mov    0x2ee2(%rip),%eax
ret

LLVM IR (-O0):
@glutBitmapTimesRoman24 = global i32 0
define i32 @glob_glutBitmapTimesRoman24() {
ret i32 ptrtoint (i32* @glutBitmapTimesRoman24 to i32)
}

LLVM IR (-O2):
@glutBitmapTimesRoman24 = global i32 0
define i32 @glob_glutBitmapTimesRoman24() {
ret i32 ptrtoint (i32* @glutBitmapTimesRoman24 to i32)
}
char *alloc(u)
unsigned u;
{
  register char *p = malloc(u);
  if (p == 0)
    panic("no space\n");
  return p;
}


x86 assembly (clang, -O0):
<alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1152 <alloc+0x32>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <panic@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc>:
push   %rbx
mov    %edi,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113e <alloc+0x1e>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <panic@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"no space\0A\00"
define i8* @alloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @panic to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [10 x i8] c"no space\0A\00"
define i8* @alloc(i32 %0) {
%2 = zext i32 %0 to i64
%3 = tail call i8* @malloc(i64 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @panic to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i8* %3
}
void mp_squh_save_infft(int n, int radix, int in[], int out[], int nfft,
                        double infft[], double outfft[]) {
  void mp_mul_i2d(int n, int radix, int nfft, int shift, int in[],
                  double dout[]);
  void mp_mul_csqu_save_d1(int nfft, double d1[], double d2[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  mp_mul_i2d(n, radix, nfft, 0, in, infft);
  mp_mul_csqu_save_d1(nfft, infft, outfft);
  mp_mul_d2i(n, radix, nfft, outfft, out);
}


x86 assembly (clang, -O0):
<mp_squh_save_infft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%r8
mov    -0x28(%rbp),%r9
xor    %ecx,%ecx
call   1030 <mp_mul_i2d@plt>
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    0x10(%rbp),%rdx
call   1040 <mp_mul_csqu_save_d1@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1050 <mp_mul_d2i@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_squh_save_infft>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r12
mov    %r8d,%ebp
mov    %rcx,%r14
mov    %rdx,%r8
mov    %esi,%r15d
mov    %edi,%ebx
mov    0x40(%rsp),%r13
mov    %ebp,%edx
xor    %ecx,%ecx
call   1030 <mp_mul_i2d@plt>
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r13,%rdx
call   1040 <mp_mul_csqu_save_d1@plt>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r13,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <mp_mul_d2i@plt>

LLVM IR (-O0):
define void @mp_squh_save_infft(i32 %0, i32 %1, i32* %2, i32* %3, i32 %4, double* %5, double* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store i32 %4, i32* %12
store double* %5, double** %13
store double* %6, double** %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %12
%18 = load i32*, i32** %10
%19 = load double*, double** %13
%20 = load i32, i32* %12
%21 = load double*, double** %13
%22 = load double*, double** %14
%23 = load i32, i32* %8
%24 = load i32, i32* %9
%25 = load i32, i32* %12
%26 = load double*, double** %14
%27 = load i32*, i32** %11
ret void
}

LLVM IR (-O2):
define void @mp_squh_save_infft(i32 %0, i32 %1, i32* %2, i32* %3, i32 %4, double* %5, double* %6) {
tail call void @mp_mul_i2d(i32 %0, i32 %1, i32 %4, i32 0, i32* %2, double* %5)
tail call void @mp_mul_csqu_save_d1(i32 %4, double* %5, double* %6)
tail call void @mp_mul_d2i(i32 %0, i32 %1, i32 %4, double* %6, i32* %3)
ret void
}
/* Variables and functions */
int smack_set_file(char const *, char *);
int smack_set_relabel_self(const char *label) {
  return smack_set_file(label, "relabel-self");
}


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

x86 assembly (clang, -O2):
<smack_set_relabel_self>:
lea    0xee9(%rip),%rsi
jmp    1030 <smack_set_file@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"relabel-self\00"
define i32 @smack_set_relabel_self(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @smack_set_file(i8* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [13 x i8] c"relabel-self\00"
define i32 @smack_set_relabel_self(i8* %0) {
%2 = tail call i32 @smack_set_file(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
__attribute__((format(printf, 1, 2))) void xen_raw_printk(const char *fmt,
                                                          ...) {}


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

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

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

LLVM IR (-O2):
define void @xen_raw_printk(i8* nocapture %0, ...) {
ret void
}