xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ addFailure(char *, long, char const *);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
void assertImplementationInt_loop(int loop_cnt, int expected, int actual,
                                  long line, const char *file) {
  char buffer[32];
  sprintf(buffer, "loop_cnt: %d ... exp: %d ... was %d", loop_cnt, expected,
          actual);
  addFailure(buffer, line, file);
}


x86 assembly (clang, -O0):
<assertImplementationInt_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
lea    0xeb2(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <addFailure@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertImplementationInt_loop>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %r8,%r14
mov    %rcx,%rbx
mov    %edx,%r8d
mov    %esi,%ecx
mov    %edi,%edx
lea    0xec3(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
call   1040 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <addFailure@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [36 x i8] c"loop_cnt: %d ... exp: %d ... was %d\00"
define void @assertImplementationInt_loop(i32 %0, i32 %1, i32 %2, i64 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
%10 = alloca i8*
%11 = alloca [32 x i8]
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i64 %3, i64* %9
store i8* %4, i8** %10
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
%17 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%18 = load i64, i64* %9
%19 = load i8*, i8** %10
%20 = call i32 @addFailure(i8* %17, i64 %18, i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"loop_cnt: %d ... exp: %d ... was %d\00"
define void @assertImplementationInt_loop(i32 %0, i32 %1, i32 %2, i64 %3, i8* %4) {
%6 = alloca [32 x i8]
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%8 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
%9 = call i32 @addFailure(i8* %7, i64 %3, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RunAllTests();
int main(void) {
  RunAllTests();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @RunAllTests()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ comparisonTestdf(double, float);
int /*<<< orphan*/ printf(char *);
void comparisonOpsdf() {
  printf("double op float:\n");
  comparisonTestdf(1.0, 2.0f);
  comparisonTestdf(1.0, 1.0f);
  comparisonTestdf(2.0, 1.0f);
}


x86 assembly (clang, -O0):
<comparisonOpsdf>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
movsd  0xed0(%rip),%xmm0
movss  0xed4(%rip),%xmm1
call   1040 <comparisonTestdf@plt>
movsd  0xebb(%rip),%xmm0
movss  0xebb(%rip),%xmm1
call   1040 <comparisonTestdf@plt>
movsd  0xe9e(%rip),%xmm0
movss  0xea6(%rip),%xmm1
call   1040 <comparisonTestdf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparisonOpsdf>:
push   %rax
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
movsd  0xecb(%rip),%xmm0
movss  0xed3(%rip),%xmm1
call   1040 <comparisonTestdf@plt>
movss  0xeca(%rip),%xmm1
movsd  0xeae(%rip),%xmm0
call   1040 <comparisonTestdf@plt>
movsd  0xea9(%rip),%xmm0
movss  0xead(%rip),%xmm1
pop    %rax
jmp    1040 <comparisonTestdf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"double op float:\0A\00"
define void @comparisonOpsdf() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @comparisonTestdf(double 1.000000e+00, float 2.000000e+00)
%3 = call i32 @comparisonTestdf(double 1.000000e+00, float 1.000000e+00)
%4 = call i32 @comparisonTestdf(double 2.000000e+00, float 1.000000e+00)
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"double op float:\00"
define void @comparisonOpsdf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @comparisonTestdf(double 1.000000e+00, float 2.000000e+00)
%3 = tail call i32 @comparisonTestdf(double 1.000000e+00, float 1.000000e+00)
%4 = tail call i32 @comparisonTestdf(double 2.000000e+00, float 1.000000e+00)
ret void
}
void TimerIntClear(unsigned long ulBase, unsigned long ulIntFlags) {

  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000010))) = ~ulIntFlags;
}


x86 assembly (clang, -O0):
<TimerIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerIntClear>:
not    %rsi
mov    %rsi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @TimerIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 16
%9 = inttoptr i64 %8 to i64*
store volatile i64 %6, i64* %9
ret void
}

LLVM IR (-O2):
define void @TimerIntClear(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 16
%5 = inttoptr i64 %4 to i64*
store volatile i64 %3, i64* %5
ret void
}
long double fmodl(long double x, long double y) {
  long double res;
  asm("1:\tfprem\n\t"
      "fstsw   %%ax\n\t"
      "sahf\n\t"
      "jp      1b\n\t"
      "fstp    %%st(1)"
      : "=t"(res)
      : "0"(x), "u"(y)
      : "ax", "st(1)");
  return res;
}


x86 assembly (clang, -O0):
<fmodl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fprem
fstsw  %ax
sahf
jp     1118 <fmodl+0x18>
fstp   %st(1)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmodl>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fxch   %st(1)
fprem
fstsw  %ax
sahf
jp     110a <fmodl+0xa>
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @fmodl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%6 = load x86_fp80, x86_fp80* %3
%7 = load x86_fp80, x86_fp80* %4
%8 = call x86_fp80 asm "1:\09fprem\0A\09fstsw %ax\0A\09sahf\0A\09jp 1b\0A\09fstp %st(1)", "={st},0,{st(1)},~{ax},~{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %6, x86_fp80 %7)
store x86_fp80 %8, x86_fp80* %5
%9 = load x86_fp80, x86_fp80* %5
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @fmodl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 asm "1:\09fprem\0A\09fstsw %ax\0A\09sahf\0A\09jp 1b\0A\09fstp %st(1)", "={st},0,{st(1)},~{ax},~{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
void X509_NAME_set(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_NAME_set() {
ret void
}
void ff_hevc_put_hevc_bi_w_epel_hv6_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv6_10_sse4() {
ret void
}
int __attribute__((visibility("default"))) lib2fun(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lib2fun() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int);
void t_iscntrl_0x09() {
  Assert_real((iscntrl(9)),
              "/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_iscntrl.c",
              50, ("iscntrl should be 1 for 0x09"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x09>:
push   %rax
mov    $0x9,%edi
call   1030 <iscntrl@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x32,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x09\00"
define void @t_iscntrl_0x09() {
%1 = call i32 @iscntrl(i32 9)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x09\00"
define void @t_iscntrl_0x09() {
%1 = tail call i32 @iscntrl(i32 9)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dotest(int, int, int, int);
int main() {
  dotest(5, 7, 3848, 2940);
  dotest(2, 7, 3848, 907);
  dotest(3, 6, 3500, 1750);
  dotest(3, 6, 3501, 1750);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
mov    $0x7,%esi
mov    $0xf08,%edx
mov    $0xb7c,%ecx
call   1030 <dotest@plt>
mov    $0x2,%edi
mov    $0x7,%esi
mov    $0xf08,%edx
mov    $0x38b,%ecx
call   1030 <dotest@plt>
mov    $0x3,%edi
mov    $0x6,%esi
mov    $0xdac,%edx
mov    $0x6d6,%ecx
call   1030 <dotest@plt>
mov    $0x3,%edi
mov    $0x6,%esi
mov    $0xdad,%edx
mov    $0x6d6,%ecx
call   1030 <dotest@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x7,%esi
mov    $0xf08,%edx
mov    $0xb7c,%ecx
call   1030 <dotest@plt>
mov    $0x2,%edi
mov    $0x7,%esi
mov    $0xf08,%edx
mov    $0x38b,%ecx
call   1030 <dotest@plt>
mov    $0x3,%edi
mov    $0x6,%esi
mov    $0xdac,%edx
mov    $0x6d6,%ecx
call   1030 <dotest@plt>
mov    $0x3,%edi
mov    $0x6,%esi
mov    $0xdad,%edx
mov    $0x6d6,%ecx
call   1030 <dotest@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @dotest(i32 5, i32 7, i32 3848, i32 2940)
%2 = call i32 @dotest(i32 2, i32 7, i32 3848, i32 907)
%3 = call i32 @dotest(i32 3, i32 6, i32 3500, i32 1750)
%4 = call i32 @dotest(i32 3, i32 6, i32 3501, i32 1750)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @dotest(i32 5, i32 7, i32 3848, i32 2940)
%2 = tail call i32 @dotest(i32 2, i32 7, i32 3848, i32 907)
%3 = tail call i32 @dotest(i32 3, i32 6, i32 3500, i32 1750)
%4 = tail call i32 @dotest(i32 3, i32 6, i32 3501, i32 1750)
ret i32 0
}
void *rt_threadpool_workersync(void *voidparms) { return ((void *)0); }


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

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

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

LLVM IR (-O2):
define noalias i8* @rt_threadpool_workersync(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ check_ISBN_validity(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char ISBN[20];
  scanf("%s", ISBN);
  check_ISBN_validity(ISBN);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <check_ISBN_validity@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <check_ISBN_validity@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @check_ISBN_validity(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 10;
  printf("I am %d years old\n", age);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
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    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"I am %d years old\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 10, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"I am %d years old\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
/* Variables and functions */
scalar_t__ str_endwith(char *, char const *);
size_t strlen(char const *);
char *str_rcut(char *haystack, const char *word) {
  if (str_endwith(haystack, word)) {
    haystack[strlen(haystack) - strlen(word)] = '\0';
  }
  return haystack;
}


x86 assembly (clang, -O0):
<str_rcut>:
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   1040 <str_endwith@plt>
cmp    $0x0,%rax
je     1177 <str_rcut+0x57>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rcx
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_rcut>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <str_endwith@plt>
test   %rax,%rax
je     1150 <str_rcut+0x30>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %rax,%r15
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @str_rcut(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 i64 @str_endwith(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %3
%12 = call i64 @strlen(i8* %11)
%13 = load i8*, i8** %4
%14 = call i64 @strlen(i8* %13)
%15 = sub i64 %12, %14
%16 = getelementptr inbounds i8, i8* %10, i64 %15
store i8 0, i8* %16
br label %17
17: ; preds = %9, %2
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @str_rcut(i8* returned %0, i8* %1) {
%3 = tail call i64 @str_endwith(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%7 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%8 = sub i64 %6, %7
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %5, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ sesc_memfence(int);
void sesc_memfence_(int vaddr) { sesc_memfence(vaddr); }


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

x86 assembly (clang, -O2):
<sesc_memfence_>:
jmp    1030 <sesc_memfence@plt>

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

LLVM IR (-O2):
define void @sesc_memfence_(i32 %0) {
%2 = tail call i32 @sesc_memfence(i32 %0)
ret void
}
/* Type definitions */
struct query_context {
  int dummy;
};

/* Variables and functions */
long long null_query(struct query_context *);
signed long long null_query1(struct query_context *q, signed long long x) {
  return null_query(q);
}


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

x86 assembly (clang, -O2):
<null_query1>:
jmp    1030 <null_query@plt>

LLVM IR (-O0):
%struct.query_context = type { i32 }
define i64 @null_query1(%struct.query_context* %0, i64 %1) {
%3 = alloca %struct.query_context*
%4 = alloca i64
store %struct.query_context* %0, %struct.query_context** %3
store i64 %1, i64* %4
%5 = load %struct.query_context*, %struct.query_context** %3
%6 = call i64 @null_query(%struct.query_context* %5)
ret i64 %6
}

LLVM IR (-O2):
%struct.query_context = type { i32 }
define i64 @null_query1(%struct.query_context* %0, i64 %1) {
%3 = tail call i64 @null_query(%struct.query_context* %0)
ret i64 %3
}
int td_abs(i)
int i;
{ return ((i < 0) ? -i : i); }


x86 assembly (clang, -O0):
<td_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <td_abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <td_abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<td_abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @td_abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @td_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int get_next(const char **pp) {
  while (**pp == ' ' || **pp == '\t')
    (*pp)++;
  return **pp;
}


x86 assembly (clang, -O0):
<get_next>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1133 <get_next+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1143 <get_next+0x43>
jmp    1156 <get_next+0x56>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <get_next+0x8>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_next>:
mov    (%rdi),%rcx
jmp    1113 <get_next+0x13>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rcx,(%rdi)
add    $0x1,%rcx
movsbl -0x1(%rcx),%eax
cmp    $0x20,%eax
je     1110 <get_next+0x10>
cmp    $0x9,%al
je     1110 <get_next+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_next(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 9, label %6
]
6: ; preds = %3, %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3
%9 = sext i8 %5 to i32
ret i32 %9
}
/* Variables and functions */
int getnextline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *, int);
int main(void) {
  char line[1000];
  int len;
  while ((len = getnextline(line, 1000)) > 0) {
    reverse(line, len);
    printf("%s", line);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getnextline@plt>
mov    %eax,-0x3f4(%rbp)
cmp    $0x0,%eax
jle    118c <main+0x5c>
lea    -0x3f0(%rbp),%rdi
mov    -0x3f4(%rbp),%esi
call   1030 <reverse@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getnextline@plt>
test   %eax,%eax
jle    1186 <main+0x56>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getnextline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%6 = call i32 @getnextline(i8* %5, i32 1000)
store i32 %6, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%10 = load i32, i32* %3
%11 = call i32 @reverse(i8* %9, i32 %10)
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %4
14: ; preds = %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getnextline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = phi i32 [ %9, %5 ], [ %3, %0 ]
%7 = call i32 @reverse(i8* %2, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = call i32 @getnextline(i8* %2, i32 1000)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
void calcula_posicao() {}


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

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

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

LLVM IR (-O2):
define void @calcula_posicao() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void c_sig_handler_(int sig) { printf("recieved signal %d\n", sig); }


x86 assembly (clang, -O0):
<c_sig_handler_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_sig_handler_>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"recieved signal %d\0A\00"
define void @c_sig_handler_(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"recieved signal %d\0A\00"
define void @c_sig_handler_(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
INSTR(INVALID) { INVALID_INSTR(); }


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

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

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

LLVM IR (-O2):
define i32 @INSTR(i32 %0) {
%2 = tail call i32 (...) @INVALID_INSTR()
ret i32 undef
}
void assertion_failure(char *exp, char *file, char *base_file, int line) {
  printl("%c  assert(%s) failed: file: %s, base_file: %s, ln%d", '\003', exp,
         file, base_file, line);
  spin("assertion_failure()");
  __asm__ __volatile__("ud2");
}


x86 assembly (clang, -O0):
<assertion_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
lea    0xeb2(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <printl@plt>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1040 <spin@plt>
ud2
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertion_failure>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xecc(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printl@plt>
lea    0xeee(%rip),%rdi
xor    %eax,%eax
call   1040 <spin@plt>
ud2
pop    %rax
ret

LLVM IR (-O0):
@.str = [53 x i8] c"%c assert(%s) failed: file: %s, base_file: %s, ln%d\00"
@.str.1 = [20 x i8] c"assertion_failure()\00"
define void @assertion_failure(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 (i8*, i32, i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @printl to i32 (i8*, i32, i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 3, i8* %9, i8* %10, i8* %11, i32 %12)
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @spin to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"%c assert(%s) failed: file: %s, base_file: %s, ln%d\00"
@.str.1 = [20 x i8] c"assertion_failure()\00"
define void @assertion_failure(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 (i8*, i32, i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @printl to i32 (i8*, i32, i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 3, i8* %0, i8* %1, i8* %2, i32 %3)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @spin to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
tail call void asm sideeffect "ud2", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int test_imm_E2int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xE2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E2int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 970662608896
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int digit(int c) {
  return (c == '0' || c == '1' || c == '2' || c == '3' || c == '4' ||
          c == '5' || c == '6' || c == '7' || c == '8' || c == '9');
}


x86 assembly (clang, -O0):
<digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
mov    $0x1,%al
cmpl   $0x31,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
mov    $0x1,%al
cmpl   $0x32,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
mov    $0x1,%al
cmpl   $0x33,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
mov    $0x1,%al
cmpl   $0x34,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
mov    $0x1,%al
cmpl   $0x35,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
mov    $0x1,%al
cmpl   $0x36,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
mov    $0x1,%al
cmpl   $0x37,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
mov    $0x1,%al
cmpl   $0x38,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1198 <digit+0x98>
cmpl   $0x39,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @digit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 48
br i1 %4, label %32, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 49
br i1 %7, label %32, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 50
br i1 %10, label %32, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 51
br i1 %13, label %32, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 52
br i1 %16, label %32, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 53
br i1 %19, label %32, label %20
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 54
br i1 %22, label %32, label %23
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 55
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 56
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %2
%31 = icmp eq i32 %30, 57
br label %32
32: ; preds = %29, %26, %23, %20, %17, %14, %11, %8, %5, %1
%33 = phi i1 [ true, %26 ], [ true, %23 ], [ true, %20 ], [ true, %17 ], [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %31, %29 ]
%34 = zext i1 %33 to i32
ret i32 %34
}

LLVM IR (-O2):
define i32 @digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ major_code;
};
struct TYPE_4__ {
  TYPE_1__ xnoexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xnoexpose_major_code(void *_p) {
  return (int)((XEvent *)_p)->xnoexpose.major_code;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xnoexpose_major_code(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xnoexpose_major_code(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bbinit();
int /*<<< orphan*/ bbmain();
void bbstart(void) {
  bbinit();
  bbmain();
}


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

x86 assembly (clang, -O2):
<bbstart>:
push   %rax
xor    %eax,%eax
call   1030 <bbinit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <bbmain@plt>

LLVM IR (-O0):
define void @bbstart() {
%1 = call i32 (...) @bbinit()
%2 = call i32 (...) @bbmain()
ret void
}

LLVM IR (-O2):
define void @bbstart() {
%1 = tail call i32 (...) @bbinit()
%2 = tail call i32 (...) @bbmain()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_ITEM;

/* Variables and functions */
int /*<<< orphan*/ asn1_item_combine_free(int /*<<< orphan*/ **,
                                          int /*<<< orphan*/ const *,
                                          int /*<<< orphan*/);
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it) {
  asn1_item_combine_free(pval, it, 0);
}


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

x86 assembly (clang, -O2):
<ASN1_item_ex_free>:
xor    %edx,%edx
jmp    1030 <asn1_item_combine_free@plt>

LLVM IR (-O0):
define void @ASN1_item_ex_free(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 @asn1_item_combine_free(i32** %5, i32* %6, i32 0)
ret void
}

LLVM IR (-O2):
define void @ASN1_item_ex_free(i32** %0, i32* %1) {
%3 = tail call i32 @asn1_item_combine_free(i32** %0, i32* %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ psw_write_bit(int, int /*<<< orphan*/);
void psw_clr_cy(void) { psw_write_bit(7, 0); }


x86 assembly (clang, -O0):
<psw_clr_cy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
xor    %esi,%esi
call   1030 <psw_write_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<psw_clr_cy>:
mov    $0x7,%edi
xor    %esi,%esi
jmp    1030 <psw_write_bit@plt>

LLVM IR (-O0):
define void @psw_clr_cy() {
%1 = call i32 @psw_write_bit(i32 7, i32 0)
ret void
}

LLVM IR (-O2):
define void @psw_clr_cy() {
%1 = tail call i32 @psw_write_bit(i32 7, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ append_setup();
int /*<<< orphan*/ elem_setup();
int /*<<< orphan*/ get_setup();
int /*<<< orphan*/ getsize_setup();
int /*<<< orphan*/ ptrobj_setup();
int /*<<< orphan*/ set_setup();
int /*<<< orphan*/ setsize_setup();
int /*<<< orphan*/ sublist_setup();
void g_traversal_setup(void) {
  ptrobj_setup();
  get_setup();
  set_setup();
  elem_setup();
  getsize_setup();
  setsize_setup();
  append_setup();
  sublist_setup();
}


x86 assembly (clang, -O0):
<g_traversal_setup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <ptrobj_setup@plt>
mov    $0x0,%al
call   1090 <get_setup@plt>
mov    $0x0,%al
call   1060 <set_setup@plt>
mov    $0x0,%al
call   1040 <elem_setup@plt>
mov    $0x0,%al
call   1030 <getsize_setup@plt>
mov    $0x0,%al
call   1070 <setsize_setup@plt>
mov    $0x0,%al
call   10a0 <append_setup@plt>
mov    $0x0,%al
call   1050 <sublist_setup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_traversal_setup>:
push   %rax
xor    %eax,%eax
call   1080 <ptrobj_setup@plt>
xor    %eax,%eax
call   1090 <get_setup@plt>
xor    %eax,%eax
call   1060 <set_setup@plt>
xor    %eax,%eax
call   1040 <elem_setup@plt>
xor    %eax,%eax
call   1030 <getsize_setup@plt>
xor    %eax,%eax
call   1070 <setsize_setup@plt>
xor    %eax,%eax
call   10a0 <append_setup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <sublist_setup@plt>

LLVM IR (-O0):
define void @g_traversal_setup() {
%1 = call i32 (...) @ptrobj_setup()
%2 = call i32 (...) @get_setup()
%3 = call i32 (...) @set_setup()
%4 = call i32 (...) @elem_setup()
%5 = call i32 (...) @getsize_setup()
%6 = call i32 (...) @setsize_setup()
%7 = call i32 (...) @append_setup()
%8 = call i32 (...) @sublist_setup()
ret void
}

LLVM IR (-O2):
define void @g_traversal_setup() {
%1 = tail call i32 (...) @ptrobj_setup()
%2 = tail call i32 (...) @get_setup()
%3 = tail call i32 (...) @set_setup()
%4 = tail call i32 (...) @elem_setup()
%5 = tail call i32 (...) @getsize_setup()
%6 = tail call i32 (...) @setsize_setup()
%7 = tail call i32 (...) @append_setup()
%8 = tail call i32 (...) @sublist_setup()
ret void
}
f(int a) {
  switch (a) {
  case 1:
  case 2 ... 3:
  default:;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     112f <f+0x2f>
jmp    111b <f+0x1b>
mov    -0xc(%rbp),%eax
add    $0xfffffffe,%eax
sub    $0x2,%eax
jb     1134 <f+0x34>
jmp    1139 <f+0x39>
jmp    1134 <f+0x34>
jmp    1139 <f+0x39>
jmp    113e <f+0x3e>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 1, label %5
i32 2, label %6
i32 3, label %6
]
5: ; preds = %1
br label %6
6: ; preds = %1, %1, %5
br label %7
7: ; preds = %1, %6
br label %8
8: ; preds = %7
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 undef
}
int int_comp(void *v1, void *v2) {
  int n1;
  int n2;
  n1 = *((int *)v1);
  n2 = *((int *)v2);
  if (n1 == n2) {
    return 0;
  }
  if (n1 > n2) {
    return 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<int_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1136 <int_comp+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1155 <int_comp+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <int_comp+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <int_comp+0x55>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_comp>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setg   %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @int_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ progressmeter(int /*<<< orphan*/);
void updateprogressmeter(int ignore) {
  int save_errno = errno;
  progressmeter(0);
  errno = save_errno;
}


x86 assembly (clang, -O0):
<updateprogressmeter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1030 <progressmeter@plt>
mov    -0x8(%rbp),%ecx
mov    0x2ea8(%rip),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<updateprogressmeter>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
xor    %edi,%edi
call   1030 <progressmeter@plt>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define void @updateprogressmeter(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @errno
store i32 %4, i32* %3
%5 = call i32 @progressmeter(i32 0)
%6 = load i32, i32* %3
store i32 %6, i32* @errno
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @updateprogressmeter(i32 %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @progressmeter(i32 0)
store i32 %2, i32* @errno
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void *print_message(void *ptr) {
  char *text;
  text = (char *)ptr;
  printf("%s \n", text);
}


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

x86 assembly (clang, -O2):
<print_message>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s \0A\00"
define noalias i8* @print_message(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* undef
}
/* Variables and functions */
int getchar();
int getch(void) { return getchar(); }


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

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

LLVM IR (-O0):
define i32 @getch() {
%1 = call i32 (...) @getchar()
ret i32 %1
}

LLVM IR (-O2):
define i32 @getch() {
%1 = tail call i32 (...) @getchar()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void AES256_free_schedule(void *schedule) { memset(schedule, 0, 16 * 15); }


x86 assembly (clang, -O0):
<AES256_free_schedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0xf0,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AES256_free_schedule>:
xor    %esi,%esi
mov    $0xf0,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @AES256_free_schedule(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memset(i8* %3, i32 0, i32 240)
ret void
}

LLVM IR (-O2):
define void @AES256_free_schedule(i8* %0) {
%2 = tail call i32 @memset(i8* %0, i32 0, i32 240)
ret void
}
/* Type definitions */
struct mi_cmd {
  int dummy;
};

/* Variables and functions */
int get_mi_id(char *, int);
struct mi_cmd *lookup_mi_cmd_id(int, char *, int);
struct mi_cmd *lookup_mi_cmd(char *name, int len) {
  int id;
  id = get_mi_id(name, len);
  return lookup_mi_cmd_id(id, name, len);
}


x86 assembly (clang, -O0):
<lookup_mi_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <get_mi_id@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <lookup_mi_cmd_id@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup_mi_cmd>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <get_mi_id@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <lookup_mi_cmd_id@plt>

LLVM IR (-O0):
%struct.mi_cmd = type { i32 }
define %struct.mi_cmd* @lookup_mi_cmd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @get_mi_id(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call %struct.mi_cmd* @lookup_mi_cmd_id(i32 %9, i8* %10, i32 %11)
ret %struct.mi_cmd* %12
}

LLVM IR (-O2):
%struct.mi_cmd = type { i32 }
define %struct.mi_cmd* @lookup_mi_cmd(i8* %0, i32 %1) {
%3 = tail call i32 @get_mi_id(i8* %0, i32 %1)
%4 = tail call %struct.mi_cmd* @lookup_mi_cmd_id(i32 %3, i8* %0, i32 %1)
ret %struct.mi_cmd* %4
}