xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(unsigned long);
int /*<<< orphan*/ printf(char *, int, unsigned long);
__attribute__((__noreturn__)) void exitfunc7(int status, void *arg) {
  printf("Executing exitfunc"
         "7"
         " (status=%d, arg=%lu)\n",
         status, (unsigned long)arg);
  exit((unsigned long)arg);
}


x86 assembly (clang, -O0):
<exitfunc7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc7>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Executing exitfunc7 (status=%d, arg=%lu)\0A\00"
define void @exitfunc7(i32 %0, i8* %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 = ptrtoint i8* %6 to i64
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i64
%11 = call i32 @exit(i64 %10)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Executing exitfunc7 (status=%d, arg=%lu)\0A\00"
define void @exitfunc7(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %3)
%5 = tail call i32 @exit(i64 %3)
unreachable
}
extern void libvamphostsdk_v_2_2_1_present(void) {}


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

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

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

LLVM IR (-O2):
define void @libvamphostsdk_v_2_2_1_present() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _PC_PATH_MAX;
int /*<<< orphan*/ getcwd(char *, size_t);
char *malloc(int);
long pathconf(char *, int /*<<< orphan*/);
void set_curpath(char **path) {
  long size = pathconf(".", _PC_PATH_MAX);
  *path = malloc(sizeof(char) * size);
  getcwd(*path, (size_t)size);
}


x86 assembly (clang, -O0):
<set_curpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    0xeb4(%rip),%rdi
call   1030 <pathconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <getcwd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_curpath>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
lea    0xeb9(%rip),%rdi
call   1030 <pathconf@plt>
mov    %rax,%rbx
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %rax,(%r14)
mov    %rax,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <getcwd@plt>

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
@_PC_PATH_MAX = global i32 0
define void @set_curpath(i8** %0) {
%2 = alloca i8**
%3 = alloca i64
store i8** %0, i8*** %2
%4 = load i32, i32* @_PC_PATH_MAX
%5 = call i64 @pathconf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = mul i64 1, %6
%8 = trunc i64 %7 to i32
%9 = call i8* @malloc(i32 %8)
%10 = load i8**, i8*** %2
store i8* %9, i8** %10
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = load i64, i64* %3
%14 = call i32 @getcwd(i8* %12, i64 %13)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
@_PC_PATH_MAX = global i32 0
define void @set_curpath(i8** nocapture writeonly %0) {
%2 = load i32, i32* @_PC_PATH_MAX
%3 = tail call i64 @pathconf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = trunc i64 %3 to i32
%5 = tail call i8* @malloc(i32 %4)
store i8* %5, i8** %0
%6 = tail call i32 @getcwd(i8* %5, i64 %3)
ret void
}
int f_ge_mr1(float *a1, float a2) { return (((*a1) >= (a2))); }


x86 assembly (clang, -O0):
<f_ge_mr1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
ucomiss -0xc(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_ge_mr1>:
movss  (%rdi),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @f_ge_mr1(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float, float* %4
%8 = fcmp oge float %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_ge_mr1(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fcmp oge float %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
void FinalizeScopes(void) {}


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

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

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

LLVM IR (-O2):
define void @FinalizeScopes() {
ret void
}
void fa166(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    p02C:
      goto p02C;
      goto a;
    P02C:
      goto P02C;
      0;
  });
a:
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa166>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa166+0x4>

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

LLVM IR (-O0):
define void @fa166() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; No predecessors!
br label %27
27: ; preds = %27, %26
br label %27
}

LLVM IR (-O2):
define void @fa166() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ count_to_ten(int /*<<< orphan*/);
int main() {
  count_to_ten(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 <count_to_ten@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @count_to_ten(i32 0)
ret i32 0
}
/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ lseek(int, int, int /*<<< orphan*/);
int open(char *, int, int);
int /*<<< orphan*/ write(int, char *, int);
void init(char *fn) {
  int dskr = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0644);
  lseek(dskr, 1024, 0);
  write(dskr, "m", 1);
  close(dskr);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e71(%rip),%rax
mov    (%rax),%esi
mov    0x2e98(%rip),%rax
or     (%rax),%esi
mov    0x2e87(%rip),%rax
or     (%rax),%esi
mov    $0x1a4,%edx
call   1060 <open@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x400,%esi
xor    %edx,%edx
call   1040 <lseek@plt>
mov    -0xc(%rbp),%edi
lea    0xe6f(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0xc(%rbp),%edi
call   1050 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
mov    0x2e80(%rip),%rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e96(%rip),%rax
or     (%rax),%esi
mov    $0x1a4,%edx
call   1060 <open@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x400,%esi
xor    %edx,%edx
call   1040 <lseek@plt>
lea    0xe83(%rip),%rsi
mov    %ebx,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <close@plt>

LLVM IR (-O0):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@.str = [2 x i8] c"m\00"
define void @init(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_WRONLY
%6 = load i32, i32* @O_CREAT
%7 = or i32 %5, %6
%8 = load i32, i32* @O_TRUNC
%9 = or i32 %7, %8
%10 = call i32 @open(i8* %4, i32 %9, i32 420)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = call i32 @lseek(i32 %11, i32 1024, i32 0)
%13 = load i32, i32* %3
%14 = call i32 @write(i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%15 = load i32, i32* %3
%16 = call i32 @close(i32 %15)
ret void
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@.str = [2 x i8] c"m\00"
define void @init(i8* nocapture %0) {
%2 = load i32, i32* @O_WRONLY
%3 = load i32, i32* @O_CREAT
%4 = or i32 %3, %2
%5 = load i32, i32* @O_TRUNC
%6 = or i32 %4, %5
%7 = tail call i32 @open(i8* %0, i32 %6, i32 420)
%8 = tail call i32 @lseek(i32 %7, i32 1024, i32 0)
%9 = tail call i32 @write(i32 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%10 = tail call i32 @close(i32 %7)
ret void
}
void foo_1_2_1_2_2_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_2_2_1_2_1_1() {
ret void
}
void KIONIX_ACCEL_isr(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *get_rfc3526_prime_1536(int /*<<< orphan*/ *);
BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn) {
  return get_rfc3526_prime_1536(bn);
}


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

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

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

LLVM IR (-O2):
define i32* @BN_get_rfc3526_prime_1536(i32* %0) {
%2 = tail call i32* @get_rfc3526_prime_1536(i32* %0)
ret i32* %2
}
void Et_stopCamera0(struct usb_spca50x *etx) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @Et_stopCamera0(%struct.usb_spca50x* nocapture %0) {
ret void
}
void ssse3_test(void) {
  char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
  char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23,
                 24, 25, 26, 27, 28, 29, 30, 31};
  char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39,
                 40, 41, 42, 43, 44, 45, 46, 47};
  asm("movupd %0, %%xmm0" : "=m"(buf0));
  asm("movupd %0, %%xmm1" : "=m"(buf1));
  asm("movupd %0, %%xmm2" : "=m"(buf2));
  asm("pabsb %xmm1, %xmm2");
  asm("pabsw %xmm2, %xmm1");
  asm("pabsd %xmm1, %xmm0");
}


x86 assembly (clang, -O0):
<ssse3_test>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeec(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee9(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee6(%rip),%rax
mov    %rax,-0x28(%rbp)
movupd -0x10(%rbp),%xmm0
movupd -0x20(%rbp),%xmm1
movupd -0x30(%rbp),%xmm2
pabsb  %xmm1,%xmm2
pabsw  %xmm2,%xmm1
pabsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssse3_test>:
movaps 0xef9(%rip),%xmm0
movaps %xmm0,-0x18(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,-0x28(%rsp)
movaps 0xf01(%rip),%xmm0
movaps %xmm0,-0x38(%rsp)
movupd -0x18(%rsp),%xmm0
movupd -0x28(%rsp),%xmm1
movupd -0x38(%rsp),%xmm2
pabsb  %xmm1,%xmm2
pabsw  %xmm2,%xmm1
pabsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@__const.ssse3_test.buf0 = [16 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F"
@__const.ssse3_test.buf1 = [16 x i8] c"\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F"
@__const.ssse3_test.buf2 = [16 x i8] c" !\22#$%&'()*+,-./"
define void @ssse3_test() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
%4 = bitcast [16 x i8]* %1 to i8*
%5 = bitcast [16 x i8]* %2 to i8*
%6 = bitcast [16 x i8]* %3 to i8*
ret void
}

LLVM IR (-O2):
@__const.ssse3_test.buf0 = [16 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F"
@__const.ssse3_test.buf1 = [16 x i8] c"\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F"
@__const.ssse3_test.buf2 = [16 x i8] c" !\22#$%&'()*+,-./"
define void @ssse3_test() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
ret void
}
__attribute__((always_)) int pm_runtime_idle(struct device *dev) { return -38; }


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

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

LLVM IR (-O0):
%struct.device = type opaque
define i32 @pm_runtime_idle(%struct.device* %0) {
%2 = alloca %struct.device*
store %struct.device* %0, %struct.device** %2
ret i32 -38
}

LLVM IR (-O2):
%struct.device = type opaque
define i32 @pm_runtime_idle(%struct.device* nocapture readnone %0) {
ret i32 -38
}
/* Variables and functions */
int /*<<< orphan*/ cgbrfalse(int);
int /*<<< orphan*/ gentext();
void genbrfalse(int dest) {
  gentext();
  cgbrfalse(dest);
}


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

x86 assembly (clang, -O2):
<genbrfalse>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <gentext@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <cgbrfalse@plt>

LLVM IR (-O0):
define void @genbrfalse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @gentext()
%4 = load i32, i32* %2
%5 = call i32 @cgbrfalse(i32 %4)
ret void
}

LLVM IR (-O2):
define void @genbrfalse(i32 %0) {
%2 = tail call i32 (...) @gentext()
%3 = tail call i32 @cgbrfalse(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cannotBeOpened(void) { printf("That cannot be opened.\n"); }


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"That cannot be opened.\00"
define void @cannotBeOpened() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
int p_wm_interface() { return -142; }


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

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

LLVM IR (-O0):
define i32 @p_wm_interface() {
ret i32 -142
}

LLVM IR (-O2):
define i32 @p_wm_interface() {
ret i32 -142
}
/* Variables and functions */
int STC31xx_Read(int, int, unsigned char *);
int STC31xx_ReadByte8(int RegAddress) {
  int value;
  unsigned char data[2];
  int res;
  res = STC31xx_Read(1, RegAddress, data);
  if (res >= 0) {
    value = data[0];
  } else
    value = 0;
  return (value);
}


x86 assembly (clang, -O0):
<STC31xx_ReadByte8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    -0xa(%rbp),%rdx
mov    $0x1,%edi
call   1030 <STC31xx_Read@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1145 <STC31xx_ReadByte8+0x35>
movzbl -0xa(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    114c <STC31xx_ReadByte8+0x3c>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STC31xx_ReadByte8>:
push   %rax
mov    %edi,%esi
lea    0x6(%rsp),%rdx
mov    $0x1,%edi
call   1030 <STC31xx_Read@plt>
movzbl 0x6(%rsp),%edx
xor    %ecx,%ecx
test   %eax,%eax
cmovns %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @STC31xx_ReadByte8(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2 x i8]
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%8 = call i32 @STC31xx_Read(i32 1, i32 %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
store i32 %14, i32* %3
br label %16
15: ; preds = %1
store i32 0, i32* %3
br label %16
16: ; preds = %15, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @STC31xx_ReadByte8(i32 %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 @STC31xx_Read(i32 1, i32 %0, i8* %3)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = icmp slt i32 %4, 0
%8 = select i1 %7, i32 0, i32 %6
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ memcpy(void *, char *, size_t);
void swap(void *a, void *b, size_t size) {
  char *tmp = (char *)malloc(size);
  memcpy(tmp, a, size);
  memcpy(a, b, size);
  memcpy(b, tmp, size);
  free(tmp);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1050 <malloc@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r12,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = call i64 @malloc(i64 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = call i32 @memcpy(i8* %15, i8* %16, i64 %17)
%19 = load i8*, i8** %5
%20 = load i8*, i8** %7
%21 = load i64, i64* %6
%22 = call i32 @memcpy(i8* %19, i8* %20, i64 %21)
%23 = load i8*, i8** %7
%24 = call i32 @free(i8* %23)
ret void
}

LLVM IR (-O2):
define void @swap(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @malloc(i64 %2)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %2)
%7 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%8 = tail call i32 @memcpy(i8* %1, i8* %5, i64 %2)
%9 = tail call i32 @free(i8* %5)
ret void
}
int open_connection() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @open_connection() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ansiescape_fill(char *, char *, int, int);
int /*<<< orphan*/ printf(char *, char *);
void ansiescape_setcursor(int line, int column) {
  char buffer[20];
  ansiescape_fill(buffer, "\033[#;#H", line, column);
  printf("%s", buffer);
}


x86 assembly (clang, -O0):
<ansiescape_setcursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec1(%rip),%rsi
call   1030 <ansiescape_fill@plt>
lea    -0x20(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ansiescape_setcursor>:
push   %rbx
sub    $0x20,%rsp
mov    %esi,%ecx
mov    %edi,%edx
lea    0xed0(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <ansiescape_fill@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[#;#H\00"
@.str.1 = [3 x i8] c"%s\00"
define void @ansiescape_setcursor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [20 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @ansiescape_fill(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[#;#H\00"
@.str.1 = [3 x i8] c"%s\00"
define void @ansiescape_setcursor(i32 %0, i32 %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = call i32 @ansiescape_fill(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}
unsigned char nand_data(void) {
  return (*((volatile unsigned char *)0x4E000010));
}


x86 assembly (clang, -O0):
<nand_data>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4e000010,%eax
mov    (%rax),%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_data>:
mov    0x4e000010,%al
ret

LLVM IR (-O0):
define zeroext i8 @nand_data() {
%1 = load volatile i8, i8* inttoptr (i64 1308622864 to i8*)
ret i8 %1
}

LLVM IR (-O2):
define zeroext i8 @nand_data() {
%1 = load volatile i8, i8* inttoptr (i64 1308622864 to i8*)
ret i8 %1
}
int test_imm_50int16_mem(short *val) {
  return ((*val) & (-0x50 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_50int16_mem>:
movzwl (%rdi),%eax
test   $0xffb0,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_50int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -80
%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_50int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -80
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void rop3_90_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D ^ T;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_90_0_0>:
xor    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_90_0_0(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** %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = load i8*, i8** %4
store i8 %15, i8* %16
ret void
}

LLVM IR (-O2):
define void @rop3_90_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
store i8 %5, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ps();
void cmd_ps() { ps(); }


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

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

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

LLVM IR (-O2):
define void @cmd_ps() {
%1 = tail call i32 (...) @ps()
ret void
}
void halt(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @halt() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  if ((1 + 2) == 3)
    puts("True");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"True\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"True\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int execute_setresuid32() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_setresuid32() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(int);
void uart_space(void) { uart_putc(0x20); }


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

x86 assembly (clang, -O2):
<uart_space>:
mov    $0x20,%edi
jmp    1030 <uart_putc@plt>

LLVM IR (-O0):
define void @uart_space() {
%1 = call i32 @uart_putc(i32 32)
ret void
}

LLVM IR (-O2):
define void @uart_space() {
%1 = tail call i32 @uart_putc(i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trb8(int /*<<< orphan*/);
int /*<<< orphan*/ zeropage();
void trbZp8(void) { trb8(zeropage()); }


x86 assembly (clang, -O0):
<trbZp8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <zeropage@plt>
mov    %eax,%edi
call   1030 <trb8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trbZp8>:
push   %rax
xor    %eax,%eax
call   1040 <zeropage@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <trb8@plt>

LLVM IR (-O0):
define void @trbZp8() {
%1 = call i32 (...) @zeropage()
%2 = call i32 @trb8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @trbZp8() {
%1 = tail call i32 (...) @zeropage()
%2 = tail call i32 @trb8(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char const *argv[]) {
  puts("hello\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"hello\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double calcGeomMeanLongSun(double);
double calcSunEqOfCenter(double);
double calcSunTrueLong(double t) {
  return calcGeomMeanLongSun(t) + calcSunEqOfCenter(t);
}


x86 assembly (clang, -O0):
<calcSunTrueLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <calcGeomMeanLongSun@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <calcSunEqOfCenter@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcSunTrueLong>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <calcGeomMeanLongSun@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <calcSunEqOfCenter@plt>
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @calcSunTrueLong(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @calcGeomMeanLongSun(double %3)
%5 = load double, double* %2
%6 = call double @calcSunEqOfCenter(double %5)
%7 = fadd double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @calcSunTrueLong(double %0) {
%2 = tail call double @calcGeomMeanLongSun(double %0)
%3 = tail call double @calcSunEqOfCenter(double %0)
%4 = fadd double %2, %3
ret double %4
}
int draw_line(long x_1, long y_1, long x_2, long y_2, int mode) {
  x_1 = x_1;
  y_1 = y_1;
  x_2 = x_2;
  y_2 = y_2;
  mode = mode;
  return (1);
}


x86 assembly (clang, -O0):
<draw_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @draw_line(i64 %0, i64 %1, i64 %2, i64 %3, i32 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i64, i64* %6
store i64 %11, i64* %6
%12 = load i64, i64* %7
store i64 %12, i64* %7
%13 = load i64, i64* %8
store i64 %13, i64* %8
%14 = load i64, i64* %9
store i64 %14, i64* %9
%15 = load i32, i32* %10
store i32 %15, i32* %10
ret i32 1
}

LLVM IR (-O2):
define i32 @draw_line(i64 %0, i64 %1, i64 %2, i64 %3, i32 %4) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ga_fo_01(double, double, int, int /*<<< orphan*/, int);
int main(int argc, char **argv) {
  ga_fo_01(-1.8, 0.001, 2, 0, 200);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  0xed2(%rip),%xmm1
mov    $0x2,%edi
xor    %esi,%esi
mov    $0xc8,%edx
call   1030 <ga_fo_01@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
mov    $0x2,%edi
xor    %esi,%esi
mov    $0xc8,%edx
call   1030 <ga_fo_01@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @ga_fo_01(double -1.800000e+00, double 1.000000e-03, i32 2, i32 0, i32 200)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @ga_fo_01(double -1.800000e+00, double 1.000000e-03, i32 2, i32 0, i32 200)
ret i32 0
}
void i2d_ASN1_BMPSTRING(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ASN1_BMPSTRING() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setNEncoding(void **, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void setEncoding(void **encoding, char *rawName) {
  setNEncoding(encoding, rawName, strlen(rawName));
}


x86 assembly (clang, -O0):
<setEncoding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <setNEncoding@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setEncoding>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <setNEncoding@plt>

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

LLVM IR (-O2):
define void @setEncoding(i8** %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @setNEncoding(i8** %0, i8* %1, i32 %3)
ret void
}
int test_imm_1Cint8_reg(signed char val) {
  return ((val) & (-0x1C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Cint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffe4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Cint8_reg>:
test   $0xe4,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_1Cint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -28
%6 = icmp ne i32 %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_1Cint8_reg(i8 signext %0) {
%2 = and i8 %0, -28
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ clean_cmds_with_trash();
int /*<<< orphan*/ clean_regs_with_trash();
int /*<<< orphan*/ empty_trash_dirs();
int /*<<< orphan*/ empty_trash_list();
void empty_trash(void) {
  clean_regs_with_trash();
  empty_trash_dirs();
  clean_cmds_with_trash();
  empty_trash_list();
}


x86 assembly (clang, -O0):
<empty_trash>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <clean_regs_with_trash@plt>
mov    $0x0,%al
call   1050 <empty_trash_dirs@plt>
mov    $0x0,%al
call   1060 <clean_cmds_with_trash@plt>
mov    $0x0,%al
call   1030 <empty_trash_list@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_trash>:
push   %rax
xor    %eax,%eax
call   1040 <clean_regs_with_trash@plt>
xor    %eax,%eax
call   1050 <empty_trash_dirs@plt>
xor    %eax,%eax
call   1060 <clean_cmds_with_trash@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <empty_trash_list@plt>

LLVM IR (-O0):
define void @empty_trash() {
%1 = call i32 (...) @clean_regs_with_trash()
%2 = call i32 (...) @empty_trash_dirs()
%3 = call i32 (...) @clean_cmds_with_trash()
%4 = call i32 (...) @empty_trash_list()
ret void
}

LLVM IR (-O2):
define void @empty_trash() {
%1 = tail call i32 (...) @clean_regs_with_trash()
%2 = tail call i32 (...) @empty_trash_dirs()
%3 = tail call i32 (...) @clean_cmds_with_trash()
%4 = tail call i32 (...) @empty_trash_list()
ret void
}
int logicalShift(int x, int n) {
  int mask = ~(((1 << 31) >> n) << 1);
  int ret = (x >> n) & mask;
  return ret;
}


x86 assembly (clang, -O0):
<logicalShift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x80000000,%eax
sar    %cl,%eax
shl    $0x1,%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<logicalShift>:
mov    %esi,%ecx
mov    $0x80000000,%eax
sar    %cl,%eax
add    %eax,%eax
not    %eax
sar    %cl,%edi
and    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @logicalShift(i32 %0, i32 %1) {
%3 = ashr i32 -2147483648, %1
%4 = shl i32 %3, 1
%5 = xor i32 %4, -1
%6 = ashr i32 %0, %1
%7 = and i32 %6, %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int test_signal_abort() {
  raise(SIGABRT);
  return 0;
}


x86 assembly (clang, -O0):
<test_signal_abort>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_signal_abort>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGABRT = global i32 0
define i32 @test_signal_abort() {
%1 = load i32, i32* @SIGABRT
%2 = call i32 @raise(i32 %1)
ret i32 0
}

LLVM IR (-O2):
@SIGABRT = global i32 0
define i32 @test_signal_abort() {
%1 = load i32, i32* @SIGABRT
%2 = tail call i32 @raise(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x12() {
  Assert_real((islower(18) == 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_islower.c",
              95, ("islower should be 0 for 0x12"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x12>:
push   %rax
mov    $0x12,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x5f,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x12\00"
define void @t_islower_0x12() {
%1 = call i64 @islower(i32 18)
%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 95, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x12\00"
define void @t_islower_0x12() {
%1 = tail call i64 @islower(i32 18)
%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 95, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float gb_unlerp(float t, float a, float b) { return (t - a) / (b - a); }


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

x86 assembly (clang, -O2):
<gb_unlerp>:
subss  %xmm1,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @gb_unlerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fsub float %7, %8
%10 = load float, float* %6
%11 = load float, float* %5
%12 = fsub float %10, %11
%13 = fdiv float %9, %12
ret float %13
}

LLVM IR (-O2):
define float @gb_unlerp(float %0, float %1, float %2) {
%4 = fsub float %0, %1
%5 = fsub float %2, %1
%6 = fdiv float %4, %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ scanf(char *, char *);
void cmd_input(char *input) {
  scanf("%99[^0]", input);
  getchar();
}


x86 assembly (clang, -O0):
<cmd_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <scanf@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_input>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <scanf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <getchar@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%99[^0]\00"
define void @cmd_input(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%99[^0]\00"
define void @cmd_input(i8* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @getchar()
ret void
}
void machine_free(struct machine *machine) {}


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

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

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

LLVM IR (-O2):
%struct.machine = type opaque
define void @machine_free(%struct.machine* nocapture %0) {
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void SysCtlVoltageEventClear(uint32_t ui32Status) {
  (*((volatile unsigned long *)(0x400FE060))) |= ui32Status;
}


x86 assembly (clang, -O0):
<SysCtlVoltageEventClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x400fe060,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400fe060,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlVoltageEventClear>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
or     %rax,0x400fe060
40
ret

LLVM IR (-O0):
define void @SysCtlVoltageEventClear(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1074782304 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlVoltageEventClear(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1074782304 to i64*)
ret void
}
/* Variables and functions */
int reteload_one_byte();
unsigned long reteload_two_bytes() {
  unsigned long i;
  i = reteload_one_byte();
  i += (reteload_one_byte() << 8);
  return i;
}


x86 assembly (clang, -O0):
<reteload_two_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <reteload_one_byte@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <reteload_one_byte@plt>
shl    $0x8,%eax
cltq
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reteload_two_bytes>:
push   %rbx
xor    %eax,%eax
call   1030 <reteload_one_byte@plt>
movslq %eax,%rbx
xor    %eax,%eax
call   1030 <reteload_one_byte@plt>
shl    $0x8,%eax
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @reteload_two_bytes() {
%1 = alloca i64
%2 = call i32 (...) @reteload_one_byte()
%3 = sext i32 %2 to i64
store i64 %3, i64* %1
%4 = call i32 (...) @reteload_one_byte()
%5 = shl i32 %4, 8
%6 = sext i32 %5 to i64
%7 = load i64, i64* %1
%8 = add i64 %7, %6
store i64 %8, i64* %1
%9 = load i64, i64* %1
ret i64 %9
}

LLVM IR (-O2):
define i64 @reteload_two_bytes() {
%1 = tail call i32 (...) @reteload_one_byte()
%2 = sext i32 %1 to i64
%3 = tail call i32 (...) @reteload_one_byte()
%4 = shl i32 %3, 8
%5 = sext i32 %4 to i64
%6 = add nsw i64 %5, %2
ret i64 %6
}