xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void print(float in) { printf("%7.4f ", in); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"%7.4f \00"
define void @print(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%7.4f \00"
define void @print(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;
typedef int /*<<< orphan*/ EVP_CIPHER;
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int EVP_CipherInit_ex(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                      int /*<<< orphan*/ *, unsigned char const *,
                      unsigned char const *, int);
int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
                       ENGINE *impl, const unsigned char *key,
                       const unsigned char *iv) {
  return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 1);
}


x86 assembly (clang, -O0):
<EVP_EncryptInit_ex>:
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
mov    $0x1,%r9d
call   1030 <EVP_CipherInit_ex@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_EncryptInit_ex>:
mov    $0x1,%r9d
jmp    1030 <EVP_CipherInit_ex@plt>

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

LLVM IR (-O2):
define i32 @EVP_EncryptInit_ex(i32* %0, i32* %1, i32* %2, i8* %3, i8* %4) {
%6 = tail call i32 @EVP_CipherInit_ex(i32* %0, i32* %1, i32* %2, i8* %3, i8* %4, i32 1)
ret i32 %6
}
int func(void) {
  int n = 3;
  int m = 5;
  n = (!m);
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func() {
%1 = alloca i32
%2 = alloca i32
store i32 3, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
store i32 %6, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ re_file(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 2) {
    fprintf(stderr, "<Usage> directory name\n");
    return 1;
  }
  re_file(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1161 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1175 <main+0x55>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <re_file@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1133 <main+0x13>
mov    0x8(%rsi),%rdi
call   1040 <re_file@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"<Usage> directory name\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @re_file(i8* %14)
store i32 0, i32* %3
br label %16
16: ; preds = %11, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"<Usage> directory name\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @re_file(i8* %9)
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void *func_add1(void *p) {
  int fd;
  fd = open("/tmp/out", O_RDWR);
  if (fd < 0) {
    perror("open()");
    exit(1);
  }
  close(fd);
  return NULL;
}


x86 assembly (clang, -O0):
<func_add1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
lea    0xea4(%rip),%rdi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1184 <func_add1+0x44>
lea    0xe94(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_add1>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    0xeaf(%rip),%rdi
call   1040 <open@plt>
test   %eax,%eax
js     1165 <func_add1+0x25>
mov    %eax,%edi
call   1030 <close@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe9d(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"/tmp/out\00"
@O_RDWR = global i32 0
@.str.1 = [7 x i8] c"open()\00"
define i8* @func_add1(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @O_RDWR
%5 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i32, i32* %3
%13 = call i32 @close(i32 %12)
ret i8* null
}

LLVM IR (-O2):
@.str = [9 x i8] c"/tmp/out\00"
@O_RDWR = global i32 0
@.str.1 = [7 x i8] c"open()\00"
define noalias i8* @func_add1(i8* nocapture readnone %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = tail call i32 @close(i32 %3)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ main1(int, int);
int main(void) {
  main1(16, 240);
  main1(16 - 1, 210);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x10,%edi
mov    $0xf0,%esi
call   1030 <main1@plt>
mov    $0xf,%edi
mov    $0xd2,%esi
call   1030 <main1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @main1(i32 16, i32 240)
%3 = call i32 @main1(i32 15, i32 210)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @main1(i32 16, i32 240)
%2 = tail call i32 @main1(i32 15, i32 210)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void sc_cleanup_string(char **ptr) {
  if (ptr != NULL) {
    free(*ptr);
  }
}


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

x86 assembly (clang, -O2):
<sc_cleanup_string>:
test   %rdi,%rdi
je     111d <sc_cleanup_string+0xd>
mov    (%rdi),%rdi
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @sc_cleanup_string(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @free(i8* %4)
br label %6
6: ; preds = %3, %1
ret void
}
void _papi_hwd_lock(void) {}


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

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

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

LLVM IR (-O2):
define void @_papi_hwd_lock() {
ret void
}
void f4() {}


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

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

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

LLVM IR (-O2):
define void @f4() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int8_t stdlib_ndarray_get_ptr_uint32(const uint8_t *idx, uint32_t *out) {
  *out = *(uint32_t *)idx;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @stdlib_ndarray_get_ptr_uint32(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* %5
%7 = load i32*, i32** %4
store i32 %6, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @stdlib_ndarray_get_ptr_uint32(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
store i32 %3, i32* %1
ret i32 0
}
/* Variables and functions */
scalar_t__ sqrtl(int);
float _sqrtI(int a) { return (float)sqrtl(a); }


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

x86 assembly (clang, -O2):
<_sqrtI>:
push   %rax
call   1030 <sqrtl@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @_sqrtI(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @sqrtl(i32 %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @_sqrtI(i32 %0) {
%2 = tail call i64 @sqrtl(i32 %0)
%3 = sitofp i64 %2 to float
ret float %3
}
/* Variables and functions */
double Bezier(double, double, double, double, double);
double CRCompute(double x, double Y0, double Y1, double Y2, double Y3) {
  static const double a = (1.0 / 4.0);
  double d1 = a * (Y2 - Y0);
  double d2 = a * (Y3 - Y1);
  return Bezier(x, Y1, Y1 + d1, Y2 - d2, Y2);
}


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

x86 assembly (clang, -O2):
<CRCompute>:
movapd %xmm2,%xmm6
movapd %xmm3,%xmm5
movapd %xmm3,%xmm2
subsd  %xmm1,%xmm2
movsd  0xed8(%rip),%xmm1
mulsd  %xmm1,%xmm2
subsd  %xmm6,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm6,%xmm2
subsd  %xmm4,%xmm5
movapd %xmm3,%xmm4
movapd %xmm6,%xmm1
movapd %xmm5,%xmm3
jmp    1030 <Bezier@plt>

LLVM IR (-O0):
@CRCompute.a = internal constant double 2.500000e-01
define double @CRCompute(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%13 = load double, double* %9
%14 = load double, double* %7
%15 = fsub double %13, %14
%16 = fmul double 2.500000e-01, %15
store double %16, double* %11
%17 = load double, double* %10
%18 = load double, double* %8
%19 = fsub double %17, %18
%20 = fmul double 2.500000e-01, %19
store double %20, double* %12
%21 = load double, double* %6
%22 = load double, double* %8
%23 = load double, double* %8
%24 = load double, double* %11
%25 = fadd double %23, %24
%26 = load double, double* %9
%27 = load double, double* %12
%28 = fsub double %26, %27
%29 = load double, double* %9
%30 = call double @Bezier(double %21, double %22, double %25, double %28, double %29)
ret double %30
}

LLVM IR (-O2):
define double @CRCompute(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %3, %1
%7 = fmul double %6, 2.500000e-01
%8 = fsub double %4, %2
%9 = fmul double %8, 2.500000e-01
%10 = fadd double %7, %2
%11 = fsub double %3, %9
%12 = tail call double @Bezier(double %0, double %2, double %10, double %11, double %3)
ret double %12
}
/* Type definitions */
typedef int /*<<< orphan*/ word;

/* Variables and functions */
int compute_scrabble_value(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main(void) {
  char word[81];
  printf("Enter a word: ");
  fgets(word, sizeof(word), stdin);
  printf("Score: %d\n", compute_scrabble_value(word));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2e90(%rip),%rax
mov    (%rax),%edx
mov    $0x51,%esi
call   1050 <fgets@plt>
lea    -0x60(%rbp),%rdi
call   1030 <compute_scrabble_value@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x51,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <compute_scrabble_value@plt>
lea    0xea4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter a word: \00"
@stdin = global i32 0
@.str.1 = [11 x i8] c"Score: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 81, i32 %5)
%7 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%8 = call i32 @compute_scrabble_value(i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter a word: \00"
@stdin = global i32 0
@.str.1 = [11 x i8] c"Score: %d\0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 81, i32 %4)
%6 = call i32 @compute_scrabble_value(i8* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
long double test_cargl(_Complex long double x) { return __builtin_cargl(x); }


x86 assembly (clang, -O0):
<test_cargl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
movaps -0x20(%rbp),%xmm0
movaps -0x10(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <cargl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cargl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <cargl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @test_cargl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = call x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @test_cargl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret x86_fp80 %9
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sigint(int signum) {
  endwin();
  exit(0);
}


x86 assembly (clang, -O0):
<sigint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <endwin@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigint>:
push   %rax
xor    %eax,%eax
call   1030 <endwin@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @endwin()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @sigint(i32 %0) {
%2 = tail call i32 (...) @endwin()
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pifacecad_lcd_send_byte(int /*<<< orphan*/);
int /*<<< orphan*/ pifacecad_lcd_set_rs(int);
int /*<<< orphan*/ sleep_ns(int);
void pifacecad_lcd_send_data(uint8_t data) {
  pifacecad_lcd_set_rs(1);
  pifacecad_lcd_send_byte(data);
  sleep_ns(40000);
}


x86 assembly (clang, -O0):
<pifacecad_lcd_send_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <pifacecad_lcd_set_rs@plt>
mov    -0x4(%rbp),%edi
call   1050 <pifacecad_lcd_send_byte@plt>
mov    $0x9c40,%edi
call   1040 <sleep_ns@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pifacecad_lcd_send_data>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <pifacecad_lcd_set_rs@plt>
mov    %ebx,%edi
call   1050 <pifacecad_lcd_send_byte@plt>
mov    $0x9c40,%edi
pop    %rbx
jmp    1040 <sleep_ns@plt>

LLVM IR (-O0):
define void @pifacecad_lcd_send_data(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @pifacecad_lcd_set_rs(i32 1)
%4 = load i32, i32* %2
%5 = call i32 @pifacecad_lcd_send_byte(i32 %4)
%6 = call i32 @sleep_ns(i32 40000)
ret void
}

LLVM IR (-O2):
define void @pifacecad_lcd_send_data(i32 %0) {
%2 = tail call i32 @pifacecad_lcd_set_rs(i32 1)
%3 = tail call i32 @pifacecad_lcd_send_byte(i32 %0)
%4 = tail call i32 @sleep_ns(i32 40000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_timeval_load() {
  printf("NOT IMPLEMENTED:"
         "pa_timeval_load"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"NOT IMPLEMENTED:pa_timeval_load\0A\00"
define i32 @pa_timeval_load() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_timeval_load\00"
define i32 @pa_timeval_load() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Getc();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sym_algs(int /*<<< orphan*/);
extern void preferred_symmetric_algorithms(int len) {
  int i;
  for (i = 0; i < len; i++) {
    printf("\t");
    sym_algs(Getc());
  }
}


x86 assembly (clang, -O0):
<preferred_symmetric_algorithms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1176 <preferred_symmetric_algorithms+0x46>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <Getc@plt>
mov    %eax,%edi
call   1050 <sym_algs@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <preferred_symmetric_algorithms+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preferred_symmetric_algorithms>:
push   %rbx
test   %edi,%edi
jle    115d <preferred_symmetric_algorithms+0x2d>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <Getc@plt>
mov    %eax,%edi
call   1050 <sym_algs@plt>
add    $0xffffffff,%ebx
jne    1140 <preferred_symmetric_algorithms+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @preferred_symmetric_algorithms(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 9)
%6 = tail call i32 (...) @Getc()
%7 = tail call i32 @sym_algs(i32 %6)
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
ret void
}
int fooTiles(struct tile *t) { return 100; }


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

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

LLVM IR (-O0):
%struct.tile = type opaque
define i32 @fooTiles(%struct.tile* %0) {
%2 = alloca %struct.tile*
store %struct.tile* %0, %struct.tile** %2
ret i32 100
}

LLVM IR (-O2):
%struct.tile = type opaque
define i32 @fooTiles(%struct.tile* nocapture readnone %0) {
ret i32 100
}
int pldummy_cgm() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pldummy_cgm() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("session-wrapper called, but no code"
         " is implemented, sorry :)\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"session-wrapper called, but no code is implemented, sorry :)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [61 x i8] c"session-wrapper called, but no code is implemented, sorry :)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_SCALE_BOTTOM();
int /*<<< orphan*/ print_SCALE_SUB1();
int /*<<< orphan*/ print_SCALE_SUB2();
int main(int argc, char *argv[]) {
  print_SCALE_SUB1();
  print_SCALE_SUB2();
  print_SCALE_BOTTOM();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <print_SCALE_SUB1@plt>
mov    $0x0,%al
call   1040 <print_SCALE_SUB2@plt>
mov    $0x0,%al
call   1030 <print_SCALE_BOTTOM@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @print_SCALE_SUB1()
%6 = call i32 (...) @print_SCALE_SUB2()
%7 = call i32 (...) @print_SCALE_BOTTOM()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @print_SCALE_SUB1()
%4 = tail call i32 (...) @print_SCALE_SUB2()
%5 = tail call i32 (...) @print_SCALE_BOTTOM()
ret i32 0
}
void call6k() {}


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

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

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

LLVM IR (-O2):
define void @call6k() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initGameResourceFromDir_test();
int /*<<< orphan*/ initGameResource_test();
int /*<<< orphan*/ setenv(char *, char *, int);
void gameresource_test(void) {
  setenv("HOME", "/home/kichikuou", 1);
  initGameResource_test();
  initGameResourceFromDir_test();
}


x86 assembly (clang, -O0):
<gameresource_test>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
lea    0xec3(%rip),%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
mov    $0x0,%al
call   1050 <initGameResource_test@plt>
mov    $0x0,%al
call   1040 <initGameResourceFromDir_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gameresource_test>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec6(%rip),%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
xor    %eax,%eax
call   1050 <initGameResource_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <initGameResourceFromDir_test@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"HOME\00"
@.str.1 = [16 x i8] c"/home/kichikuou\00"
define void @gameresource_test() {
%1 = call i32 @setenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = call i32 (...) @initGameResource_test()
%3 = call i32 (...) @initGameResourceFromDir_test()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"HOME\00"
@.str.1 = [16 x i8] c"/home/kichikuou\00"
define void @gameresource_test() {
%1 = tail call i32 @setenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i32 (...) @initGameResource_test()
%3 = tail call i32 (...) @initGameResourceFromDir_test()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms(int);
int /*<<< orphan*/ nrf_powerup_nodelay();
void nrf_powerup() {
  nrf_powerup_nodelay();
  delay_ms(2);
}


x86 assembly (clang, -O0):
<nrf_powerup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrf_powerup_nodelay@plt>
mov    $0x2,%edi
call   1040 <delay_ms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_powerup>:
push   %rax
xor    %eax,%eax
call   1030 <nrf_powerup_nodelay@plt>
mov    $0x2,%edi
pop    %rax
jmp    1040 <delay_ms@plt>

LLVM IR (-O0):
define void @nrf_powerup() {
%1 = call i32 (...) @nrf_powerup_nodelay()
%2 = call i32 @delay_ms(i32 2)
ret void
}

LLVM IR (-O2):
define void @nrf_powerup() {
%1 = tail call i32 (...) @nrf_powerup_nodelay()
%2 = tail call i32 @delay_ms(i32 2)
ret void
}
/* Variables and functions */
int fibo(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int n = 20;
  printf("Fibo(%d) = %d\n", n, fibo(n));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Fibo(%d) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @fibo(i32 20)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 20, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf(
      "ptail [-Ei] pattern file\n\t-E extented regex\n\t-i Case insensitive\n");
}


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

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

LLVM IR (-O0):
@.str = [66 x i8] c"ptail [-Ei] pattern file\0A\09-E extented regex\0A\09-i Case insensitive\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [65 x i8] c"ptail [-Ei] pattern file\0A\09-E extented regex\0A\09-i Case insensitive\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
ret void
}
__typeof__(realloc(1, (void *)1)) test_realloc_107(void) {
  return realloc(1, (void *)1);
}


x86 assembly (clang, -O0):
<test_realloc_107>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %rsi,%rdi
call   1030 <realloc@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @test_realloc_107() {
%1 = call i8* @realloc(i8* inttoptr (i64 1 to i8*), i64 1)
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @test_realloc_107() {
%1 = tail call dereferenceable_or_null(1) i8* @realloc(i8* inttoptr (i64 1 to i8*), i64 1)
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ prev_text_size(int /*<<< orphan*/);
int xt_pc_is_valid(const void *pc) {
  return prev_text_size((uint32_t)pc) ? 1 : 0;
}


x86 assembly (clang, -O0):
<xt_pc_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <prev_text_size@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xt_pc_is_valid>:
push   %rax
call   1030 <prev_text_size@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @xt_pc_is_valid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = call i64 @prev_text_size(i32 %4)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 0
ret i32 %8
}

LLVM IR (-O2):
define i32 @xt_pc_is_valid(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i64 @prev_text_size(i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
void bailout(char *msg) {
  perror(msg);
  fprintf(stderr, "errno=%d\n", errno);
  exit(-1);
}


x86 assembly (clang, -O0):
<bailout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<bailout>:
push   %rax
call   1040 <perror@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
lea    0xeb1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"errno=%d\0A\00"
@errno = global i32 0
define void @bailout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"errno=%d\0A\00"
@errno = global i32 0
define void @bailout(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @stderr
%4 = load i32, i32* @errno
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t MyReadFile(int /*<<< orphan*/ *, void *, size_t);
int MyReadFileAndCheck(FILE *file, void *data, size_t size) {
  return (MyReadFile(file, data, size) == size);
}


x86 assembly (clang, -O0):
<MyReadFileAndCheck>:
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),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <MyReadFile@plt>
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MyReadFileAndCheck>:
push   %rbx
mov    %rdx,%rbx
call   1030 <MyReadFile@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @MyReadFileAndCheck(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @MyReadFile(i32* %7, i8* %8, i64 %9)
%11 = load i64, i64* %6
%12 = icmp eq i64 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @MyReadFileAndCheck(i32* %0, i8* %1, i64 %2) {
%4 = tail call i64 @MyReadFile(i32* %0, i8* %1, i64 %2)
%5 = icmp eq i64 %4, %2
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int optopt;
int /*<<< orphan*/ stderr;
void usage(const char *program) {
  fprintf(stderr, "unknown or missing option -- '%c'\n", optopt);
  fprintf(stderr, "use %s -h for more information.\n", program);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eaa(%rip),%r14
mov    (%r14),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
lea    0xebf(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xed1(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"unknown or missing option -- '%c'\0A\00"
@optopt = global i32 0
@.str.1 = [33 x i8] c"use %s -h for more information.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* @optopt
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"unknown or missing option -- '%c'\0A\00"
@optopt = global i32 0
@.str.1 = [33 x i8] c"use %s -h for more information.\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @optopt
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("Linux Generic Software Modem\n"
         "Copyright (c) 1999, 2000 Fabrice Bellard\n"
         "\n"
         "usage: lm [options]"
         "Test options:\n"
         "-v : verbose mode (additive)\n"
         "-s : modem test with the line simulator\n"
         "-m mod: test the modulation 'mod'. 'mod' can be:\n"
         "        v21, v23, v22, v34, v90\n"
         "\n"
         "Sound card support\n"
         "-t : use sound card as modem\n"
         "\n"
         "LTmodem support:\n"
         "-a : test answer mode with ltmodem\n"
         "-c command: use 'command' as modem driver\n"
         "-d number: dial 'number'\n");
}


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

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

LLVM IR (-O0):
@.str = [424 x i8] c"Linux Generic Software Modem\0ACopyright (c) 1999, 2000 Fabrice Bellard\0A\0Ausage: lm [options]Test options:\0A-v : verbose mode (additive)\0A-s : modem test with the line simulator\0A-m mod: test the modulation 'mod'. 'mod' can be:\0A v21, v23, v22, v34, v90\0A\0ASound card support\0A-t : use sound card as modem\0A\0ALTmodem support:\0A-a : test answer mode with ltmodem\0A-c command: use 'command' as modem driver\0A-d number: dial 'number'\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([424 x i8], [424 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [423 x i8] c"Linux Generic Software Modem\0ACopyright (c) 1999, 2000 Fabrice Bellard\0A\0Ausage: lm [options]Test options:\0A-v : verbose mode (additive)\0A-s : modem test with the line simulator\0A-m mod: test the modulation 'mod'. 'mod' can be:\0A v21, v23, v22, v34, v90\0A\0ASound card support\0A-t : use sound card as modem\0A\0ALTmodem support:\0A-a : test answer mode with ltmodem\0A-c command: use 'command' as modem driver\0A-d number: dial 'number'\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([423 x i8], [423 x i8]* @str, i64 0, i64 0))
ret void
}
void work(int i, int j) {}


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

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

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

LLVM IR (-O2):
define void @work(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ malloc(size_t);
int wcslen(int /*<<< orphan*/ const *);
int /*<<< orphan*/ *wmemcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                            size_t);
wchar_t *wcsdup(const wchar_t *str) {
  wchar_t *copy;
  size_t len;
  len = wcslen(str) + 1;
  copy = (wchar_t *)malloc(len * sizeof(wchar_t));
  if (!copy)
    return (NULL);
  return (wmemcpy(copy, str, len));
}


x86 assembly (clang, -O0):
<wcsdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <wcslen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1177 <wcsdup+0x47>
movq   $0x0,-0x8(%rbp)
jmp    118c <wcsdup+0x5c>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <wmemcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <wcslen@plt>
movslq %eax,%rbx
lea    0x4(,%rbx,4),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     116a <wcsdup+0x3a>
add    $0x1,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <wmemcpy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @wcsdup(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i64
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @wcslen(i32* %6)
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = mul i64 %10, 4
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %4
%14 = load i32*, i32** %4
%15 = icmp ne i32* %14, null
br i1 %15, label %17, label %16
16: ; preds = %1
store i32* null, i32** %2
br label %22
17: ; preds = %1
%18 = load i32*, i32** %4
%19 = load i32*, i32** %3
%20 = load i64, i64* %5
%21 = call i32* @wmemcpy(i32* %18, i32* %19, i64 %20)
store i32* %21, i32** %2
br label %22
22: ; preds = %17, %16
%23 = load i32*, i32** %2
ret i32* %23
}

LLVM IR (-O2):
define i32* @wcsdup(i32* %0) {
%2 = tail call i32 @wcslen(i32* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = shl nsw i64 %4, 2
%6 = tail call i64 @malloc(i64 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = inttoptr i64 %6 to i32*
%10 = tail call i32* @wmemcpy(i32* %9, i32* %0, i64 %4)
br label %11
11: ; preds = %1, %8
%12 = phi i32* [ %10, %8 ], [ null, %1 ]
ret i32* %12
}
/* Variables and functions */
double fatorial(double);
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double n;
  scanf("%lf", &n);
  double f = fatorial(n);
  printf("N=%.0lf, F=%.0lf\n", n, f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1040 <fatorial@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
call   1040 <fatorial@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [18 x i8] c"N=%.0lf, F=%.0lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @fatorial(double %5)
store double %6, double* %3
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %7, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [18 x i8] c"N=%.0lf, F=%.0lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call double @fatorial(double %4)
%6 = load double, double* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %6, double %5)
ret i32 0
}