xunge/DecIR huggingface dataset:
/* Variables and functions */
int valueCard(char);
int cmpCards(char firstCard, char secondCard) {
  int firstCardV, secondCardV;
  firstCardV = valueCard(firstCard);
  secondCardV = valueCard(secondCard);
  if (firstCardV > secondCardV)
    return 1;
  else if (firstCardV < secondCardV)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<cmpCards>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <valueCard@plt>
mov    %eax,-0xc(%rbp)
movsbl -0x6(%rbp),%edi
call   1030 <valueCard@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1154 <cmpCards+0x44>
movl   $0x1,-0x4(%rbp)
jmp    1173 <cmpCards+0x63>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    116c <cmpCards+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <cmpCards+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpCards>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <valueCard@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <valueCard@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
setl   %cl
neg    %ecx
cmp    %eax,%ebp
mov    $0x1,%eax
cmovle %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @cmpCards(i8 signext %0, i8 signext %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 = call i32 @valueCard(i8 signext %8)
store i32 %9, i32* %6
%10 = load i8, i8* %5
%11 = call i32 @valueCard(i8 signext %10)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 1, i32* %3
br label %22
16: ; preds = %2
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 -1, i32* %3
br label %22
21: ; preds = %16
store i32 0, i32* %3
br label %22
22: ; preds = %21, %20, %15
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @cmpCards(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @valueCard(i8 signext %0)
%4 = tail call i32 @valueCard(i8 signext %1)
%5 = icmp sgt i32 %3, %4
%6 = icmp slt i32 %3, %4
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x86() {
  Assert_real((isprint(134) == 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_isprint.c",
              675, ("isprint should be 0 for 0x86"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x86>:
push   %rax
mov    $0x86,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2a3,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x86\00"
define void @t_isprint_0x86() {
%1 = call i64 @isprint(i32 134)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 675, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x86\00"
define void @t_isprint_0x86() {
%1 = tail call i64 @isprint(i32 134)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 675, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  uint32_t a = 7, b = 3, c, r;
  double y, x = 3.5;
  y = x + 2.8;
  c = a / b;
  r = a % b;
  printf("\nHello, World!\n\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xebe(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"\0AHello, World!\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
store i32 7, i32* %2
store i32 3, i32* %3
store double 3.500000e+00, double* %7
%8 = load double, double* %7
%9 = fadd double %8, 2.800000e+00
store double %9, double* %6
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = sdiv i32 %10, %11
store i32 %12, i32* %4
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = srem i32 %13, %14
store i32 %15, i32* %5
%16 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"\0AHello, World!\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_help(void) { printf("How to use shell.\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"How to use shell.\0A\00"
define void @display_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"How to use shell.\00"
define void @display_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
void do___symtabmax(void) {}


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

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

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

LLVM IR (-O2):
define void @do___symtabmax() {
ret void
}
double utstart(int hr, int min, int sec, double ot) {
  return ((double)(hr) + (double)(min) / 60 + (double)(sec) / 3600 - ot);
}


x86 assembly (clang, -O0):
<utstart>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xee4(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xec7(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
subsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<utstart>:
cvtsi2sd %edi,%xmm2
movd   %edx,%xmm1
movd   %esi,%xmm3
punpckldq %xmm1,%xmm3
cvtdq2pd %xmm3,%xmm1
divpd  0xee4(%rip),%xmm1
addsd  %xmm1,%xmm2
unpckhpd %xmm1,%xmm1
addsd  %xmm2,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @utstart(i32 %0, i32 %1, i32 %2, double %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double %3, double* %8
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %6
%12 = sitofp i32 %11 to double
%13 = fdiv double %12, 6.000000e+01
%14 = fadd double %10, %13
%15 = load i32, i32* %7
%16 = sitofp i32 %15 to double
%17 = fdiv double %16, 3.600000e+03
%18 = fadd double %14, %17
%19 = load double, double* %8
%20 = fsub double %18, %19
ret double %20
}

LLVM IR (-O2):
define double @utstart(i32 %0, i32 %1, i32 %2, double %3) {
%5 = sitofp i32 %0 to double
%6 = insertelement <2 x i32> poison, i32 %1, i64 0
%7 = insertelement <2 x i32> %6, i32 %2, i64 1
%8 = sitofp <2 x i32> %7 to <2 x double>
%9 = fdiv <2 x double> %8, <double 6.000000e+01, double 3.600000e+03>
%10 = extractelement <2 x double> %9, i64 0
%11 = fadd double %10, %5
%12 = extractelement <2 x double> %9, i64 1
%13 = fadd double %11, %12
%14 = fsub double %13, %3
ret double %14
}
unsigned flip4(unsigned x) {
  return (((x >> 3) & 1) << 0) | (((x >> 2) & 1) << 1) | (((x >> 1) & 1) << 2) |
         (((x >> 0) & 1) << 3);
}


x86 assembly (clang, -O0):
<flip4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x3,%eax
and    $0x1,%eax
shl    $0x0,%eax
mov    -0x4(%rbp),%ecx
shr    $0x2,%ecx
and    $0x1,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x1,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x0,%ecx
and    $0x1,%ecx
shl    $0x3,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip4>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %al,%dil
mov    %edi,%eax
and    $0x50,%al
add    %al,%al
shr    %dil
and    $0x50,%dil
or     %al,%dil
shr    $0x4,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @flip4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 3
%5 = and i32 %4, 1
%6 = shl i32 %5, 0
%7 = load i32, i32* %2
%8 = lshr i32 %7, 2
%9 = and i32 %8, 1
%10 = shl i32 %9, 1
%11 = or i32 %6, %10
%12 = load i32, i32* %2
%13 = lshr i32 %12, 1
%14 = and i32 %13, 1
%15 = shl i32 %14, 2
%16 = or i32 %11, %15
%17 = load i32, i32* %2
%18 = lshr i32 %17, 0
%19 = and i32 %18, 1
%20 = shl i32 %19, 3
%21 = or i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @flip4(i32 %0) {
%2 = trunc i32 %0 to i4
%3 = tail call i4 @llvm.bitreverse.i4(i4 %2)
%4 = zext i4 %3 to i32
ret i32 %4
}
f(x) int x;
{
  int y;
  y = ffs(x) - 1;
  if (y < 0)
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <ffs@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    114a <f+0x2a>
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
xor    %eax,%eax
call   1040 <ffs@plt>
test   %eax,%eax
jle    112e <f+0xe>
pop    %rcx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @ffs to i32 (i32, ...)*)(i32 %5)
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
unreachable
11: ; preds = %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @ffs to i32 (i32, ...)*)(i32 %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %4, label %5
4: ; preds = %1
tail call void @abort()
unreachable
5: ; preds = %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ test_FITS_INTO_SIGNED_INT();
int /*<<< orphan*/ test_MAX();
int /*<<< orphan*/ test_MIN();
int /*<<< orphan*/ test_PROMOTES_TO_SIGNED_TYPE();
int /*<<< orphan*/ test_minmax_fast();
int /*<<< orphan*/ test_morelimits();
int /*<<< orphan*/ test_overflow();
int /*<<< orphan*/ test_uint32_encode();
int /*<<< orphan*/ test_uint64_encode();
int test() {
  test_uint32_encode();
  test_uint64_encode();
  test_FITS_INTO_SIGNED_INT();
  test_PROMOTES_TO_SIGNED_TYPE();
  test_overflow();
  test_morelimits();
  test_MIN();
  test_MAX();
  test_minmax_fast();
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <test_uint32_encode@plt>
mov    $0x0,%al
call   1030 <test_uint64_encode@plt>
mov    $0x0,%al
call   10a0 <test_FITS_INTO_SIGNED_INT@plt>
mov    $0x0,%al
call   1070 <test_PROMOTES_TO_SIGNED_TYPE@plt>
mov    $0x0,%al
call   1060 <test_overflow@plt>
mov    $0x0,%al
call   10b0 <test_morelimits@plt>
mov    $0x0,%al
call   1050 <test_MIN@plt>
mov    $0x0,%al
call   1040 <test_MAX@plt>
mov    $0x0,%al
call   1090 <test_minmax_fast@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
xor    %eax,%eax
call   1080 <test_uint32_encode@plt>
xor    %eax,%eax
call   1030 <test_uint64_encode@plt>
xor    %eax,%eax
call   10a0 <test_FITS_INTO_SIGNED_INT@plt>
xor    %eax,%eax
call   1070 <test_PROMOTES_TO_SIGNED_TYPE@plt>
xor    %eax,%eax
call   1060 <test_overflow@plt>
xor    %eax,%eax
call   10b0 <test_morelimits@plt>
xor    %eax,%eax
call   1050 <test_MIN@plt>
xor    %eax,%eax
call   1040 <test_MAX@plt>
xor    %eax,%eax
call   1090 <test_minmax_fast@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = call i32 (...) @test_uint32_encode()
%2 = call i32 (...) @test_uint64_encode()
%3 = call i32 (...) @test_FITS_INTO_SIGNED_INT()
%4 = call i32 (...) @test_PROMOTES_TO_SIGNED_TYPE()
%5 = call i32 (...) @test_overflow()
%6 = call i32 (...) @test_morelimits()
%7 = call i32 (...) @test_MIN()
%8 = call i32 (...) @test_MAX()
%9 = call i32 (...) @test_minmax_fast()
ret i32 0
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @test_uint32_encode()
%2 = tail call i32 (...) @test_uint64_encode()
%3 = tail call i32 (...) @test_FITS_INTO_SIGNED_INT()
%4 = tail call i32 (...) @test_PROMOTES_TO_SIGNED_TYPE()
%5 = tail call i32 (...) @test_overflow()
%6 = tail call i32 (...) @test_morelimits()
%7 = tail call i32 (...) @test_MIN()
%8 = tail call i32 (...) @test_MAX()
%9 = tail call i32 (...) @test_minmax_fast()
ret i32 0
}
int longcmp(const void *a, const void *b) {
  return ((int)(*(signed int *)a - *(signed int *)b));
}


x86 assembly (clang, -O0):
<longcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @longcmp(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @longcmp(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 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
char Pop(char stack[], int *top) {
  if (*top == -1) {
    printf("Underflow. Not an infix expression.\n");
    exit(1);
  }
  *top -= 1;
  return stack[*top + 1];
}


x86 assembly (clang, -O0):
<Pop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
jne    1153 <Pop+0x33>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pop>:
push   %rax
movslq (%rsi),%rax
cmp    $0xffffffffffffffff,%rax
je     1134 <Pop+0x14>
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsi)
mov    (%rdi,%rax,1),%al
pop    %rcx
ret
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Underflow. Not an infix expression.\0A\00"
define signext i8 @Pop(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = sub nsw i32 %13, 1
store i32 %14, i32* %12
%15 = load i8*, i8** %3
%16 = load i32*, i32** %4
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %15, i64 %19
%21 = load i8, i8* %20
ret i8 %21
}

LLVM IR (-O2):
@str = [36 x i8] c"Underflow. Not an infix expression.\00"
define signext i8 @Pop(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = add nsw i32 %3, -1
store i32 %9, i32* %1
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
ret i8 %12
}
struct section_t *config_process_section_nothing(struct section_t *section) {
  return section;
}


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

x86 assembly (clang, -O2):
<config_process_section_nothing>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.section_t = type opaque
define %struct.section_t* @config_process_section_nothing(%struct.section_t* %0) {
%2 = alloca %struct.section_t*
store %struct.section_t* %0, %struct.section_t** %2
%3 = load %struct.section_t*, %struct.section_t** %2
ret %struct.section_t* %3
}

LLVM IR (-O2):
%struct.section_t = type opaque
define %struct.section_t* @config_process_section_nothing(%struct.section_t* readnone returned %0) {
ret %struct.section_t* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *vhost_usage();
void vhost_showusage() { printf("usage : vhost %s", vhost_usage()); }


x86 assembly (clang, -O0):
<vhost_showusage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <vhost_usage@plt>
mov    %rax,%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vhost_showusage>:
push   %rax
xor    %eax,%eax
call   1040 <vhost_usage@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"usage : vhost %s\00"
define void @vhost_showusage() {
%1 = call i8* (...) @vhost_usage()
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"usage : vhost %s\00"
define void @vhost_showusage() {
%1 = tail call i8* (...) @vhost_usage()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
unsigned int peak_transfer_slave(const char *x) {
  (void)x;
  return (1);
}


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

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

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

LLVM IR (-O2):
define i32 @peak_transfer_slave(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int nxtfreedata(void *ref, void *arg) {
  free(arg);
  return 0;
}


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

x86 assembly (clang, -O2):
<nxtfreedata>:
push   %rax
mov    %rsi,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @nxtfreedata(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ playList(int, int);
void main() {
  int i = 116;
  playList(i, 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x74,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <playList@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x74,%edi
mov    $0x1,%esi
jmp    1030 <playList@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 116, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @playList(i32 %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @playList(i32 116, i32 1)
ret void
}
long long int max(long long int a, long long int b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
unsigned xrop3_226_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T ^ D;
  stk2 = S & stk3;
  stk1 = D ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

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

LLVM IR (-O0):
define i32 @xrop3_226_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%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* %7
%24 = load i32, i32* %5
%25 = xor 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* %5
%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* %7
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = load i32, i32* %5
%40 = load i32, i32* %6
%41 = and i32 %39, %40
%42 = or i32 %38, %41
%43 = load i32, i32* %5
%44 = load i32, i32* %7
%45 = and i32 %43, %44
%46 = or i32 %42, %45
ret i32 %46
}

LLVM IR (-O2):
define i32 @xrop3_226_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %0, -1
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %8, %10
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_getstackaddr(int /*<<< orphan*/ *, void **);
int my_pthread_attr_getstackaddr(pthread_attr_t const *__attr,
                                 void **stack_addr) {
  pthread_attr_t *realattr = (pthread_attr_t *)*(int *)__attr;
  return pthread_attr_getstackaddr(realattr, stack_addr);
}


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

x86 assembly (clang, -O2):
<my_pthread_attr_getstackaddr>:
movslq (%rdi),%rdi
jmp    1030 <pthread_attr_getstackaddr@plt>

LLVM IR (-O0):
define i32 @my_pthread_attr_getstackaddr(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
%5 = alloca i32*
store i32* %0, i32** %3
store i8** %1, i8*** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i8**, i8*** %4
%12 = call i32 @pthread_attr_getstackaddr(i32* %10, i8** %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_pthread_attr_getstackaddr(i32* nocapture %0, i8** %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @pthread_attr_getstackaddr(i32* %5, i8** %1)
ret i32 %6
}
void __attribute__((stdcall))
RtlUnwind(void *frame, void *ip, void *excp, int ret) {
  frame = frame;
  return;
}


x86 assembly (clang, -O0):
<RtlUnwind>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @RtlUnwind(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
store i8* %9, i8** %5
ret void
}

LLVM IR (-O2):
define void @RtlUnwind(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i32 %3) {
ret void
}
int remainingAngle(int firstAngle, int secondAngle) {
  return 180 - firstAngle - secondAngle;
}


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

x86 assembly (clang, -O2):
<remainingAngle>:
add    %esi,%edi
mov    $0xb4,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @remainingAngle(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 = sub nsw i32 180, %5
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @remainingAngle(i32 %0, i32 %1) {
%3 = add i32 %0, %1
%4 = sub i32 180, %3
ret i32 %4
}
/* Type definitions */
struct fsverity_digest {
  int dummy;
};
typedef int /*<<< orphan*/ digest;

/* Variables and functions */
int main(void) {
  struct fsverity_digest digest;
  (void)digest;
  return sizeof(digest);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
void get_volumes_path() {}


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

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

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

LLVM IR (-O2):
define void @get_volumes_path() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int stub1(int *, int *);
void fun(int (*p)(int *, int *), int *pa, int *pb) {
  int result;
  result = (*p)(pa, pb);
  printf("The result is:%d\n", result);
}


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

x86 assembly (clang, -O2):
<fun>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   *%rax
lea    0xedd(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"The result is:%d\0A\00"
define void @fun(i32 (i32*, i32*)* nocapture %0, i32* %1, i32* %2) {
%4 = tail call i32 %0(i32* %1, i32* %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void check_linux_status(const int rc, const char *message) {
  if (rc != 0) {
    perror(message);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_linux_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1150 <check_linux_status+0x30>
mov    -0x10(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_linux_status>:
test   %edi,%edi
jne    1125 <check_linux_status+0x5>
ret
push   %rax
mov    %rsi,%rdi
call   1030 <perror@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @check_linux_status(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @perror(i8* %8)
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @check_linux_status(i32 %0, i8* nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 @perror(i8* %1)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_disableScroll(void) { printf("\033[?1049h"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[?1049h\00"
define void @display_disableScroll() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[?1049h\00"
define void @display_disableScroll() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_0Euint8_reg(unsigned char val) {
  return ((val) & (-0x0E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Euint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -14
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
float pythagorean_theorem(int, int);
int main(int argc, char *argv[]) {
  float hypotenuse = pythagorean_theorem(3, 4);
  printf("the hypotenuse of 3 and 4 is %d\n", (int)hypotenuse);
  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    $0x3,%edi
mov    $0x4,%esi
call   1040 <pythagorean_theorem@plt>
movss  %xmm0,-0x14(%rbp)
cvttss2si -0x14(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <pythagorean_theorem@plt>
cvttss2si %xmm0,%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"the hypotenuse of 3 and 4 is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call float @pythagorean_theorem(i32 3, i32 4)
store float %7, float* %6
%8 = load float, float* %6
%9 = fptosi float %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"the hypotenuse of 3 and 4 is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float @pythagorean_theorem(i32 3, i32 4)
%4 = fptosi float %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void handle_fiq(void) {
  uart_puts("\nFIQ");
  while (1)
    ;
  return;
}


x86 assembly (clang, -O0):
<handle_fiq>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <uart_puts@plt>
jmp    1120 <handle_fiq+0x10>

x86 assembly (clang, -O2):
<handle_fiq>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <uart_puts@plt>
nopl   (%rax)
jmp    1120 <handle_fiq+0x10>

LLVM IR (-O0):
@.str = [5 x i8] c"\0AFIQ\00"
define void @handle_fiq() {
%1 = call i32 @uart_puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0AFIQ\00"
define void @handle_fiq() {
%1 = tail call i32 @uart_puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
int dqcmp(const void *p1, const void *p2) {
  double d1 = *((double *)p1), d2 = *((double *)p2);
  return d1 > d2 ? 1 : (d1 < d2 ? -1 : 0);
}


x86 assembly (clang, -O0):
<dqcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1143 <dqcmp+0x43>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    115e <dqcmp+0x5e>
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dqcmp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @dqcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to double*
%9 = load double, double* %8
store double %9, double* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to double*
%12 = load double, double* %11
store double %12, double* %6
%13 = load double, double* %5
%14 = load double, double* %6
%15 = fcmp ogt double %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %23
17: ; preds = %2
%18 = load double, double* %5
%19 = load double, double* %6
%20 = fcmp olt double %18, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 -1, i32 0
br label %23
23: ; preds = %17, %16
%24 = phi i32 [ 1, %16 ], [ %22, %17 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @dqcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
IVAS_Interface(Unit, Function, par1, par2, par3, par4, par5, par6, par7, par8,
               par9, par10) int *Unit,
    Function;
int par1, par2, par3, par4, par5, par6, par7, par8, par9, par10;
{ return (0); }


x86 assembly (clang, -O0):
<IVAS_Interface>:
push   %rbp
mov    %rsp,%rbp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @IVAS_Interface(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
store i32* %0, i32** %13
store i32 %1, i32* %14
store i32 %2, i32* %15
store i32 %3, i32* %16
store i32 %4, i32* %17
store i32 %5, i32* %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store i32 %8, i32* %21
store i32 %9, i32* %22
store i32 %10, i32* %23
store i32 %11, i32* %24
ret i32 0
}

LLVM IR (-O2):
define i32 @IVAS_Interface(i32* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11) {
ret i32 0
}
int main() {
  switch (123) {
  case 1:
    11;
    break;
  case 2:
    22;
    44;
    break;
  case 123:
    123123;
    break;
  default:
    0;
  }
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ send_str(int, char *);
int send_server_name(int socket) {
  send_str(socket, "Server: ");
  send_str(socket, "Konta-HTTP Server");
  send_str(socket, "\r\n");
}


x86 assembly (clang, -O0):
<send_server_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <send_str@plt>
mov    -0x8(%rbp),%edi
lea    0xed5(%rip),%rsi
call   1030 <send_str@plt>
mov    -0x8(%rbp),%edi
lea    0xed8(%rip),%rsi
call   1030 <send_str@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_server_name>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rsi
call   1030 <send_str@plt>
lea    0xee3(%rip),%rsi
mov    %ebx,%edi
call   1030 <send_str@plt>
lea    0xee7(%rip),%rsi
mov    %ebx,%edi
pop    %rbx
jmp    1030 <send_str@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Server: \00"
@.str.1 = [18 x i8] c"Konta-HTTP Server\00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define i32 @send_server_name(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @send_str(i32 %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = call i32 @send_str(i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = call i32 @send_str(i32 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [9 x i8] c"Server: \00"
@.str.1 = [18 x i8] c"Konta-HTTP Server\00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define i32 @send_server_name(i32 %0) {
%2 = tail call i32 @send_str(i32 %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @send_str(i32 %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @send_str(i32 %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct smack_accesses {
  int dummy;
};

/* Variables and functions */
int accesses_add(struct smack_accesses *, char const *, char const *,
                 char const *, char const *);
int smack_accesses_add_modify(struct smack_accesses *handle,
                              const char *subject, const char *object,
                              const char *allow_access_type,
                              const char *deny_access_type) {
  return accesses_add(handle, subject, object, allow_access_type,
                      deny_access_type);
}


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

x86 assembly (clang, -O2):
<smack_accesses_add_modify>:
jmp    1030 <accesses_add@plt>

LLVM IR (-O0):
%struct.smack_accesses = type { i32 }
define i32 @smack_accesses_add_modify(%struct.smack_accesses* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca %struct.smack_accesses*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store %struct.smack_accesses* %0, %struct.smack_accesses** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load %struct.smack_accesses*, %struct.smack_accesses** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i32 @accesses_add(%struct.smack_accesses* %11, i8* %12, i8* %13, i8* %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.smack_accesses = type { i32 }
define i32 @smack_accesses_add_modify(%struct.smack_accesses* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @accesses_add(%struct.smack_accesses* %0, i8* %1, i8* %2, i8* %3, i8* %4)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) time_t softboundcets_time(time_t *t) {
  return time(t);
}


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

x86 assembly (clang, -O2):
<softboundcets_time>:
jmp    1030 <time@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_time(i32* %0) {
%2 = tail call i32 @time(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void puntoA_muestra_inv(int a[], unsigned int n) {
  if (--n > 0)
    puntoA_muestra_inv(a + 1, n);
  printf("%d", a[0]);
}


x86 assembly (clang, -O0):
<puntoA_muestra_inv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jbe    1151 <puntoA_muestra_inv+0x31>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
call   1040 <puntoA_muestra_inv@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puntoA_muestra_inv>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffff,%esi
je     1132 <puntoA_muestra_inv+0x12>
lea    0x4(%rbx),%rdi
call   1040 <puntoA_muestra_inv@plt>
mov    (%rbx),%esi
lea    0xec5(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

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

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