xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xa2() {
  Assert_real((isxdigit(162) == 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_isxdigit.c",
              815, ("isxdigit should be 0 for 0xa2"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xa2>:
push   %rax
mov    $0xa2,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x32f,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xa2\00"
define void @t_isxdigit_0xa2() {
%1 = call i64 @isxdigit(i32 162)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 815, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xa2\00"
define void @t_isxdigit_0xa2() {
%1 = tail call i64 @isxdigit(i32 162)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 815, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_CC_SFD_PIN() { set_io_bit(-4, 3); }


x86 assembly (clang, -O0):
<TOSH_SET_CC_SFD_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffc,%edi
mov    $0x3,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_CC_SFD_PIN>:
mov    $0xfffffffc,%edi
mov    $0x3,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_CC_SFD_PIN() {
%1 = call i32 @set_io_bit(i32 -4, i32 3)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_CC_SFD_PIN() {
%1 = tail call i32 @set_io_bit(i32 -4, i32 3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ INT_MAX;
int __simple_vsnprintf(char *, int /*<<< orphan*/, char const *,
                       int /*<<< orphan*/);
int __simple_vsprintf(char *str, const char *fmt, va_list args) {
  return __simple_vsnprintf(str, INT_MAX, fmt, args);
}


x86 assembly (clang, -O0):
<__simple_vsprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <__simple_vsnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__simple_vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    0x2ecc(%rip),%rax
mov    (%rax),%esi
jmp    1030 <__simple_vsnprintf@plt>

LLVM IR (-O0):
@INT_MAX = global i32 0
define i32 @__simple_vsprintf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* @INT_MAX
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @__simple_vsnprintf(i8* %7, i32 %8, i8* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define i32 @__simple_vsprintf(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @INT_MAX
%5 = tail call i32 @__simple_vsnprintf(i8* %0, i32 %4, i8* %1, i32 %2)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
GLint glcNewFontFromMaster(GLint font, GLint master) { return 0; }


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

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

LLVM IR (-O0):
define i32 @glcNewFontFromMaster(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 @glcNewFontFromMaster(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int Scl_ConGetOutReq_(int /*<<< orphan*/, int);
int /*<<< orphan*/ Scl_ConReadMan();
int Scl_ConGetOutReq(int i) { return Scl_ConGetOutReq_(Scl_ConReadMan(), i); }


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

x86 assembly (clang, -O2):
<Scl_ConGetOutReq>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <Scl_ConReadMan@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <Scl_ConGetOutReq_@plt>

LLVM IR (-O0):
define i32 @Scl_ConGetOutReq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @Scl_ConReadMan()
%4 = load i32, i32* %2
%5 = call i32 @Scl_ConGetOutReq_(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @Scl_ConGetOutReq(i32 %0) {
%2 = tail call i32 (...) @Scl_ConReadMan()
%3 = tail call i32 @Scl_ConGetOutReq_(i32 %2, i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
void draw_back(int frame, char *image) {
  (void)frame;
  memset(image, '.', 80 * 8);
}


x86 assembly (clang, -O0):
<draw_back>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
mov    $0x280,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_back>:
mov    %rsi,%rdi
mov    $0x2e,%esi
mov    $0x280,%edx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @draw_back(i32 %0, i8* %1) {
%3 = tail call i32 @memset(i8* %1, i8 signext 46, i32 640)
ret void
}
int f_main() {
  tcc_backtrace("hello from %s() / %s:%d", __FUNCTION__,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/mirror/tinycc/refs/heads/"
                "mob/tests/tests2/113_btdll.c",
                31);
  return 0;
}


x86 assembly (clang, -O0):
<f_main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef6(%rip),%rsi
lea    0xef6(%rip),%rdx
mov    $0x1f,%ecx
mov    $0x0,%al
call   1030 <tcc_backtrace@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef9(%rip),%rsi
lea    0xef9(%rip),%rdx
mov    $0x1f,%ecx
xor    %eax,%eax
call   1030 <tcc_backtrace@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"hello from %s() / %s:%d\00"
@__FUNCTION__.f_main = [7 x i8] c"f_main\00"
@.str.1 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mirror/tinycc/refs/heads/mob/tests/tests2/113_btdll.c\00"
define i32 @f_main() {
%1 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @tcc_backtrace to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.f_main, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0), i32 31)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"hello from %s() / %s:%d\00"
@__FUNCTION__.f_main = [7 x i8] c"f_main\00"
@.str.1 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mirror/tinycc/refs/heads/mob/tests/tests2/113_btdll.c\00"
define i32 @f_main() {
%1 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @tcc_backtrace to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.f_main, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0), i32 31)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpackhi_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_unpackhi_pi32(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_unpackhi_pi32@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpackhi_pi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
float fabsf(float);
float fabs32(float x) { return fabsf(x); }


x86 assembly (clang, -O0):
<fabs32>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs32>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @fabs32(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fabs.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @fabs32(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
ret float %2
}
/* Variables and functions */
int cparam(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[], char *envp[]) {
  int o0;
  o0 = cparam(argc - 3, 2);
  printf("Result is %d\n", o0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x3,%edi
mov    $0x2,%esi
call   1030 <cparam@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
add    $0xfffffffd,%edi
mov    $0x2,%esi
call   1030 <cparam@plt>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Result is %d\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%9 = load i32, i32* %5
%10 = sub nsw i32 %9, 3
%11 = call i32 @cparam(i32 %10, i32 2)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Result is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = add nsw i32 %0, -3
%5 = tail call i32 @cparam(i32 %4, i32 2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
double type1(int base, int height) {
  double area = (base * height) / 2;
  return area;
}


x86 assembly (clang, -O0):
<type1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<type1>:
imul   %esi,%edi
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @type1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = sdiv i32 %8, 2
%10 = sitofp i32 %9 to double
store double %10, double* %5
%11 = load double, double* %5
ret double %11
}

LLVM IR (-O2):
define double @type1(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = sdiv i32 %3, 2
%5 = sitofp i32 %4 to double
ret double %5
}
void INT_Excep_SCI10_TXI10(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI10_TXI10() {
ret void
}
zysld() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @zysld() {
ret i32 1
}
void abcd2efghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @abcd2efghijklmnopqrstuvwxzy() {
ret void
}
int Sleef_ilogb(double x) { return __builtin_ilogb(x); }


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

x86 assembly (clang, -O2):
<Sleef_ilogb>:
jmp    1030 <ilogb@plt>

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

LLVM IR (-O2):
define i32 @Sleef_ilogb(double %0) {
%2 = tail call i32 @ilogb(double %0)
ret i32 %2
}
void AR30ToARGB() {}


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

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

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

LLVM IR (-O2):
define void @AR30ToARGB() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gridNamePtr(int);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
void gridName(int gridtype, char *gridname) {
  strcpy(gridname, gridNamePtr(gridtype));
}


x86 assembly (clang, -O0):
<gridName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <gridNamePtr@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gridName>:
push   %rbx
mov    %rsi,%rbx
call   1040 <gridNamePtr@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
define void @gridName(i32 %0, i8* %1) {
%3 = tail call i32 @gridNamePtr(i32 %0)
%4 = tail call i32 @strcpy(i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_current_time();
int /*<<< orphan*/ print_process_info();
int /*<<< orphan*/ printf(char *, ...);
void print_exec_info(char *exec_name) {
  printf("Preparing to hand control to %s.\n", exec_name);
  print_current_time();
  print_process_info();
  printf("\n");
}


x86 assembly (clang, -O0):
<print_exec_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <print_current_time@plt>
mov    $0x0,%al
call   1040 <print_process_info@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_exec_info>:
push   %rax
mov    %rdi,%rsi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <print_current_time@plt>
xor    %eax,%eax
call   1050 <print_process_info@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Preparing to hand control to %s.\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_exec_info(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @print_current_time()
%6 = call i32 (...) @print_process_info()
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Preparing to hand control to %s.\0A\00"
define void @print_exec_info(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @print_current_time()
%4 = tail call i32 (...) @print_process_info()
%5 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ toswap;

/* Variables and functions */
int /*<<< orphan*/ CByteSwap(unsigned char *, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  unsigned short toswap = 0x4142;
  CByteSwap((unsigned char *)&toswap, sizeof(toswap));
  printf("%s ", "Output:");
  printf("%hX", toswap);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x4142,-0x6(%rbp)
lea    -0x6(%rbp),%rdi
mov    $0x2,%esi
call   1050 <CByteSwap@plt>
lea    0xea6(%rip),%rdi
lea    0xea3(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movzwl -0x6(%rbp),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x4142,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1050 <CByteSwap@plt>
lea    0xeb2(%rip),%rdi
lea    0xeaf(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movzwl 0x6(%rsp),%esi
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@.str.1 = [8 x i8] c"Output:\00"
@.str.2 = [4 x i8] c"%hX\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
store i16 16706, i16* %2
%3 = bitcast i16* %2 to i8*
%4 = call i32 @CByteSwap(i8* %3, i32 2)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
@.str.1 = [8 x i8] c"Output:\00"
@.str.2 = [4 x i8] c"%hX\00"
define i32 @main() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
store i16 16706, i16* %1
%3 = call i32 @CByteSwap(i8* %2, i32 2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = load i16, i16* %1
%6 = zext i16 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @getchar()
ret i32 0
}
void INT_Excep_TPU4_TCI4U(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU4_TCI4U() {
ret void
}
int gcd_s_loop(int a, int b) {
  int c;
  if (a < 0)
    a = -a;
  if (b < 0)
    b = -b;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}


x86 assembly (clang, -O0):
<gcd_s_loop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111c <gcd_s_loop+0x1c>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    112e <gcd_s_loop+0x2e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <gcd_s_loop+0x33>
cmpl   $0x0,-0x4(%rbp)
je     1158 <gcd_s_loop+0x58>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <gcd_s_loop+0x33>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd_s_loop>:
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
test   %edi,%edi
je     112d <gcd_s_loop+0x2d>
mov    %edi,%edx
neg    %edx
cmovs  %edi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1120 <gcd_s_loop+0x20>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd_s_loop(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %3
%10 = sub nsw i32 0, %9
store i32 %10, i32* %3
br label %11
11: ; preds = %8, %2
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %4
%16 = sub nsw i32 0, %15
store i32 %16, i32* %4
br label %17
17: ; preds = %14, %11
br label %18
18: ; preds = %21, %17
%19 = load i32, i32* %3
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = load i32, i32* %3
store i32 %22, i32* %5
%23 = load i32, i32* %4
%24 = load i32, i32* %3
%25 = srem i32 %23, %24
store i32 %25, i32* %3
%26 = load i32, i32* %5
store i32 %26, i32* %4
br label %18
27: ; preds = %18
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @gcd_s_loop(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%4 = icmp eq i32 %0, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
br label %7
7: ; preds = %5, %7
%8 = phi i32 [ %10, %7 ], [ %6, %5 ]
%9 = phi i32 [ %8, %7 ], [ %3, %5 ]
%10 = srem i32 %9, %8
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
%13 = phi i32 [ %3, %2 ], [ %8, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ remove(char *);
size_t strlen(char *);
void removeKeyTableFile(char *TempFileName) {
  if (TempFileName) {
    size_t len;
    len = strlen(TempFileName);
    remove(TempFileName);
    if (len > 4) {
      len -= 4;
      TempFileName[len] = '\0';
      remove(TempFileName);
    }
    free(TempFileName);
  }
}


x86 assembly (clang, -O0):
<removeKeyTableFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1192 <removeKeyTableFile+0x62>
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <remove@plt>
cmpq   $0x4,-0x10(%rbp)
jbe    1189 <removeKeyTableFile+0x59>
mov    -0x10(%rbp),%rax
sub    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1040 <remove@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeKeyTableFile>:
test   %rdi,%rdi
je     116f <removeKeyTableFile+0x3f>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <strlen@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <remove@plt>
cmp    $0x5,%r14
jb     1160 <removeKeyTableFile+0x30>
movb   $0x0,-0x4(%r14,%rbx,1)
mov    %rbx,%rdi
call   1040 <remove@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @removeKeyTableFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %24
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %3
%9 = load i8*, i8** %2
%10 = call i32 @remove(i8* %9)
%11 = load i64, i64* %3
%12 = icmp ugt i64 %11, 4
br i1 %12, label %13, label %21
13: ; preds = %6
%14 = load i64, i64* %3
%15 = sub i64 %14, 4
store i64 %15, i64* %3
%16 = load i8*, i8** %2
%17 = load i64, i64* %3
%18 = getelementptr inbounds i8, i8* %16, i64 %17
store i8 0, i8* %18
%19 = load i8*, i8** %2
%20 = call i32 @remove(i8* %19)
br label %21
21: ; preds = %13, %6
%22 = load i8*, i8** %2
%23 = call i32 @free(i8* %22)
br label %24
24: ; preds = %21, %1
ret void
}

LLVM IR (-O2):
define void @removeKeyTableFile(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = tail call i32 @remove(i8* %0)
%6 = icmp ugt i64 %4, 4
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = add i64 %4, -4
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
%10 = tail call i32 @remove(i8* %0)
br label %11
11: ; preds = %7, %3
%12 = tail call i32 @free(i8* %0)
br label %13
13: ; preds = %11, %1
ret void
}
char *ft_strcpy(char *dest, char *src) {
  int symb_it;
  symb_it = 0;
  while (src[symb_it]) {
    dest[symb_it] = src[symb_it];
    symb_it++;
  }
  dest[symb_it] = 0;
  return (dest);
}


x86 assembly (clang, -O0):
<ft_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1149 <ft_strcpy+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <ft_strcpy+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1127 <ft_strcpy+0x27>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <ft_strcpy+0x10>
mov    %edx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret
xor    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @ft_strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ DATA_axon();
int /*<<< orphan*/ FUNC_axon();
int /*<<< orphan*/ LibraryHeader(char *, char *, char *);
LIBRARY_axon() {
  LibraryHeader("Axon", "2-89", "M.Wilson Caltech");
  DATA_axon();
  FUNC_axon();
}


x86 assembly (clang, -O0):
<LIBRARY_axon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebf(%rip),%rsi
lea    0xebd(%rip),%rdx
call   1040 <LibraryHeader@plt>
mov    $0x0,%al
call   1030 <DATA_axon@plt>
mov    $0x0,%al
call   1050 <FUNC_axon@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_axon>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec6(%rip),%rsi
lea    0xec4(%rip),%rdx
call   1040 <LibraryHeader@plt>
xor    %eax,%eax
call   1030 <DATA_axon@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <FUNC_axon@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Axon\00"
@.str.1 = [5 x i8] c"2-89\00"
@.str.2 = [17 x i8] c"M.Wilson Caltech\00"
define i32 @LIBRARY_axon() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (...) @DATA_axon()
%4 = call i32 (...) @FUNC_axon()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [5 x i8] c"Axon\00"
@.str.1 = [5 x i8] c"2-89\00"
@.str.2 = [17 x i8] c"M.Wilson Caltech\00"
define i32 @LIBRARY_axon() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_axon()
%3 = tail call i32 (...) @FUNC_axon()
ret i32 undef
}
void XUngrabKey() {}


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

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

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

LLVM IR (-O2):
define void @XUngrabKey() {
ret void
}
/* Type definitions */
struct dirent {
  char *d_name;
};

/* Variables and functions */
int FRqTestName(const struct dirent *TmpEnt) {
  return (TmpEnt->d_name[0] != '.');
}


x86 assembly (clang, -O0):
<FRqTestName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FRqTestName>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x2e,(%rcx)
setne  %al
ret

LLVM IR (-O0):
%struct.dirent = type { i8* }
define i32 @FRqTestName(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 46
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.dirent = type { i8* }
define i32 @FRqTestName(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 46
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ countSort(int *, int, int);
int maximo(int *, int);
void radixSort(int *vetor, int tam) {
  int m = maximo(vetor, tam);
  for (int exp = 1; m / exp > 0; exp *= 10)
    countSort(vetor, tam, exp);
}


x86 assembly (clang, -O0):
<radixSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <maximo@plt>
mov    %eax,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x14(%rbp)
cmp    $0x0,%eax
jle    1170 <radixSort+0x50>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <countSort@plt>
imul   $0xa,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <radixSort+0x25>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radixSort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
call   1040 <maximo@plt>
test   %eax,%eax
jle    115b <radixSort+0x3b>
mov    %eax,%ebp
mov    $0x1,%ebx
nopl   (%rax)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <countSort@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%ebx
mov    %ebp,%eax
cltd
idiv   %ebx
test   %eax,%eax
jg     1140 <radixSort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @radixSort(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = call i32 @maximo(i32* %7, i32 %8)
store i32 %9, i32* %5
store i32 1, i32* %6
br label %10
10: ; preds = %20, %2
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sdiv i32 %11, %12
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %23
15: ; preds = %10
%16 = load i32*, i32** %3
%17 = load i32, i32* %4
%18 = load i32, i32* %6
%19 = call i32 @countSort(i32* %16, i32 %17, i32 %18)
br label %20
20: ; preds = %15
%21 = load i32, i32* %6
%22 = mul nsw i32 %21, 10
store i32 %22, i32* %6
br label %10
23: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @radixSort(i32* %0, i32 %1) {
%3 = tail call i32 @maximo(i32* %0, i32 %1)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %2
ret void
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ 1, %2 ]
%8 = tail call i32 @countSort(i32* %0, i32 %1, i32 %7)
%9 = mul nsw i32 %7, 10
%10 = sdiv i32 %3, %9
%11 = icmp sgt i32 %10, 0
br i1 %11, label %6, label %5
}
/* Variables and functions */
void *sub1(void *arg) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @sub1(i8* nocapture readnone %0) {
ret i8* null
}
unsigned xrop3_56_1_0(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;
  unsigned stk3;
  stk3 = D | T;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_56_1_0>:
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    -0x8(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xrop3_56_1_0(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 %4, -1
%8 = and i32 %6, %7
%9 = or i32 %8, %3
ret i32 %9
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int mpl3115ReadTemp();
uint16_t mpl3115ReadTempF() { return mpl3115ReadTemp() * 9 / 5 + 32; }


x86 assembly (clang, -O0):
<mpl3115ReadTempF>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mpl3115ReadTemp@plt>
imul   $0x9,%eax,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
add    $0x20,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpl3115ReadTempF>:
push   %rax
xor    %eax,%eax
call   1030 <mpl3115ReadTemp@plt>
lea    (%rax,%rax,8),%eax
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
sar    $0x21,%rcx
shr    $0x3f,%rax
add    %ecx,%eax
add    $0x20,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mpl3115ReadTempF() {
%1 = call i32 (...) @mpl3115ReadTemp()
%2 = mul nsw i32 %1, 9
%3 = sdiv i32 %2, 5
%4 = add nsw i32 %3, 32
ret i32 %4
}

LLVM IR (-O2):
define i32 @mpl3115ReadTempF() {
%1 = tail call i32 (...) @mpl3115ReadTemp()
%2 = mul nsw i32 %1, 9
%3 = sdiv i32 %2, 5
%4 = add nsw i32 %3, 32
ret i32 %4
}
/* Variables and functions */
float floor(float);
float mod(float a, float b) { return a - b * floor(a / b); }


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movss  -0x10(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
push   %rax
movss  %xmm1,(%rsp)
movss  %xmm0,0x4(%rsp)
divss  %xmm1,%xmm0
call   1030 <floorf@plt>
mulss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @mod(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = load float, float* %3
%8 = load float, float* %4
%9 = fdiv float %7, %8
%10 = call float @floor(float %9)
%11 = fneg float %6
%12 = call float @llvm.fmuladd.f32(float %11, float %10, float %5)
ret float %12
}

LLVM IR (-O2):
define float @mod(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = tail call float @llvm.floor.f32(float %3)
%5 = fneg float %1
%6 = tail call float @llvm.fmuladd.f32(float %5, float %4, float %0)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printfunc(char *ware, char *pro, char *quali) {
  printf("Warehouse: %s\n", ware);
  printf("Product: %s\n", pro);
  printf("Qualifiers: %s\n", quali);
}


x86 assembly (clang, -O0):
<printfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printfunc>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Warehouse: %s\0A\00"
@.str.1 = [13 x i8] c"Product: %s\0A\00"
@.str.2 = [16 x i8] c"Qualifiers: %s\0A\00"
define void @printfunc(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** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %5
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %6
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Warehouse: %s\0A\00"
@.str.1 = [13 x i8] c"Product: %s\0A\00"
@.str.2 = [16 x i8] c"Qualifiers: %s\0A\00"
define void @printfunc(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ test_tpf_static32();
int main() {
  if (test_tpf_static32())
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_tpf_static32@plt>
cmp    $0x0,%rax
je     1147 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_tpf_static32@plt>
test   %rax,%rax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @test_tpf_static32()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
void RTStrCalcLatin1Len(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrCalcLatin1Len() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("USAGE:\n"
         "  dosctrl pipe_into_dosemu pipe_from_dosemu\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"USAGE:\0A dosctrl pipe_into_dosemu pipe_from_dosemu\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [51 x i8] c"USAGE:\0A dosctrl pipe_into_dosemu pipe_from_dosemu\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int round_up(int num, int mul) {
  int rem;
  if (mul == 0 || (rem = num % mul) == 0)
    return num;
  return (num < 0) ? num - mul - rem : num + mul - rem;
}


x86 assembly (clang, -O0):
<round_up>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1127 <round_up+0x27>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmp    $0x0,%edx
jne    1132 <round_up+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <round_up+0x5f>
cmpl   $0x0,-0x8(%rbp)
jge    114d <round_up+0x4d>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1159 <round_up+0x59>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_up>:
test   %esi,%esi
je     111c <round_up+0x1c>
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     111c <round_up+0x1c>
mov    %esi,%eax
neg    %eax
test   %edi,%edi
cmovns %esi,%eax
add    %edi,%eax
sub    %edx,%eax
mov    %eax,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @round_up(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = srem i32 %10, %11
store i32 %12, i32* %6
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9, %2
%15 = load i32, i32* %4
store i32 %15, i32* %3
br label %33
16: ; preds = %9
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %16
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = sub nsw i32 %20, %21
%23 = load i32, i32* %6
%24 = sub nsw i32 %22, %23
br label %31
25: ; preds = %16
%26 = load i32, i32* %4
%27 = load i32, i32* %5
%28 = add nsw i32 %26, %27
%29 = load i32, i32* %6
%30 = sub nsw i32 %28, %29
br label %31
31: ; preds = %25, %19
%32 = phi i32 [ %24, %19 ], [ %30, %25 ]
store i32 %32, i32* %3
br label %33
33: ; preds = %31, %14
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
define i32 @round_up(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = srem i32 %0, %1
%6 = icmp eq i32 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = icmp slt i32 %0, 0
%9 = sub i32 0, %1
%10 = select i1 %8, i32 %9, i32 %1
%11 = add i32 %10, %0
%12 = sub i32 %11, %5
br label %13
13: ; preds = %2, %4, %7
%14 = phi i32 [ %12, %7 ], [ %0, %4 ], [ %0, %2 ]
ret i32 %14
}
char main$simple_init$init(void) {
  char result;
  result = counter$init$init();
  return result;
}


x86 assembly (clang, -O0):
<main$simple_init$init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <counter$init$init@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @"main$simple_init$init"() {
%1 = alloca i8
%2 = call i32 (...) @"counter$init$init"()
%3 = trunc i32 %2 to i8
store i8 %3, i8* %1
%4 = load i8, i8* %1
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @"main$simple_init$init"() {
%1 = tail call i32 (...) @"counter$init$init"()
%2 = trunc i32 %1 to i8
ret i8 %2
}