xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SCOTCH_randomProc(int const);
void SCOTCHFRANDOMPROC(const int *const procnum) {
  SCOTCH_randomProc(*procnum);
}


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

x86 assembly (clang, -O2):
<SCOTCHFRANDOMPROC>:
mov    (%rdi),%edi
jmp    1030 <SCOTCH_randomProc@plt>

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

LLVM IR (-O2):
define void @SCOTCHFRANDOMPROC(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @SCOTCH_randomProc(i32 %2)
ret void
}
void X509_CRL_add0_revoked(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_CRL_add0_revoked() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float a;
  scanf("%d", &a);
  if (a = 0.0) {
    a = 2.0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1146 <main+0x36>
jmp    1153 <main+0x43>
movss  0xeb2(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
store float 0.000000e+00, float* %2
br i1 false, label %4, label %5
4: ; preds = %0
store float 2.000000e+00, float* %2
br label %5
5: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ trap_LAN_SaveCachedServers();
void _UI_Shutdown(void) { trap_LAN_SaveCachedServers(); }


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

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

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

LLVM IR (-O2):
define void @_UI_Shutdown() {
%1 = tail call i32 (...) @trap_LAN_SaveCachedServers()
ret void
}
int getAlphabeticX(int i, int boardSize) { return (i + 97) + boardSize / 2; }


x86 assembly (clang, -O0):
<getAlphabeticX>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x61,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAlphabeticX>:
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
sar    %eax
add    %edi,%eax
add    $0x61,%eax
ret

LLVM IR (-O0):
define i32 @getAlphabeticX(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 97
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 2
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @getAlphabeticX(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 97
%4 = sdiv i32 %1, 2
%5 = add nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
unsigned long GetMouse267();
unsigned long getmouse() { return GetMouse267(); }


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

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

LLVM IR (-O0):
define i64 @getmouse() {
%1 = call i64 (...) @GetMouse267()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getmouse() {
%1 = tail call i64 (...) @GetMouse267()
ret i64 %1
}
int ProcTimeAfter(const int a, const int b) { return 0; }


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

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

LLVM IR (-O0):
define i32 @ProcTimeAfter(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @ProcTimeAfter(i32 %0, i32 %1) {
ret i32 0
}
void snd_close(void) {}


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

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

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

LLVM IR (-O2):
define void @snd_close() {
ret void
}
/* Variables and functions */
double Dist2D(double, double, double, double);
double sqrt(double);
double Dist3D(double x1, double x2, double y1, double y2, double z1,
              double z2) {
  double epi_dist = Dist2D(x1, x2, y1, y2);
  double dz = z1 - z2;
  return (sqrt(epi_dist * epi_dist + dz * dz));
}


x86 assembly (clang, -O0):
<Dist3D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <Dist2D@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dist3D>:
sub    $0x18,%rsp
movsd  %xmm5,0x10(%rsp)
movsd  %xmm4,0x8(%rsp)
call   1030 <Dist2D@plt>
movsd  0x8(%rsp),%xmm1
subsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1160 <Dist3D+0x40>
sqrtsd %xmm0,%xmm0
add    $0x18,%rsp
ret
add    $0x18,%rsp
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @Dist3D(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%15 = load double, double* %7
%16 = load double, double* %8
%17 = load double, double* %9
%18 = load double, double* %10
%19 = call double @Dist2D(double %15, double %16, double %17, double %18)
store double %19, double* %13
%20 = load double, double* %11
%21 = load double, double* %12
%22 = fsub double %20, %21
store double %22, double* %14
%23 = load double, double* %13
%24 = load double, double* %13
%25 = load double, double* %14
%26 = load double, double* %14
%27 = fmul double %25, %26
%28 = call double @llvm.fmuladd.f64(double %23, double %24, double %27)
%29 = call double @sqrt(double %28)
ret double %29
}

LLVM IR (-O2):
define double @Dist3D(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call double @Dist2D(double %0, double %1, double %2, double %3)
%8 = fsub double %4, %5
%9 = fmul double %8, %8
%10 = tail call double @llvm.fmuladd.f64(double %7, double %7, double %9)
%11 = tail call double @sqrt(double %10)
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x3e() {
  Assert_real((isgraph(62)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              315, ("isgraph should be 1 for >"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x3e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x13b,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x3e>:
push   %rax
mov    $0x3e,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x13b,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for >\00"
define void @t_isgraph_0x3e() {
%1 = call i32 @isgraph(i32 62)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for >\00"
define void @t_isgraph_0x3e() {
%1 = tail call i32 @isgraph(i32 62)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_socket_drain_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_socket@%p::drain (rtpp_socket_drain) is invoked after "
          "destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_socket_drain_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_socket_drain_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [79 x i8] c"Method rtpp_socket@%p::drain (rtpp_socket_drain) is invoked after destruction\0A\00"
define void @rtpp_socket_drain_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [79 x i8] c"Method rtpp_socket@%p::drain (rtpp_socket_drain) is invoked after destruction\0A\00"
define void @rtpp_socket_drain_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ inportb(int);
int /*<<< orphan*/ outportb(int, int);
extern void ATTEndReads(void) {
  inportb(0x3DA);
  outportb(0x3C0, 0x20);
}


x86 assembly (clang, -O0):
<ATTEndReads>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3da,%edi
call   1030 <inportb@plt>
mov    $0x3c0,%edi
mov    $0x20,%esi
call   1040 <outportb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ATTEndReads>:
push   %rax
mov    $0x3da,%edi
call   1030 <inportb@plt>
mov    $0x3c0,%edi
mov    $0x20,%esi
pop    %rax
jmp    1040 <outportb@plt>

LLVM IR (-O0):
define void @ATTEndReads() {
%1 = call i32 @inportb(i32 986)
%2 = call i32 @outportb(i32 960, i32 32)
ret void
}

LLVM IR (-O2):
define void @ATTEndReads() {
%1 = tail call i32 @inportb(i32 986)
%2 = tail call i32 @outportb(i32 960, i32 32)
ret void
}
void init_md(void) {}


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

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

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

LLVM IR (-O2):
define void @init_md() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIZE_MAX;
char *strncat(char *, char const *, int /*<<< orphan*/);
char *strcat(char *s1, const char *s2) { return strncat(s1, s2, SIZE_MAX); }


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

x86 assembly (clang, -O2):
<strcat>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <strncat@plt>

LLVM IR (-O0):
@SIZE_MAX = global i32 0
define i8* @strcat(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 i32, i32* @SIZE_MAX
%8 = call i8* @strncat(i8* %5, i8* %6, i32 %7)
ret i8* %8
}

LLVM IR (-O2):
@SIZE_MAX = global i32 0
define i8* @strcat(i8* %0, i8* %1) {
%3 = load i32, i32* @SIZE_MAX
%4 = tail call i8* @strncat(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
__attribute__((always_)) void outl_local(unsigned int value, int port) {
  __asm__ __volatile__("out"
                       "l"
                       " %"
                       ""
                       "0, %w1"
                       :
                       : "a"(value), "Nd"(port));
}


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

x86 assembly (clang, -O2):
<outl_local>:
mov    %esi,%edx
mov    %edi,%eax
out    %eax,(%dx)
ret

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

LLVM IR (-O2):
define void @outl_local(i32 %0, i32 %1) {
tail call void asm sideeffect "outl $0, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  void *p = realloc(ptr, size);
  if (p == NULL) {
    perror("");
    exit(EXIT_FAILURE);
  }
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1176 <xrealloc+0x46>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1030 <realloc@plt>
test   %rax,%rax
je     113d <xrealloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@EXIT_FAILURE = global i32 0
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@EXIT_FAILURE = global i32 0
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ uwsgi_envdir(char *);
void uwsgi_opt_envdir(char *opt, char *value, void *foobar) {
  uwsgi_envdir(value);
}


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

x86 assembly (clang, -O2):
<uwsgi_opt_envdir>:
mov    %rsi,%rdi
jmp    1030 <uwsgi_envdir@plt>

LLVM IR (-O0):
define void @uwsgi_opt_envdir(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = call i32 @uwsgi_envdir(i8* %7)
ret void
}

LLVM IR (-O2):
define void @uwsgi_opt_envdir(i8* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @uwsgi_envdir(i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ ceil(double);
int32_t convert_coord(double x, double z) {
  x *= z;
  if (x < -0x2000000)
    x = -0x2000000;
  if (x > 0x1ffffff)
    x = 0x1ffffff;
  return ceil(x);
}


x86 assembly (clang, -O0):
<convert_coord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xec7(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1151 <convert_coord+0x41>
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1175 <convert_coord+0x65>
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ceil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_coord>:
mulsd  %xmm1,%xmm0
movsd  0xee4(%rip),%xmm1
maxsd  %xmm0,%xmm1
movsd  0xee0(%rip),%xmm0
minsd  %xmm1,%xmm0
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @convert_coord(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fmul double %6, %5
store double %7, double* %3
%8 = load double, double* %3
%9 = fcmp olt double %8, 0xC180000000000000
br i1 %9, label %10, label %11
10: ; preds = %2
store double 0xC180000000000000, double* %3
br label %11
11: ; preds = %10, %2
%12 = load double, double* %3
%13 = fcmp ogt double %12, 0x417FFFFFF0000000
br i1 %13, label %14, label %15
14: ; preds = %11
store double 0x417FFFFFF0000000, double* %3
br label %15
15: ; preds = %14, %11
%16 = load double, double* %3
%17 = call i32 @ceil(double %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @convert_coord(double %0, double %1) {
%3 = fmul double %0, %1
%4 = fcmp olt double %3, 0xC180000000000000
%5 = select i1 %4, double 0xC180000000000000, double %3
%6 = fcmp ogt double %5, 0x417FFFFFF0000000
%7 = select i1 %6, double 0x417FFFFFF0000000, double %5
%8 = tail call i32 @ceil(double %7)
ret i32 %8
}
/* Variables and functions */
char *__strtok_r(char *, char const *, char **);
char *strtok(char *s, const char *delim) {
  static char *last;
  return (__strtok_r(s, delim, &last));
}


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

x86 assembly (clang, -O2):
<strtok>:
lea    0x2f19(%rip),%rdx
jmp    1030 <__strtok_r@plt>

LLVM IR (-O0):
@strtok.last = internal global i8* null
define i8* @strtok(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @__strtok_r(i8* %5, i8* %6, i8** @strtok.last)
ret i8* %7
}

LLVM IR (-O2):
@strtok.last = internal global i8* null
define i8* @strtok(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @__strtok_r(i8* %0, i8* %1, i8** @strtok.last)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ wait1Msec(int);
void flipper_wait() { wait1Msec(1000); }


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

x86 assembly (clang, -O2):
<flipper_wait>:
mov    $0x3e8,%edi
jmp    1030 <wait1Msec@plt>

LLVM IR (-O0):
define void @flipper_wait() {
%1 = call i32 @wait1Msec(i32 1000)
ret void
}

LLVM IR (-O2):
define void @flipper_wait() {
%1 = tail call i32 @wait1Msec(i32 1000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const);
void show(const char *buf, size_t len) {
  size_t i;
  for (i = 0; i < len; ++i)
    printf(" 0x%02hhx", buf[i]);
}


x86 assembly (clang, -O0):
<show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115f <show+0x4f>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
lea    0xebb(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <show+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1146 <show+0x36>
mov    %rsi,%r12
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <show+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c" 0x%02hhx\00"
define void @show(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %16, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds i8, i8* %11, i64 %12
%14 = load i8, i8* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %14)
br label %16
16: ; preds = %10
%17 = load i64, i64* %5
%18 = add i64 %17, 1
store i64 %18, i64* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c" 0x%02hhx\00"
define void @show(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
void draw_3d_axes() {}


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

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

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

LLVM IR (-O2):
define void @draw_3d_axes() {
ret void
}
__attribute__((unused)) char *strcpy(char *dst, const char *src) {
  char *ret = dst;
  while ((*dst++ = *src++))
    ;
  return ret;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool LCDRasterEnabled(uint32_t ui32Base) {
  ;
  return (((*((volatile uint32_t *)(ui32Base + 0x00000028))) & 0x00000001)
              ? true
              : false);
}


x86 assembly (clang, -O0):
<LCDRasterEnabled>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x28,%eax
cltq
mov    (%rax),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDRasterEnabled>:
movslq %edi,%rax
mov    0x28(%rax),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @LCDRasterEnabled(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 40
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @LCDRasterEnabled(i32 %0) {
%2 = add nsw i32 %0, 40
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 1
ret i32 %6
}
/* Variables and functions */
float __infer_nondet_float();
float erfcf(float x) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<erfcf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @erfcf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @erfcf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool log_sense_subpage_format(uint8_t *data) { return data[0] & 0x40; }


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

x86 assembly (clang, -O2):
<log_sense_subpage_format>:
mov    (%rdi),%eax
and    $0x40,%eax
ret

LLVM IR (-O0):
define i32 @log_sense_subpage_format(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = and i32 %5, 64
ret i32 %6
}

LLVM IR (-O2):
define i32 @log_sense_subpage_format(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 64
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t __dpl_msize32(void *ptr) {
  int32_t *p = (int32_t *)ptr;
  if (p) {
    p--;
    if (!p) {
    }
  } else {
  }
  return p[0];
}


x86 assembly (clang, -O0):
<__dpl_msize32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113c <__dpl_msize32+0x3c>
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <__dpl_msize32+0x37>
jmp    1137 <__dpl_msize32+0x37>
jmp    1141 <__dpl_msize32+0x41>
jmp    1141 <__dpl_msize32+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dpl_msize32>:
mov    -0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @__dpl_msize32(i8* %0) {
%2 = icmp ne i8* %0, null
tail call void @llvm.assume(i1 %2)
%3 = getelementptr inbounds i8, i8* %0, i64 -4
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}
void ptr_swap(double *pa, double *pb) {
  double temp = *pa;
  *pa = *pb;
  *pb = temp;
}


x86 assembly (clang, -O0):
<ptr_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_swap>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movsd  %xmm1,(%rdi)
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @ptr_swap(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double, double* %6
store double %7, double* %5
%8 = load double*, double** %4
%9 = load double, double* %8
%10 = load double*, double** %3
store double %9, double* %10
%11 = load double, double* %5
%12 = load double*, double** %4
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @ptr_swap(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
store double %4, double* %0
store double %3, double* %1
ret void
}
/* Variables and functions */
void *malloc(unsigned long);
void *Xalloc(unsigned long amount) {
  if (amount == 0)
    amount = 1;
  return malloc(amount);
}


x86 assembly (clang, -O0):
<Xalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112f <Xalloc+0x1f>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xalloc>:
test   %rdi,%rdi
mov    $0x1,%eax
cmove  %rax,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @Xalloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i64 1, i64* %2
br label %6
6: ; preds = %5, %1
%7 = load i64, i64* %2
%8 = call i8* @malloc(i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @Xalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 1, i64 %0
%4 = tail call i8* @malloc(i64 %3)
ret i8* %4
}
void serializer_write_wchar(char *dest, int *pointer, char value) {
  dest[(*pointer)] = value;
  (*pointer) += 2;
}


x86 assembly (clang, -O0):
<serializer_write_wchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<serializer_write_wchar>:
movslq (%rsi),%rax
mov    %dl,(%rdi,%rax,1)
addl   $0x2,(%rsi)
ret

LLVM IR (-O0):
define void @serializer_write_wchar(i8* %0, i32* %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
store i8 %7, i8* %12
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 2
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @serializer_write_wchar(i8* nocapture writeonly %0, i32* nocapture %1, i8 signext %2) {
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %2, i8* %6
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 2
store i32 %8, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, short);
int main() {
  unsigned int uid = 0xabcd0000;
  printf("full=%u narrowed=%hd\n", uid, (short)uid);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xabcd0000,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%eax
lea    0xecd(%rip),%rdi
movswl %ax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"full=%u narrowed=%hd\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 -1412628480, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i16
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3, i16 signext %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"full=%u narrowed=%hd\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 -1412628480, i16 signext 0)
ret i32 0
}
void U_EMRCLOSEFIGURE_print(const char *contents) { (void)(contents); }


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

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

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

LLVM IR (-O2):
define void @U_EMRCLOSEFIGURE_print(i8* nocapture %0) {
ret void
}
void asm_clear_bit(int nr, volatile unsigned long *addr) {
  __asm__ __volatile__("btrl %1,%0"
                       : "=m"((*(volatile long *)addr))
                       : "Ir"(nr));
}


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

x86 assembly (clang, -O2):
<asm_clear_bit>:
btr    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @asm_clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i32, i32* %3
ret void
}

LLVM IR (-O2):
define void @asm_clear_bit(i32 %0, i64* %1) {
tail call void asm sideeffect "btrl $1,$0", "=*m,Ir,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glPopName();
int /*<<< orphan*/ printf(char *, ...);
void trace_glPopName(void) {
  printf("%20s(", "glPopName");
  printf(");\n");
  glPopName();
}


x86 assembly (clang, -O0):
<trace_glPopName>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <glPopName@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_glPopName>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glPopName@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%20s(\00"
@.str.1 = [10 x i8] c"glPopName\00"
@.str.2 = [4 x i8] c");\0A\00"
define void @trace_glPopName() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (...) @glPopName()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%20s(\00"
@.str.1 = [10 x i8] c"glPopName\00"
@str = [3 x i8] c");\00"
define void @trace_glPopName() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @glPopName()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x25() {
  Assert_real((ispunct(37)),
              "/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_ispunct.c",
              190, ("ispunct should be 1 for %"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x25>:
push   %rbp
mov    %rsp,%rbp
mov    $0x25,%edi
call   1030 <ispunct@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xbe,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x25>:
push   %rax
mov    $0x25,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xbe,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for %\00"
define void @t_ispunct_0x25() {
%1 = call i32 @ispunct(i32 37)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for %\00"
define void @t_ispunct_0x25() {
%1 = tail call i32 @ispunct(i32 37)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ complainx(char *, char const *);
size_t doread(char const *, int, void *, size_t);
int /*<<< orphan*/ exit(int);
void doexactread(const char *path, int fd, void *buf, size_t len) {
  size_t result;
  result = doread(path, fd, buf, len);
  if (result != len) {
    complainx("%s: read: short count", path);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<doexactread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <doread@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1187 <doexactread+0x57>
mov    -0x8(%rbp),%rsi
lea    0xe88(%rip),%rdi
call   1030 <complainx@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doexactread>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdi,%r14
call   1040 <doread@plt>
cmp    %rbx,%rax
jne    114c <doexactread+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xead(%rip),%rdi
mov    %r14,%rsi
call   1030 <complainx@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"%s: read: short count\00"
define void @doexactread(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = call i64 @doread(i8* %10, i32 %11, i8* %12, i64 %13)
store i64 %14, i64* %9
%15 = load i64, i64* %9
%16 = load i64, i64* %8
%17 = icmp ne i64 %15, %16
br i1 %17, label %18, label %22
18: ; preds = %4
%19 = load i8*, i8** %5
%20 = call i32 @complainx(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %19)
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%s: read: short count\00"
define void @doexactread(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = tail call i64 @doread(i8* %0, i32 %1, i8* %2, i64 %3)
%6 = icmp eq i64 %5, %3
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 @complainx(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %4
ret void
}
int test_imm_6Fint8_reg(signed char val) {
  return ((val) & (0x6F << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_6Fint8_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, 111
%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_6Fint8_reg(i8 signext %0) {
%2 = and i8 %0, 111
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void g_main_context_add_poll() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_add_poll() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void raext2048() {
  printf("\nChanging Read Ahead Cache size for External sdcard to 2048kb\n");
  char buf[256];
  sprintf(buf, "/system/bin/sh -c %s",
          "'echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb'");
  system(buf);
}


x86 assembly (clang, -O0):
<raext2048>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    -0x100(%rbp),%rdi
lea    0xeea(%rip),%rsi
lea    0xef8(%rip),%rdx
call   1050 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raext2048>:
push   %rbx
sub    $0x100,%rsp
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [63 x i8] c"\0AChanging Read Ahead Cache size for External sdcard to 2048kb\0A\00"
@.str.1 = [21 x i8] c"/system/bin/sh -c %s\00"
@.str.2 = [53 x i8] c"'echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb'\00"
define void @raext2048() {
%1 = alloca [256 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @system(i8* %5)
ret void
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"/system/bin/sh -c %s\00"
@.str.2 = [53 x i8] c"'echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb'\00"
@str = [62 x i8] c"\0AChanging Read Ahead Cache size for External sdcard to 2048kb\00"
define void @raext2048() {
%1 = alloca [256 x i8]
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
scalar_t__ less_than(int, int);
void l1_symbolic_widened_Good(int n) {
  int a[n];
  for (int i = n; less_than(i, n); i++) {
    a[i] = 0;
  }
}


x86 assembly (clang, -O0):
<l1_symbolic_widened_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <less_than@plt>
cmp    $0x0,%rax
je     117a <l1_symbolic_widened_Good+0x6a>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1148 <l1_symbolic_widened_Good+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l1_symbolic_widened_Good>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <less_than@plt>
add    $0x1,%ebp
test   %rax,%rax
jne    1120 <l1_symbolic_widened_Good+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @l1_symbolic_widened_Good(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %6, %2 ]
%4 = tail call i64 @less_than(i32 %3, i32 %0)
%5 = icmp eq i64 %4, 0
%6 = add nsw i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret void
}