xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ Getc();
int /*<<< orphan*/ printf(char *);
extern void primary_user_id(int len) {
  printf("\t\tPrimary - ");
  if (Getc() == 0)
    printf("No");
  else
    printf("Yes");
  printf("\n");
}


x86 assembly (clang, -O0):
<primary_user_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <Getc@plt>
cmp    $0x0,%rax
jne    1159 <primary_user_id+0x39>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1165 <primary_user_id+0x45>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primary_user_id>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <Getc@plt>
test   %rax,%rax
lea    0xebf(%rip),%rax
lea    0xebb(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"\09\09Primary - \00"
@.str.1 = [3 x i8] c"No\00"
@.str.2 = [4 x i8] c"Yes\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @primary_user_id(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i64 (...) @Getc()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"\09\09Primary - \00"
@.str.1 = [3 x i8] c"No\00"
@.str.2 = [4 x i8] c"Yes\00"
define void @primary_user_id(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 (...) @Getc()
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
%7 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
void qsort(void *base, size_t n, size_t size,
           int (*cmp)(const void *keyval, const void *datum)) {
  errno = ENOSYS;
}


x86 assembly (clang, -O0):
<qsort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb4(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define void @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
%9 = load i32, i32* @ENOSYS
store i32 %9, i32* @errno
ret void
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define void @qsort(i8* nocapture readnone %0, i64 %1, i64 %2, i32 (i8*, i8*)* nocapture readnone %3) {
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret void
}
/* Variables and functions */
int optind;
void samtools_set_optind(int val) { optind = val; }


x86 assembly (clang, -O0):
<samtools_set_optind>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2ed7(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<samtools_set_optind>:
mov    0x2ee1(%rip),%rax
mov    %edi,(%rax)
ret

LLVM IR (-O0):
@optind = global i32 0
define void @samtools_set_optind(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* @optind
ret void
}

LLVM IR (-O2):
@optind = global i32 0
define void @samtools_set_optind(i32 %0) {
store i32 %0, i32* @optind
ret void
}
/* Type definitions */
struct l_class_OC_DummyStream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
_ZN9__gnu_cxx13new_allocatorIPiED2Ev(struct l_class_OC_DummyStream *);
void _ZNSaIPiED2Ev(struct l_class_OC_DummyStream *llvm_cbe_this) {
  unsigned char *llvm_cbe__rethrow;
  struct l_class_OC_DummyStream *llvm_cbe_this_2e_addr;
  struct l_class_OC_DummyStream *llvm_cbe_this1;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  _ZN9__gnu_cxx13new_allocatorIPiED2Ev(llvm_cbe_this1);
  return;
}


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

x86 assembly (clang, -O2):
<_ZNSaIPiED2Ev>:
jmp    1030 <_ZN9__gnu_cxx13new_allocatorIPiED2Ev@plt>

LLVM IR (-O0):
%struct.l_class_OC_DummyStream = type { i32 }
define void @_ZNSaIPiED2Ev(%struct.l_class_OC_DummyStream* %0) {
%2 = alloca %struct.l_class_OC_DummyStream*
%3 = alloca i8*
%4 = alloca %struct.l_class_OC_DummyStream*
%5 = alloca %struct.l_class_OC_DummyStream*
store %struct.l_class_OC_DummyStream* %0, %struct.l_class_OC_DummyStream** %2
%6 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %2
store %struct.l_class_OC_DummyStream* %6, %struct.l_class_OC_DummyStream** %4
%7 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %4
store %struct.l_class_OC_DummyStream* %7, %struct.l_class_OC_DummyStream** %5
%8 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %5
%9 = call i32 @_ZN9__gnu_cxx13new_allocatorIPiED2Ev(%struct.l_class_OC_DummyStream* %8)
ret void
}

LLVM IR (-O2):
%struct.l_class_OC_DummyStream = type { i32 }
define void @_ZNSaIPiED2Ev(%struct.l_class_OC_DummyStream* %0) {
%2 = tail call i32 @_ZN9__gnu_cxx13new_allocatorIPiED2Ev(%struct.l_class_OC_DummyStream* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int splitter(int);
int main(int argc, char const *argv[]) {
  int eingabe = 21368;
  printf("Bitte einen Betrag eingeben\n");
  scanf("%d", &eingabe);
  printf("%d\n", splitter(eingabe));
  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)
movl   $0x5378,-0x14(%rbp)
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%edi
call   1030 <splitter@plt>
mov    %eax,%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x5378,0x4(%rsp)
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <splitter@plt>
lea    0xe8d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Bitte einen Betrag eingeben\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 21368, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%9 = load i32, i32* %6
%10 = call i32 @splitter(i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@str = [28 x i8] c"Bitte einen Betrag eingeben\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 21368, i32* %3
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = call i32 @splitter(i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}
double divisionBy17(int inputNum) {
  double result = inputNum / 17.0;
  return result;
}


x86 assembly (clang, -O0):
<divisionBy17>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<divisionBy17>:
cvtsi2sd %edi,%xmm0
divsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @divisionBy17(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 1.700000e+01
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @divisionBy17(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fdiv double %2, 1.700000e+01
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ EOR_();
int /*<<< orphan*/ c64_memIndirectZeroX();
void EOR_izx(void) {
  c64_memIndirectZeroX();
  EOR_();
}


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

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

LLVM IR (-O0):
define void @EOR_izx() {
%1 = call i32 (...) @c64_memIndirectZeroX()
%2 = call i32 (...) @EOR_()
ret void
}

LLVM IR (-O2):
define void @EOR_izx() {
%1 = tail call i32 (...) @c64_memIndirectZeroX()
%2 = tail call i32 (...) @EOR_()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_setcputime(pthread_attr_t *attr, int clock_allowed) {
  (void)attr;
  (void)clock_allowed;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_attr_setcputime(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
int f(int y, int x) { return x & ((~x) | y); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
or     -0x4(%rbp),%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @f(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 = load i32, i32* %4
%7 = xor i32 %6, -1
%8 = load i32, i32* %3
%9 = or i32 %7, %8
%10 = and i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Init_SectA_Maps();
int /*<<< orphan*/ Init_SectB_Maps();
int /*<<< orphan*/ Init_SectC_Maps();
void Init_Maps(void) {
  Init_SectA_Maps();
  Init_SectB_Maps();
  Init_SectC_Maps();
}


x86 assembly (clang, -O0):
<Init_Maps>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Init_SectA_Maps@plt>
mov    $0x0,%al
call   1040 <Init_SectB_Maps@plt>
mov    $0x0,%al
call   1050 <Init_SectC_Maps@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init_Maps>:
push   %rax
xor    %eax,%eax
call   1030 <Init_SectA_Maps@plt>
xor    %eax,%eax
call   1040 <Init_SectB_Maps@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <Init_SectC_Maps@plt>

LLVM IR (-O0):
define void @Init_Maps() {
%1 = call i32 (...) @Init_SectA_Maps()
%2 = call i32 (...) @Init_SectB_Maps()
%3 = call i32 (...) @Init_SectC_Maps()
ret void
}

LLVM IR (-O2):
define void @Init_Maps() {
%1 = tail call i32 (...) @Init_SectA_Maps()
%2 = tail call i32 (...) @Init_SectB_Maps()
%3 = tail call i32 (...) @Init_SectC_Maps()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ expr();
void expr_stmt() { expr(); }


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

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

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

LLVM IR (-O2):
define void @expr_stmt() {
%1 = tail call i32 (...) @expr()
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c = EOF;
  printf("%d\n", c != EOF);
  c = 'a';
  printf("%d\n", c != EOF);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movl   $0x61,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x2ebf(%rip),%rax
xor    %esi,%esi
cmpl   $0x61,(%rax)
setne  %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @EOF
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 97, i32* %2
%9 = load i32, i32* %2
%10 = load i32, i32* @EOF
%11 = icmp ne i32 %9, %10
%12 = zext i1 %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = load i32, i32* @EOF
%3 = icmp ne i32 %2, 97
%4 = zext i1 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
unsigned int cast_char_uint(char x) { return (unsigned int)x; }


x86 assembly (clang, -O0):
<cast_char_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cast_char_uint(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @cast_char_uint(i8 signext %0) {
%2 = sext i8 %0 to i32
ret i32 %2
}
int f7(int *p) {
  p = 0;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @f7(i32* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
struct soap {
  int dummy;
};

/* Variables and functions */
int soap_send(struct soap *, char *);
int soap_body_end_out(struct soap *soap) {
  return soap_send(soap, "</SOAP-ENV:Body>");
}


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

x86 assembly (clang, -O2):
<soap_body_end_out>:
lea    0xee9(%rip),%rsi
jmp    1030 <soap_send@plt>

LLVM IR (-O0):
%struct.soap = type { i32 }
@.str = [17 x i8] c"</SOAP-ENV:Body>\00"
define i32 @soap_body_end_out(%struct.soap* %0) {
%2 = alloca %struct.soap*
store %struct.soap* %0, %struct.soap** %2
%3 = load %struct.soap*, %struct.soap** %2
%4 = call i32 @soap_send(%struct.soap* %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
%struct.soap = type { i32 }
@.str = [17 x i8] c"</SOAP-ENV:Body>\00"
define i32 @soap_body_end_out(%struct.soap* %0) {
%2 = tail call i32 @soap_send(%struct.soap* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
double fahrenheitToKelvin(double fahrenheit) {
  return ((fahrenheit - 32) / 1.8) + 273.15;
}


x86 assembly (clang, -O0):
<fahrenheitToKelvin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahrenheitToKelvin>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @fahrenheitToKelvin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 3.200000e+01
%5 = fdiv double %4, 1.800000e+00
%6 = fadd double %5, 2.731500e+02
ret double %6
}

LLVM IR (-O2):
define double @fahrenheitToKelvin(double %0) {
%2 = fadd double %0, -3.200000e+01
%3 = fdiv double %2, 1.800000e+00
%4 = fadd double %3, 2.731500e+02
ret double %4
}
signed char signedchar_ignoring_unsignedlong(signed char x, unsigned long y) {
  return x;
}


x86 assembly (clang, -O0):
<signedchar_ignoring_unsignedlong>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @signedchar_ignoring_unsignedlong(i8 signext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @signedchar_ignoring_unsignedlong(i8 returned signext %0, i64 %1) {
ret i8 %0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ FAIL(char *);
int /*<<< orphan*/ PASS(char *);
scalar_t__ whatsup();
int main() {
  if (whatsup())
    PASS("upward-dylib");
  else
    FAIL("upward-dylib");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <whatsup@plt>
cmp    $0x0,%rax
je     1161 <main+0x31>
lea    0xea9(%rip),%rdi
call   1040 <PASS@plt>
jmp    116d <main+0x3d>
lea    0xe98(%rip),%rdi
call   1050 <FAIL@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <whatsup@plt>
lea    0xec1(%rip),%rdi
test   %rax,%rax
je     114b <main+0x1b>
call   1040 <PASS@plt>
jmp    1150 <main+0x20>
call   1050 <FAIL@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"upward-dylib\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @whatsup()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @PASS(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @FAIL(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"upward-dylib\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @whatsup()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @PASS(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @FAIL(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
/* Type definitions */
struct isi_cb_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct isi_cb_data *);
void isi_cb_data_free(struct isi_cb_data *data) {
  if (data)
    free(data);
}


x86 assembly (clang, -O0):
<isi_cb_data_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <isi_cb_data_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isi_cb_data_free>:
test   %rdi,%rdi
je     111a <isi_cb_data_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.isi_cb_data = type { i32 }
define void @isi_cb_data_free(%struct.isi_cb_data* %0) {
%2 = alloca %struct.isi_cb_data*
store %struct.isi_cb_data* %0, %struct.isi_cb_data** %2
%3 = load %struct.isi_cb_data*, %struct.isi_cb_data** %2
%4 = icmp ne %struct.isi_cb_data* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.isi_cb_data*, %struct.isi_cb_data** %2
%7 = call i32 @free(%struct.isi_cb_data* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.isi_cb_data = type { i32 }
define void @isi_cb_data_free(%struct.isi_cb_data* %0) {
%2 = icmp eq %struct.isi_cb_data* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.isi_cb_data* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n;
  n = 1;
  while (n <= 1000) {
    printf("%d\n", n);
    n++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jg     1150 <main+0x40>
mov    -0x8(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x3e9,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 1001
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void passive_domain_destroy(struct vcpu *v) {}


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

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

LLVM IR (-O0):
%struct.vcpu = type opaque
define void @passive_domain_destroy(%struct.vcpu* %0) {
%2 = alloca %struct.vcpu*
store %struct.vcpu* %0, %struct.vcpu** %2
ret void
}

LLVM IR (-O2):
%struct.vcpu = type opaque
define void @passive_domain_destroy(%struct.vcpu* nocapture %0) {
ret void
}
/* Variables and functions */
size_t ZSTD_compressCCtx(void *, void *, size_t, void const *, size_t);
void *ZSTD_createCCtx();
int /*<<< orphan*/ ZSTD_freeCCtx(void *);
size_t ZSTD_compress(void *dst, size_t maxDstSize, const void *src,
                     size_t srcSize) {
  void *ctx;
  size_t r;
  ctx = ZSTD_createCCtx();
  r = ZSTD_compressCCtx(ctx, dst, maxDstSize, src, srcSize);
  ZSTD_freeCCtx(ctx);
  return r;
}


x86 assembly (clang, -O0):
<ZSTD_compress>:
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    $0x0,%al
call   1040 <ZSTD_createCCtx@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1050 <ZSTD_compressCCtx@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <ZSTD_freeCCtx@plt>
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZSTD_compress>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%r13
xor    %eax,%eax
call   1040 <ZSTD_createCCtx@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1050 <ZSTD_compressCCtx@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <ZSTD_freeCCtx@plt>
mov    %r14,%rax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @ZSTD_compress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%11 = call i8* (...) @ZSTD_createCCtx()
store i8* %11, i8** %9
%12 = load i8*, i8** %9
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = load i8*, i8** %7
%16 = load i64, i64* %8
%17 = call i64 @ZSTD_compressCCtx(i8* %12, i8* %13, i64 %14, i8* %15, i64 %16)
store i64 %17, i64* %10
%18 = load i8*, i8** %9
%19 = call i32 @ZSTD_freeCCtx(i8* %18)
%20 = load i64, i64* %10
ret i64 %20
}

LLVM IR (-O2):
define i64 @ZSTD_compress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i8* (...) @ZSTD_createCCtx()
%6 = tail call i64 @ZSTD_compressCCtx(i8* %5, i8* %0, i64 %1, i8* %2, i64 %3)
%7 = tail call i32 @ZSTD_freeCCtx(i8* %5)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void PWMFaultIntClearExt(unsigned long ulBase, unsigned long ulFaultInts) {
  DEBUG_ASSERT((ulBase == 0x40028000) || (ulBase == 0x40029000));
  DEBUG_ASSERT((ulFaultInts &
                ~(0x00010000 | 0x00020000 | 0x00040000 | 0x00080000)) == 0);
  (*((volatile unsigned long *)(ulBase + 0x0000001C))) = ulFaultInts;
}


x86 assembly (clang, -O0):
<PWMFaultIntClearExt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x40028000,-0x8(%rbp)
40
mov    %al,-0x11(%rbp)
je     1141 <PWMFaultIntClearExt+0x31>
cmpq   $0x40029000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
and    $0xfffffffffff0ffff,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x1c(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMFaultIntClearExt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40028000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
test   $0xfffffffffff0ffff,%r14
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,0x1c(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @PWMFaultIntClearExt(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 = icmp eq i64 %5, 1073905664
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 1073909760
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @DEBUG_ASSERT(i32 %12)
%14 = load i64, i64* %4
%15 = and i64 %14, -983041
%16 = icmp eq i64 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @DEBUG_ASSERT(i32 %17)
%19 = load i64, i64* %4
%20 = load i64, i64* %3
%21 = add i64 %20, 28
%22 = inttoptr i64 %21 to i64*
store volatile i64 %19, i64* %22
ret void
}

LLVM IR (-O2):
define void @PWMFaultIntClearExt(i64 %0, i64 %1) {
%3 = and i64 %0, -4097
%4 = icmp eq i64 %3, 1073905664
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = and i64 %1, -983041
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @DEBUG_ASSERT(i32 %9)
%11 = add i64 %0, 28
%12 = inttoptr i64 %11 to i64*
store volatile i64 %1, i64* %12
ret void
}
int test_goto2(int f) {
  int i;
  for (i = 0; ({
         _Bool a = i < 10;
         a;
       });
       i++) {
    if (i == f)
      goto lab2;
  }
  return 4;
lab2:
  return 8;
}


x86 assembly (clang, -O0):
<test_goto2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
setl   %al
and    $0x1,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
mov    %al,-0xe(%rbp)
testb  $0x1,-0xe(%rbp)
je     1150 <test_goto2+0x50>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    113d <test_goto2+0x3d>
jmp    115c <test_goto2+0x5c>
jmp    1142 <test_goto2+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <test_goto2+0xe>
movl   $0x4,-0x4(%rbp)
jmp    1163 <test_goto2+0x63>
movl   $0x8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_goto2>:
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
lea    0x4(,%rax,4),%eax
ret

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

LLVM IR (-O2):
define i32 @test_goto2(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = select i1 %2, i32 8, i32 4
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double suma(double, double);
int main() { printf("%f\n", suma(1.3, 14.4)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm1
call   1040 <suma@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1040 <suma@plt>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = call double @suma(double 1.300000e+00, double 1.440000e+01)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double @suma(double 1.300000e+00, double 1.440000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
BOOST_AUTO_TEST_CASE(gt) {
  TESTCASE2(gt, 0, 0, 0);
  TESTCASE2(gt, 0, 1, 0);
  TESTCASE2(gt, 1, 0, 1);
  TESTCASE2(gt, 1, 1, 0);
}


x86 assembly (clang, -O0):
<BOOST_AUTO_TEST_CASE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
mov    $0x0,%al
call   1030 <TESTCASE2@plt>
mov    -0x8(%rbp),%edi
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%esi
mov    $0x0,%al
call   1030 <TESTCASE2@plt>
mov    -0x8(%rbp),%edi
mov    $0x1,%ecx
xor    %edx,%edx
mov    %ecx,%esi
mov    $0x0,%al
call   1030 <TESTCASE2@plt>
mov    -0x8(%rbp),%edi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <TESTCASE2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOOST_AUTO_TEST_CASE>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1030 <TESTCASE2@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1030 <TESTCASE2@plt>
mov    %ebx,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1030 <TESTCASE2@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %eax,%eax
pop    %rbx
jmp    1030 <TESTCASE2@plt>

LLVM IR (-O0):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE2 to i32 (i32, i32, i32, i32, ...)*)(i32 %4, i32 0, i32 0, i32 0)
%6 = load i32, i32* %3
%7 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE2 to i32 (i32, i32, i32, i32, ...)*)(i32 %6, i32 0, i32 1, i32 0)
%8 = load i32, i32* %3
%9 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE2 to i32 (i32, i32, i32, i32, ...)*)(i32 %8, i32 1, i32 0, i32 1)
%10 = load i32, i32* %3
%11 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE2 to i32 (i32, i32, i32, i32, ...)*)(i32 %10, i32 1, i32 1, i32 0)
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE2 to i32 (i32, i32, i32, i32, ...)*)(i32 %0, i32 0, i32 0, i32 0)
%3 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE2 to i32 (i32, i32, i32, i32, ...)*)(i32 %0, i32 0, i32 1, i32 0)
%4 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE2 to i32 (i32, i32, i32, i32, ...)*)(i32 %0, i32 1, i32 0, i32 1)
%5 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE2 to i32 (i32, i32, i32, i32, ...)*)(i32 %0, i32 1, i32 1, i32 0)
ret i32 undef
}
/* Variables and functions */
scalar_t__ isdigit(int);
int isHexDigit(int c) {
  return isdigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
}


x86 assembly (clang, -O0):
<isHexDigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116d <isHexDigit+0x5d>
cmpl   $0x61,-0x4(%rbp)
jl     114e <isHexDigit+0x3e>
mov    $0x1,%al
cmpl   $0x66,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    116d <isHexDigit+0x5d>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1167 <isHexDigit+0x57>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isHexDigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xffffffdf,%ebx
add    $0xffffffbf,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isHexDigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %20, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 102
br i1 %11, label %20, label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 70
br label %18
18: ; preds = %15, %12
%19 = phi i1 [ false, %12 ], [ %17, %15 ]
br label %20
20: ; preds = %18, %9, %1
%21 = phi i1 [ true, %9 ], [ true, %1 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isHexDigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
_Noreturn struct A *p() {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <p+0x9>
jmp    1109 <p+0x9>

x86 assembly (clang, -O2):
<p>:
jmp    1100 <p>

LLVM IR (-O0):
%struct.A = type opaque
define %struct.A* @p() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
%struct.A = type opaque
define noalias %struct.A* @p() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void stop(char *mes) {
  fprintf(stderr, "%s\n", mes);
  abort();
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @stop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @stop(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
sorteio(int *vetor) {
  for (int i = 0; i < 5; i++) {
    vetor[i] = vetor[i] % 10;
  }
}


x86 assembly (clang, -O0):
<sorteio>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    1145 <sorteio+0x45>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <sorteio+0xf>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sorteio>:
movdqu (%rdi),%xmm0
movdqa 0xef4(%rip),%xmm1
movdqa %xmm0,%xmm2
pmuludq %xmm1,%xmm2
pshufd $0xed,%xmm2,%xmm2
pshufd $0xf5,%xmm0,%xmm3
pmuludq %xmm1,%xmm3
pshufd $0xed,%xmm3,%xmm3
punpckldq %xmm3,%xmm2
pxor   %xmm3,%xmm3
pcmpgtd %xmm0,%xmm3
pand   %xmm1,%xmm3
psubd  %xmm3,%xmm2
movdqa %xmm2,%xmm1
psrld  $0x1f,%xmm1
psrad  $0x2,%xmm2
paddd  %xmm1,%xmm2
movdqa 0xebb(%rip),%xmm1
pshufd $0xf5,%xmm2,%xmm3
pmuludq %xmm1,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pmuludq %xmm1,%xmm3
pshufd $0xe8,%xmm3,%xmm1
punpckldq %xmm1,%xmm2
psubd  %xmm2,%xmm0
movdqu %xmm0,(%rdi)
movslq 0x10(%rdi),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x10(%rdi)
ret

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

LLVM IR (-O2):
define i32 @sorteio(i32* nocapture %0) {
%2 = bitcast i32* %0 to <4 x i32>*
%3 = load <4 x i32>, <4 x i32>* %2
%4 = srem <4 x i32> %3, <i32 10, i32 10, i32 10, i32 10>
%5 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %4, <4 x i32>* %5
%6 = getelementptr inbounds i32, i32* %0, i64 4
%7 = load i32, i32* %6
%8 = srem i32 %7, 10
store i32 %8, i32* %6
ret i32 undef
}
int postcheck_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @postcheck_shutdown() {
ret i32 0
}
void ident_mtx33(float *m) {
  m[0] = 1.0f;
  m[4] = 1.0f;
  m[8] = 1.0f;
  m[1] = 0.0f;
  m[2] = 0.0f;
  m[3] = 0.0f;
  m[5] = 0.0f;
  m[6] = 0.0f;
  m[7] = 0.0f;
}


x86 assembly (clang, -O0):
<ident_mtx33>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0xedc(%rip),%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movss  0xecb(%rip),%xmm0
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x14(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ident_mtx33>:
movl   $0x3f800000,0x20(%rdi)
movss  0xef1(%rip),%xmm0
movups %xmm0,(%rdi)
movups %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @ident_mtx33(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 1.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 4
store float 1.000000e+00, float* %6
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 8
store float 1.000000e+00, float* %8
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
store float 0.000000e+00, float* %10
%11 = load float*, float** %2
%12 = getelementptr inbounds float, float* %11, i64 2
store float 0.000000e+00, float* %12
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 3
store float 0.000000e+00, float* %14
%15 = load float*, float** %2
%16 = getelementptr inbounds float, float* %15, i64 5
store float 0.000000e+00, float* %16
%17 = load float*, float** %2
%18 = getelementptr inbounds float, float* %17, i64 6
store float 0.000000e+00, float* %18
%19 = load float*, float** %2
%20 = getelementptr inbounds float, float* %19, i64 7
store float 0.000000e+00, float* %20
ret void
}

LLVM IR (-O2):
define void @ident_mtx33(float* nocapture writeonly %0) {
%2 = getelementptr inbounds float, float* %0, i64 4
%3 = getelementptr inbounds float, float* %0, i64 8
store float 1.000000e+00, float* %3
%4 = bitcast float* %0 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x float>* %4
%5 = bitcast float* %2 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x float>* %5
ret void
}
/* Variables and functions */
unsigned long ENOSYS;
unsigned long proc_get_transition_latency(unsigned int cpu) { return -ENOSYS; }


x86 assembly (clang, -O0):
<proc_get_transition_latency>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    0x2ed8(%rip),%rcx
sub    (%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_get_transition_latency>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%rax
ret

LLVM IR (-O0):
@ENOSYS = global i64 0
define i64 @proc_get_transition_latency(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i64, i64* @ENOSYS
%4 = sub i64 0, %3
ret i64 %4
}

LLVM IR (-O2):
@ENOSYS = global i64 0
define i64 @proc_get_transition_latency(i32 %0) {
%2 = load i64, i64* @ENOSYS
%3 = sub i64 0, %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_vector(double *v, long nl, long nh) { free((char *)(v + nl - 1)); }


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

x86 assembly (clang, -O2):
<free_vector>:
lea    (%rdi,%rsi,8),%rdi
add    $0xfffffffffffffff8,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_vector(double* %0, i64 %1, i64 %2) {
%4 = alloca double*
%5 = alloca i64
%6 = alloca i64
store double* %0, double** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load double*, double** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds double, double* %7, i64 %8
%10 = getelementptr inbounds double, double* %9, i64 -1
%11 = bitcast double* %10 to i8*
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @free_vector(double* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds double, double* %0, i64 %1
%5 = getelementptr inbounds double, double* %4, i64 -1
%6 = bitcast double* %5 to i8*
%7 = tail call i32 @free(i8* %6)
ret void
}