xunge/DecIR huggingface dataset:
/* Variables and functions */
int ft_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void *ft_putendl(const char *s) {
  write(1, s, ft_strlen(s));
  write(1, "\n", 1);
  return (NULL);
}


x86 assembly (clang, -O0):
<ft_putendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    $0x1,%edx
lea    0xea7(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xec1(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define noalias i8* @ft_putendl(i8* %0) {
%2 = tail call i32 @ft_strlen(i8* %0)
%3 = tail call i32 @write(i32 1, i8* %0, i32 %2)
%4 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x93() {
  Assert_real((isalnum(147) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              740, ("isalnum should be 0 for 0x93"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x93\00"
define void @t_isalnum_0x93() {
%1 = call i64 @isalnum(i32 147)
%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 740, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x93\00"
define void @t_isalnum_0x93() {
%1 = tail call i64 @isalnum(i32 147)
%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 740, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned xrop3_12_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~T;
  stk1 = S & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_12_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_12_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    %esi,%eax
not    %eax
and    %ecx,%eax
xor    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_12_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, -1
%8 = and i32 %4, %7
%9 = xor i32 %4, -1
%10 = and i32 %9, %5
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_Laurent_container_to_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(782, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_Laurent_container_to_target_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x30e,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_Laurent_container_to_target_system>:
mov    $0x30e,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_Laurent_container_to_target_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 782, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_Laurent_container_to_target_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 782, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void CenterGuide(double centerra, double centerdec, int raflag, int decflag,
                 int pmodel) {}


x86 assembly (clang, -O0):
<CenterGuide>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @CenterGuide(double %0, double %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store double %0, double* %6
store double %1, double* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
define void @CenterGuide(double %0, double %1, i32 %2, i32 %3, i32 %4) {
ret void
}
const char *C_Str_Brief(void) { return "Interpret as C String"; }


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

x86 assembly (clang, -O2):
<C_Str_Brief>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Interpret as C String\00"
define i8* @C_Str_Brief() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"Interpret as C String\00"
define i8* @C_Str_Brief() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x91() {
  Assert_real((islower(145) == 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",
              730, ("islower should be 0 for 0x91"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x91>:
push   %rax
mov    $0x91,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2da,%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 0x91\00"
define void @t_islower_0x91() {
%1 = call i64 @islower(i32 145)
%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 730, 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 0x91\00"
define void @t_islower_0x91() {
%1 = tail call i64 @islower(i32 145)
%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 730, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
matherr() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @matherr() {
ret i32 1
}
/* Variables and functions */
double logn(double, int);
double log10(double n) { return logn(n, 10); }


x86 assembly (clang, -O0):
<log10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0xa,%edi
call   1030 <logn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10>:
mov    $0xa,%edi
jmp    1030 <logn@plt>

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

LLVM IR (-O2):
define double @log10(double %0) {
%2 = tail call double @logn(double %0, i32 10)
ret double %2
}
double get_recall(double FPR, double TPR, long P, long N) { return 1 - FPR; }


x86 assembly (clang, -O0):
<get_recall>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  0xee2(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_recall>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @get_recall(double %0, double %1, i64 %2, i64 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i64
%8 = alloca i64
store double %0, double* %5
store double %1, double* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load double, double* %5
%10 = fsub double 1.000000e+00, %9
ret double %10
}

LLVM IR (-O2):
define double @get_recall(double %0, double %1, i64 %2, i64 %3) {
%5 = fsub double 1.000000e+00, %0
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __ptr_t;

/* Variables and functions */
int PTHREAD_CANCEL_ASYNCHRONOUS;
int __libc_msync(int /*<<< orphan*/, size_t, int);
int /*<<< orphan*/ pthread_setcanceltype(int, int *);
int __attribute__((weak)) msync(__ptr_t addr, size_t length, int flags) {
  int result;
  int oldtype;
  pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
  result = __libc_msync(addr, length, flags);
  pthread_setcanceltype(oldtype, NULL);
  return result;
}


x86 assembly (clang, -O0):
<msync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    -0x1c(%rbp),%rsi
call   1040 <pthread_setcanceltype@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <__libc_msync@plt>
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_setcanceltype@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msync>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    0xc(%rsp),%rsi
call   1040 <pthread_setcanceltype@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <__libc_msync@plt>
mov    %eax,%ebx
mov    0xc(%rsp),%edi
xor    %esi,%esi
call   1040 <pthread_setcanceltype@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@PTHREAD_CANCEL_ASYNCHRONOUS = global i32 0
define weak i32 @msync(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%9 = load i32, i32* @PTHREAD_CANCEL_ASYNCHRONOUS
%10 = call i32 @pthread_setcanceltype(i32 %9, i32* %8)
%11 = load i32, i32* %4
%12 = load i64, i64* %5
%13 = load i32, i32* %6
%14 = call i32 @__libc_msync(i32 %11, i64 %12, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %8
%16 = call i32 @pthread_setcanceltype(i32 %15, i32* null)
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
@PTHREAD_CANCEL_ASYNCHRONOUS = global i32 0
define weak i32 @msync(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = load i32, i32* @PTHREAD_CANCEL_ASYNCHRONOUS
%7 = call i32 @pthread_setcanceltype(i32 %6, i32* %4)
%8 = call i32 @__libc_msync(i32 %0, i64 %1, i32 %2)
%9 = load i32, i32* %4
%10 = call i32 @pthread_setcanceltype(i32 %9, i32* null)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ childErrno;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
scalar_t__ write(int, int *, int);
void returnChildError(int childPipeFd[2], int childErrno) {
  if (write(childPipeFd[1], &childErrno, sizeof(childErrno)) < 0) {
  }
  _exit(-1);
}


x86 assembly (clang, -O0):
<returnChildError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1153 <returnChildError+0x33>
jmp    1153 <returnChildError+0x33>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<returnChildError>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x4(%rdi),%edi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1040 <write@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @returnChildError(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 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load i32, i32* %6
%8 = call i64 @write(i32 %7, i32* %4, i32 4)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
br label %11
11: ; preds = %10, %2
%12 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @returnChildError(i32* nocapture %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = call i64 @write(i32 %5, i32* %3, i32 4)
%7 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t read_four_byte_buff(char *input) {
  uint32_t x;
  x = 0xFF & input[3];
  x |= (0xFF & input[2]) << 8;
  x |= (0xFF & input[1]) << 16;
  x |= (uint32_t)(0xFF & input[0]) << 24;
  return x;
}


x86 assembly (clang, -O0):
<read_four_byte_buff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
and    $0xff,%eax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
and    $0xff,%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0xff,%eax
shl    $0x18,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @read_four_byte_buff(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = and i32 255, %7
store i32 %8, i32* %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = and i32 255, %12
%14 = shl i32 %13, 8
%15 = load i32, i32* %3
%16 = or i32 %15, %14
store i32 %16, i32* %3
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = and i32 255, %20
%22 = shl i32 %21, 16
%23 = load i32, i32* %3
%24 = or i32 %23, %22
store i32 %24, i32* %3
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = and i32 255, %28
%30 = shl i32 %29, 24
%31 = load i32, i32* %3
%32 = or i32 %31, %30
store i32 %32, i32* %3
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @read_four_byte_buff(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = or i32 %9, %13
%15 = load i8, i8* %0
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %14, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ putc(char const);
int strlen(char const *);
void print_str(const char *s) {
  int i, len = strlen(s);
  for (i = 0; i < len; i++) {
    putc(s[i]);
  }
}


x86 assembly (clang, -O0):
<print_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    116a <print_str+0x4a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <putc@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <print_str+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_str>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1153 <print_str+0x33>
mov    %eax,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1040 <putc@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <print_str+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

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


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

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

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

LLVM IR (-O2):
define void @MUSIC_SetSongTick(i64 %0) {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main() {
  int c;
  while ((c = getchar()) != EOF) {
    putchar(c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1155 <main+0x35>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret i32 0
}
int crapi_init(void *unused) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @crapi_init(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
long divmodsi4(int, unsigned long, unsigned long);
long __umodsi3(unsigned long numerator, unsigned long denominator) {
  long dividend;
  long modul;
  modul = divmodsi4(1, numerator, denominator);
  return modul;
}


x86 assembly (clang, -O0):
<__umodsi3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
call   1030 <divmodsi4@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__umodsi3>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <divmodsi4@plt>

LLVM IR (-O0):
define i64 @__umodsi3(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = call i64 @divmodsi4(i32 1, i64 %7, i64 %8)
store i64 %9, i64* %6
%10 = load i64, i64* %6
ret i64 %10
}

LLVM IR (-O2):
define i64 @__umodsi3(i64 %0, i64 %1) {
%3 = tail call i64 @divmodsi4(i32 1, i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
char *cstring_skip_white(char *);
char *cstring_lstrip(char *str) {
  char *src = cstring_skip_white(str);
  char *dst = str;
  if (dst != src) {
    while ((*dst++ = *src++) != 0) {
    }
  }
  return str;
}


x86 assembly (clang, -O0):
<cstring_lstrip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cstring_skip_white@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     117c <cstring_lstrip+0x6c>
jmp    1144 <cstring_lstrip+0x34>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1177 <cstring_lstrip+0x67>
jmp    1144 <cstring_lstrip+0x34>
jmp    117c <cstring_lstrip+0x6c>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstring_lstrip>:
push   %rbx
mov    %rdi,%rbx
call   1030 <cstring_skip_white@plt>
cmp    %rbx,%rax
je     112f <cstring_lstrip+0x1f>
xor    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
mov    %dl,(%rbx,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1120 <cstring_lstrip+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @cstring_lstrip(i8* returned %0) {
%2 = tail call i8* @cstring_skip_white(i8* %0)
%3 = icmp eq i8* %2, %0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %5
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %8, i8* %6
%10 = icmp eq i8 %8, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_help() {
  printf("Usage: -s [command] -c [content]\n");
  printf(
      "    -s    use create,snd,rcv,close to start with different function\n");
  printf("    -c    with \"-s snd\" set the send message content\n");
}


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

x86 assembly (clang, -O2):
<show_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf35(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Usage: -s [command] -c [content]\0A\00"
@.str.1 = [69 x i8] c" -s use create,snd,rcv,close to start with different function\0A\00"
@.str.2 = [54 x i8] c" -c with \22-s snd\22 set the send message content\0A\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"Usage: -s [command] -c [content]\00"
@str.3 = [68 x i8] c" -s use create,snd,rcv,close to start with different function\00"
@str.4 = [53 x i8] c" -c with \22-s snd\22 set the send message content\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ capitalizer(char *);
int main(int argc, const char *argv[]) {
  char str[100] = "BOOLEAN";
  capitalizer(str);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xf35(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rdi
call   1030 <capitalizer@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [100 x i8] c"BOOLEAN\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [100 x i8]* %6 to i8*
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%9 = call i32 @capitalizer(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [100 x i8] c"BOOLEAN\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @capitalizer(i8* %4)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EMACLPIEnter(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x400EC000);
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) |= 0x00010000;
}


x86 assembly (clang, -O0):
<EMACLPIEnter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
or     $0x10000,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACLPIEnter>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x400ec000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0x10000,0x30(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @EMACLPIEnter(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074708480
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 48
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 65536
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @EMACLPIEnter(i32 %0) {
%2 = icmp eq i32 %0, 1074708480
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 48
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = or i32 %8, 65536
store volatile i32 %9, i32* %7
ret void
}
/* Type definitions */
typedef double GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
void lightpos(void) {
  GLfloat position[] = {
      0.0,
      0.707,
      0.707,
      0.,
  };
  glLightfv(GL_LIGHT0, GL_POSITION, position);
}


x86 assembly (clang, -O0):
<lightpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lightpos>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <glLightfv@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.lightpos.position = [4 x double] [double 0.000000e+00, double 7.070000e-01, double 7.070000e-01, double 0.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
define void @lightpos() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = load i32, i32* @GL_LIGHT0
%4 = load i32, i32* @GL_POSITION
%5 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%6 = call i32 @glLightfv(i32 %3, i32 %4, double* %5)
ret void
}

LLVM IR (-O2):
@__const.lightpos.position = [4 x double] [double 0.000000e+00, double 7.070000e-01, double 7.070000e-01, double 0.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
define void @lightpos() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = load i32, i32* @GL_LIGHT0
%4 = load i32, i32* @GL_POSITION
%5 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%6 = call i32 @glLightfv(i32 %3, i32 %4, double* %5)
ret void
}
int main() {
  if (!'0' != 0)
    ;
}


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
}
/* Variables and functions */
int /*<<< orphan*/ barrier();
void putc(int c) {
  static volatile unsigned char *uart = (volatile unsigned char *)0x44200000;
  while (!(uart[5] & 0x20)) {
    barrier();
  }
  uart[0] = c;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2f06(%rip),%rax
mov    0x5(%rax),%al
movzbl %al,%eax
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1140 <putc+0x30>
jmp    114c <putc+0x3c>
mov    $0x0,%al
call   1030 <barrier@plt>
jmp    111b <putc+0xb>
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    0x2ed0(%rip),%rax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbx
mov    %edi,%ebx
testb  $0x20,0x44200005
20
jne    1131 <putc+0x21>
nopl   (%rax)
xor    %eax,%eax
call   1030 <barrier@plt>
testb  $0x20,0x44200005
20
je     1120 <putc+0x10>
mov    %bl,0x44200000
pop    %rbx
ret

LLVM IR (-O0):
@putc.uart = internal global i8* inttoptr (i64 1142947840 to i8*)
define void @putc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %11, %1
%4 = load i8*, i8** @putc.uart
%5 = getelementptr inbounds i8, i8* %4, i64 5
%6 = load volatile i8, i8* %5
%7 = zext i8 %6 to i32
%8 = and i32 %7, 32
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = call i32 (...) @barrier()
br label %3
13: ; preds = %3
%14 = load i32, i32* %2
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** @putc.uart
%17 = getelementptr inbounds i8, i8* %16, i64 0
store volatile i8 %15, i8* %17
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = load volatile i8, i8* inttoptr (i64 1142947845 to i8*)
%3 = and i8 %2, 32
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1, %5
%6 = tail call i32 (...) @barrier()
%7 = load volatile i8, i8* inttoptr (i64 1142947845 to i8*)
%8 = and i8 %7, 32
%9 = icmp eq i8 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %1
%11 = trunc i32 %0 to i8
store volatile i8 %11, i8* inttoptr (i64 1142947840 to i8*)
ret void
}
void perfstats_disable(void) {}


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

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

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

LLVM IR (-O2):
define void @perfstats_disable() {
ret void
}
output_with_tab(ptr) char ptr[];
{
  print_tab();
  output_string(ptr);
}


x86 assembly (clang, -O0):
<output_with_tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <print_tab@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <output_string@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_with_tab>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <print_tab@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <output_string@plt>

LLVM IR (-O0):
define i32 @output_with_tab(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @print_tab()
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @output_string to i32 (i8*, ...)*)(i8* %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @output_with_tab(i8* %0) {
%2 = tail call i32 (...) @print_tab()
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @output_string to i32 (i8*, ...)*)(i8* %0)
ret i32 undef
}
sum(k) int k;
{
  if (k <= 0)
    return (0);
  return (k + sum(k - 1));
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <sum+0x21>
movl   $0x0,-0x4(%rbp)
jmp    114c <sum+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <sum@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
test   %edi,%edi
jle    1119 <sum+0x19>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @sum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = call i32 @sum(i32 %10)
%12 = add nsw i32 %8, %11
store i32 %12, i32* %2
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @sum(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
void g_strnfill() {}


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

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

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

LLVM IR (-O2):
define void @g_strnfill() {
ret void
}
/* Type definitions */
typedef size_t uint32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
void store_SINT16(int16_t *arr, uint32_t idx, int16_t value) {
  arr[idx] = value;
}


x86 assembly (clang, -O0):
<store_SINT16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_SINT16>:
mov    %edx,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @store_SINT16(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds i32, i32* %8, i64 %9
store i32 %7, i32* %10
ret void
}

LLVM IR (-O2):
define void @store_SINT16(i32* nocapture writeonly %0, i64 %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
store i32 %2, i32* %4
ret void
}
void cursorpos() {}


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

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

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

LLVM IR (-O2):
define void @cursorpos() {
ret void
}
int searchEmptyListTest() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @searchEmptyListTest() {
ret i32 1
}
int do_121() { return 121; }


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

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

LLVM IR (-O0):
define i32 @do_121() {
ret i32 121
}

LLVM IR (-O2):
define i32 @do_121() {
ret i32 121
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t ev3_gyro_sensor_get_rate(int32_t port) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ev3_gyro_sensor_get_rate(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wifidisplay_config_usage(void) {
  printf("\nUsage : wifidisplay_config [CONFIG_FILE]\n");
  printf("\nIf CONFIG_FILE is provided, a 'set' is performed, else a 'get' is "
         "performed.\n");
  printf("CONFIG_FILE contains all WiFiDisplay parameters.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_wifidisplay_config_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
lea    0xf48(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0AUsage : wifidisplay_config [CONFIG_FILE]\0A\00"
@.str.1 = [79 x i8] c"\0AIf CONFIG_FILE is provided, a 'set' is performed, else a 'get' is performed.\0A\00"
@.str.2 = [50 x i8] c"CONFIG_FILE contains all WiFiDisplay parameters.\0A\00"
define void @print_wifidisplay_config_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [42 x i8] c"\0AUsage : wifidisplay_config [CONFIG_FILE]\00"
@str.3 = [78 x i8] c"\0AIf CONFIG_FILE is provided, a 'set' is performed, else a 'get' is performed.\00"
@str.4 = [49 x i8] c"CONFIG_FILE contains all WiFiDisplay parameters.\00"
define void @print_wifidisplay_config_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GyrCon_lc898122_sharp(int);
int /*<<< orphan*/ SrvCon_lc898122_sharp(int, int);
void OisEna_lc898122_sharp(void) {
  SrvCon_lc898122_sharp(0x00, 0x01);
  SrvCon_lc898122_sharp(0x01, 0x01);
  GyrCon_lc898122_sharp(0x01);
}


x86 assembly (clang, -O0):
<OisEna_lc898122_sharp>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SrvCon_lc898122_sharp@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <SrvCon_lc898122_sharp@plt>
mov    $0x1,%edi
call   1030 <GyrCon_lc898122_sharp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OisEna_lc898122_sharp>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SrvCon_lc898122_sharp@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <SrvCon_lc898122_sharp@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <GyrCon_lc898122_sharp@plt>

LLVM IR (-O0):
define void @OisEna_lc898122_sharp() {
%1 = call i32 @SrvCon_lc898122_sharp(i32 0, i32 1)
%2 = call i32 @SrvCon_lc898122_sharp(i32 1, i32 1)
%3 = call i32 @GyrCon_lc898122_sharp(i32 1)
ret void
}

LLVM IR (-O2):
define void @OisEna_lc898122_sharp() {
%1 = tail call i32 @SrvCon_lc898122_sharp(i32 0, i32 1)
%2 = tail call i32 @SrvCon_lc898122_sharp(i32 1, i32 1)
%3 = tail call i32 @GyrCon_lc898122_sharp(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void javacall_os_exit(int status) { exit(status); }


x86 assembly (clang, -O0):
<javacall_os_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<javacall_os_exit>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @javacall_os_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}