xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ IPPROTO_IPV6;
int /*<<< orphan*/ IPV6_V6ONLY;
int diminuto_ipc_set_socket(int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int diminuto_ipc6_set_ipv6only(int fd, int enable) {
  return diminuto_ipc_set_socket(fd, IPPROTO_IPV6, IPV6_V6ONLY, !!enable);
}


x86 assembly (clang, -O0):
<diminuto_ipc6_set_ipv6only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%ecx
call   1030 <diminuto_ipc_set_socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_ipc6_set_ipv6only>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%edx
xor    %ecx,%ecx
test   %esi,%esi
setne  %cl
mov    %eax,%esi
jmp    1030 <diminuto_ipc_set_socket@plt>

LLVM IR (-O0):
@IPPROTO_IPV6 = global i32 0
@IPV6_V6ONLY = global i32 0
define i32 @diminuto_ipc6_set_ipv6only(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* @IPPROTO_IPV6
%7 = load i32, i32* @IPV6_V6ONLY
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
%13 = call i32 @diminuto_ipc_set_socket(i32 %5, i32 %6, i32 %7, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
@IPPROTO_IPV6 = global i32 0
@IPV6_V6ONLY = global i32 0
define i32 @diminuto_ipc6_set_ipv6only(i32 %0, i32 %1) {
%3 = load i32, i32* @IPPROTO_IPV6
%4 = load i32, i32* @IPV6_V6ONLY
%5 = icmp ne i32 %1, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @diminuto_ipc_set_socket(i32 %0, i32 %3, i32 %4, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ dump_error(char *);
scalar_t__ malloc(unsigned int);
unsigned char *ucvector(int nl, int nh) {
  unsigned char *v;
  v = (unsigned char *)malloc((unsigned)(nh - nl + 1) * sizeof(unsigned char));
  if (!v)
    dump_error("allocation failure in cvector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<ucvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <ucvector+0x3f>
lea    0xea6(%rip),%rdi
call   1030 <dump_error@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucvector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x1(%rsi),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <ucvector+0x23>
lea    0xec2(%rip),%rdi
call   1030 <dump_error@plt>
movslq %ebp,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @ucvector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = mul i64 %10, 1
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %5
%15 = load i8*, i8** %5
%16 = icmp ne i8* %15, null
br i1 %16, label %19, label %17
17: ; preds = %2
%18 = call i32 @dump_error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
%20 = load i8*, i8** %5
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = sub i64 0, %22
%24 = getelementptr inbounds i8, i8* %20, i64 %23
ret i8* %24
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @ucvector(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = tail call i64 @malloc(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @dump_error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = inttoptr i64 %5 to i8*
%11 = sext i32 %0 to i64
%12 = sub nsw i64 0, %11
%13 = getelementptr inbounds i8, i8* %10, i64 %12
ret i8* %13
}
/* Variables and functions */
float **free_arrayN(void *, int);
float **free_float(float **array, int first) {
  return free_arrayN((void *)array, 2);
}


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

x86 assembly (clang, -O2):
<free_float>:
mov    $0x2,%esi
jmp    1030 <free_arrayN@plt>

LLVM IR (-O0):
define float** @free_float(float** %0, i32 %1) {
%3 = alloca float**
%4 = alloca i32
store float** %0, float*** %3
store i32 %1, i32* %4
%5 = load float**, float*** %3
%6 = bitcast float** %5 to i8*
%7 = call float** @free_arrayN(i8* %6, i32 2)
ret float** %7
}

LLVM IR (-O2):
define float** @free_float(float** %0, i32 %1) {
%3 = bitcast float** %0 to i8*
%4 = tail call float** @free_arrayN(i8* %3, i32 2)
ret float** %4
}
/* Variables and functions */
int Headers();
int video_sequence(int *);
int Decode_Bitstream(void) {
  int ret;
  int Bitstream_Framenum;
  {
    Bitstream_Framenum = 0;
    while (1) {
      ret = Headers();
      if (ret == 1) {
        ret = video_sequence(&Bitstream_Framenum);
      } else {
        return (ret);
      }
    }
  }
}


x86 assembly (clang, -O0):
<Decode_Bitstream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <Headers@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1154 <Decode_Bitstream+0x34>
lea    -0x8(%rbp),%rdi
call   1030 <video_sequence@plt>
mov    %eax,-0x4(%rbp)
jmp    115d <Decode_Bitstream+0x3d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    112f <Decode_Bitstream+0xf>

x86 assembly (clang, -O2):
<Decode_Bitstream>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
xor    %eax,%eax
call   1040 <Headers@plt>
cmp    $0x1,%eax
jne    1154 <Decode_Bitstream+0x34>
lea    0xc(%rsp),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <video_sequence@plt>
xor    %eax,%eax
call   1040 <Headers@plt>
cmp    $0x1,%eax
je     1140 <Decode_Bitstream+0x20>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Decode_Bitstream() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %0, %11
%4 = call i32 (...) @Headers()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @video_sequence(i32* %2)
store i32 %8, i32* %1
br label %11
9: ; preds = %3
%10 = load i32, i32* %1
ret i32 %10
11: ; preds = %7
br label %3
}

LLVM IR (-O2):
define i32 @Decode_Bitstream() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 (...) @Headers()
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %9
5: ; preds = %0, %5
%6 = call i32 @video_sequence(i32* %1)
%7 = call i32 (...) @Headers()
%8 = icmp eq i32 %7, 1
br i1 %8, label %5, label %9
9: ; preds = %5, %0
%10 = phi i32 [ %3, %0 ], [ %7, %5 ]
ret i32 %10
}
/* Type definitions */
struct ne_md5_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ne_md5_ctx *);
void ne_md5_destroy_ctx(struct ne_md5_ctx *ctx) { free(ctx); }


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

x86 assembly (clang, -O2):
<ne_md5_destroy_ctx>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.ne_md5_ctx = type { i32 }
define void @ne_md5_destroy_ctx(%struct.ne_md5_ctx* %0) {
%2 = alloca %struct.ne_md5_ctx*
store %struct.ne_md5_ctx* %0, %struct.ne_md5_ctx** %2
%3 = load %struct.ne_md5_ctx*, %struct.ne_md5_ctx** %2
%4 = call i32 @free(%struct.ne_md5_ctx* %3)
ret void
}

LLVM IR (-O2):
%struct.ne_md5_ctx = type { i32 }
define void @ne_md5_destroy_ctx(%struct.ne_md5_ctx* nocapture %0) {
%2 = tail call i32 @free(%struct.ne_md5_ctx* %0)
ret void
}
/* Variables and functions */
int checker_read_unsigned_int(int, char const *, int, unsigned int *);
int checker_read_out_unsigned_int(const char *name, int eof_error_flag,
                                  unsigned int *p_val) {
  return checker_read_unsigned_int(1, name, eof_error_flag, p_val);
}


x86 assembly (clang, -O0):
<checker_read_out_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%edi
call   1030 <checker_read_unsigned_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker_read_out_unsigned_int>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <checker_read_unsigned_int@plt>

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

LLVM IR (-O2):
define i32 @checker_read_out_unsigned_int(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @checker_read_unsigned_int(i32 1, i8* %0, i32 %1, i32* %2)
ret i32 %4
}
void geom_polar_vec_adjust(const double *xp, const double *xm, double *fac) {
  fac[0] = 1.0;
  fac[1] = 1.0;
  fac[2] = 1.0;
}


x86 assembly (clang, -O0):
<geom_polar_vec_adjust>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xed4(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_polar_vec_adjust>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdx)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x10(%rdx)
ret

LLVM IR (-O0):
define void @geom_polar_vec_adjust(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %6
%8 = getelementptr inbounds double, double* %7, i64 0
store double 1.000000e+00, double* %8
%9 = load double*, double** %6
%10 = getelementptr inbounds double, double* %9, i64 1
store double 1.000000e+00, double* %10
%11 = load double*, double** %6
%12 = getelementptr inbounds double, double* %11, i64 2
store double 1.000000e+00, double* %12
ret void
}

LLVM IR (-O2):
define void @geom_polar_vec_adjust(double* nocapture readnone %0, double* nocapture readnone %1, double* nocapture writeonly %2) {
%4 = bitcast double* %2 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %4
%5 = getelementptr inbounds double, double* %2, i64 2
store double 1.000000e+00, double* %5
ret void
}
int wordLen(char *s) {
  int i = 0;
  while (s[i] != '\0')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<wordLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <wordLen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <wordLen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordLen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <wordLen+0x10>
ret

LLVM IR (-O0):
define i32 @wordLen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @wordLen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
main() {
  int i;
  for (i = 0; i < 5; i++)
    printf(i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1149 <main+0x39>
movslq -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x3,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x4,%edi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = call i32 (i8*, ...) @printf(i8* %9)
br label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %3
14: ; preds = %3
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) null)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) inttoptr (i64 1 to i8*))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) inttoptr (i64 2 to i8*))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) inttoptr (i64 3 to i8*))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) inttoptr (i64 4 to i8*))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x10() {
  Assert_real((isalnum(16) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              85, ("isalnum should be 0 for 0x10"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x10>:
push   %rax
mov    $0x10,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x55,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x10\00"
define void @t_isalnum_0x10() {
%1 = call i64 @isalnum(i32 16)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x10\00"
define void @t_isalnum_0x10() {
%1 = tail call i64 @isalnum(i32 16)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ignore_alarm(int signum) { return; }


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

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

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

LLVM IR (-O2):
define void @ignore_alarm(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, int, int);
void foo(int x, int y) {
  printf("demonstrating assert(%d < %d)\n", x, y);
  assert(x < y);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
xor    %edi,%edi
cmp    %ebx,%ebp
setl   %dil
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"demonstrating assert(%d < %d)\0A\00"
define void @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"demonstrating assert(%d < %d)\0A\00"
define void @foo(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = icmp slt i32 %0, %1
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void CRYPTO_free(void *str) { free(str); }


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

x86 assembly (clang, -O2):
<CRYPTO_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @CRYPTO_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test123(void) { printf("Hello 123\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Hello 123\0A\00"
define void @test123() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"Hello 123\00"
define void @test123() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ driver();
int /*<<< orphan*/ printf(char *);
int main() {
  register int local;
  driver();
  printf("exiting\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"exiting\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @driver()
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"exiting\00"
define i32 @main() {
%1 = tail call i32 (...) @driver()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int coq_fle(double x, double y) { return x <= y; }


x86 assembly (clang, -O0):
<coq_fle>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coq_fle>:
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @coq_fle(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ole double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @coq_fle(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void print_categories(void) {}


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

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

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

LLVM IR (-O2):
define void @print_categories() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void version() {
  fprintf(stderr, "compress 4.1\n");
  fprintf(stderr, "Options: ");
  fprintf(stderr, "BITS = %d\n", 16);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
mov    $0x10,%edx
mov    $0x0,%al
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xedd(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed7(%rip),%rsi
mov    $0x10,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"compress 4.1\0A\00"
@.str.1 = [10 x i8] c"Options: \00"
@.str.2 = [11 x i8] c"BITS = %d\0A\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 16)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"compress 4.1\0A\00"
@.str.1 = [10 x i8] c"Options: \00"
@.str.2 = [11 x i8] c"BITS = %d\0A\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 16)
ret void
}
void ledon() { *(int *)0xC02200F0 = 0x46; }


x86 assembly (clang, -O0):
<ledon>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc02200f0,%eax
movl   $0x46,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ledon>:
mov    $0xc02200f0,%eax
movl   $0x46,(%rax)
ret

LLVM IR (-O0):
define void @ledon() {
store i32 70, i32* inttoptr (i64 3223453936 to i32*)
ret void
}

LLVM IR (-O2):
define void @ledon() {
store i32 70, i32* inttoptr (i64 3223453936 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutWireOctahedron();
void drawWireOctahedron(void) { glutWireOctahedron(); }


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

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

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

LLVM IR (-O2):
define void @drawWireOctahedron() {
%1 = tail call i32 (...) @glutWireOctahedron()
ret void
}
/* Variables and functions */
char *getenv(char *);
char *wfile_getenv(char *envvar) { return (getenv(envvar)); }


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

x86 assembly (clang, -O2):
<wfile_getenv>:
jmp    1030 <getenv@plt>

LLVM IR (-O0):
define i8* @wfile_getenv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @getenv(i8* %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @wfile_getenv(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vsnprintf(char *, int, char const *, int /*<<< orphan*/);
int vsprintf(char *str, const char *format, va_list args) {
  int ret;
  ret = vsnprintf(str, 0x7FFFFFFF, format, args);
  return ret;
}


x86 assembly (clang, -O0):
<vsprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x7fffffff,%esi
call   1030 <vsnprintf@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x7fffffff,%esi
jmp    1030 <vsnprintf@plt>

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

LLVM IR (-O2):
define i32 @vsprintf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @vsnprintf(i8* %0, i32 2147483647, i8* %1, i32 %2)
ret i32 %4
}
void hl_global_init() {}


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

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

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

LLVM IR (-O2):
define void @hl_global_init() {
ret void
}
/* Variables and functions */
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int m = 40;
  printf("%d", fib(m));
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @fib(i32 40)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bwlzh_decompress_gen(unsigned char *, int const,
                                        unsigned int *, int /*<<< orphan*/);
void bwlzh_decompress(unsigned char *input, const int nvals,
                      unsigned int *vals) {
  bwlzh_decompress_gen(input, nvals, vals, 0);
}


x86 assembly (clang, -O0):
<bwlzh_decompress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <bwlzh_decompress_gen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwlzh_decompress>:
xor    %ecx,%ecx
jmp    1030 <bwlzh_decompress_gen@plt>

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

LLVM IR (-O2):
define void @bwlzh_decompress(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @bwlzh_decompress_gen(i8* %0, i32 %1, i32* %2, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int put_float(float x) {
  printf("%f\n", x);
  return 0;
}


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

x86 assembly (clang, -O2):
<put_float>:
push   %rax
lea    0xee8(%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 @put_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @put_float(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %0)
ret i32 0
}
void sighand(int signum) {
  printf("\n %s: \n", __func__);
  printf("Interrupt signal rec'd \n");
}


x86 assembly (clang, -O0):
<sighand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    0xedf(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighand>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed9(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.sighand = [8 x i8] c"sighand\00"
@.str.1 = [25 x i8] c"Interrupt signal rec'd \0A\00"
define void @sighand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.sighand, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.sighand = [8 x i8] c"sighand\00"
@str = [24 x i8] c"Interrupt signal rec'd \00"
define void @sighand(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.sighand, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  void seek(char[], char[]);
  char str[20], c[20];
  printf("input string:");
  gets(str);
  seek(str, c);
  printf("The vowel letters are:%s\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1050 <seek@plt>
lea    -0x40(%rbp),%rsi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <seek@plt>
lea    0xea7(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"input string:\00"
@.str.1 = [26 x i8] c"The vowel letters are:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca [20 x i8]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i32 @gets(i8* %5)
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"input string:\00"
@.str.1 = [26 x i8] c"The vowel letters are:%s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @gets(i8* %3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
void ft_div_mod(int a, int b, int *div, int *mod) {
  if (b != 0) {
    *div = a / b;
    *mod = a % b;
  }
}


x86 assembly (clang, -O0):
<ft_div_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1138 <ft_div_mod+0x38>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_div_mod>:
test   %esi,%esi
je     1111 <ft_div_mod+0x11>
mov    %rdx,%r8
mov    %edi,%eax
cltd
idiv   %esi
mov    %eax,(%r8)
mov    %edx,(%rcx)
ret

LLVM IR (-O0):
define void @ft_div_mod(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %4
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = sdiv i32 %12, %13
%15 = load i32*, i32** %7
store i32 %14, i32* %15
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = srem i32 %16, %17
%19 = load i32*, i32** %8
store i32 %18, i32* %19
br label %20
20: ; preds = %11, %4
ret void
}

LLVM IR (-O2):
define void @ft_div_mod(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = icmp eq i32 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = sdiv i32 %0, %1
store i32 %7, i32* %2
%8 = srem i32 %0, %1
store i32 %8, i32* %3
br label %9
9: ; preds = %6, %4
ret void
}
void devpts_kill_index(struct inode *ptmx_inode, int idx) {}


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

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

LLVM IR (-O0):
%struct.inode = type opaque
define void @devpts_kill_index(%struct.inode* %0, i32 %1) {
%3 = alloca %struct.inode*
%4 = alloca i32
store %struct.inode* %0, %struct.inode** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.inode = type opaque
define void @devpts_kill_index(%struct.inode* nocapture %0, i32 %1) {
ret void
}
double floor(double value) {
  int temporal = (int)value;
  return value < temporal ? temporal - 1 : temporal;
}


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1133 <floor+0x33>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1139 <floor+0x39>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor>:
cvttsd2si %xmm0,%eax
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @floor(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i32
store i32 %5, i32* %3
%6 = load double, double* %2
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = fcmp olt double %6, %8
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
br label %15
13: ; preds = %1
%14 = load i32, i32* %3
br label %15
15: ; preds = %13, %10
%16 = phi i32 [ %12, %10 ], [ %14, %13 ]
%17 = sitofp i32 %16 to double
ret double %17
}

LLVM IR (-O2):
define double @floor(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fcmp ogt double %3, %0
%5 = sext i1 %4 to i32
%6 = add nsw i32 %5, %2
%7 = sitofp i32 %6 to double
ret double %7
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
struct Node *create(int /*<<< orphan*/);
int /*<<< orphan*/ free_all_registers(struct Node *);
int /*<<< orphan*/ parse_commands_list(struct Node *, char *);
int main() {
  struct Node *fst = create(0);
  parse_commands_list(
      fst, "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<"
           "<+++++++++++++++.>.+++.------.--------.>+.>.");
  free_all_registers(fst);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <create@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1050 <parse_commands_list@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free_all_registers@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <create@plt>
mov    %rax,%rbx
lea    0xebe(%rip),%rsi
mov    %rax,%rdi
call   1050 <parse_commands_list@plt>
mov    %rbx,%rdi
call   1030 <free_all_registers@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
@.str = [112 x i8] c"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.Node*
store i32 0, i32* %1
%3 = call %struct.Node* @create(i32 0)
store %struct.Node* %3, %struct.Node** %2
%4 = load %struct.Node*, %struct.Node** %2
%5 = call i32 @parse_commands_list(%struct.Node* %4, i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str, i64 0, i64 0))
%6 = load %struct.Node*, %struct.Node** %2
%7 = call i32 @free_all_registers(%struct.Node* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.Node = type { i32 }
@.str = [112 x i8] c"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.\00"
define i32 @main() {
%1 = tail call %struct.Node* @create(i32 0)
%2 = tail call i32 @parse_commands_list(%struct.Node* %1, i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @free_all_registers(%struct.Node* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x26_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x26_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x26_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x26_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x26_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void setlocale() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @setlocale() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_41(int Salt, int Parameter) {
  unsigned b = Salt * 0x1CF71007 + 0x5E17;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_41>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x1cf71007,-0x4(%rbp),%eax
add    $0x5e17,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_41>:
imul   $0x1cf71007,%edi,%edi
add    $0x5e17,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_41(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 485953543
%8 = add nsw i32 %7, 24087
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_41(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 485953543
%4 = add nsw i32 %3, 24087
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ swap_fs_free();
int swap_validate_size(int /*<<< orphan*/);
unsigned swap_maximal_size(void) { return swap_validate_size(swap_fs_free()); }


x86 assembly (clang, -O0):
<swap_maximal_size>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <swap_fs_free@plt>
mov    %eax,%edi
call   1030 <swap_validate_size@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_maximal_size>:
push   %rax
xor    %eax,%eax
call   1040 <swap_fs_free@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <swap_validate_size@plt>

LLVM IR (-O0):
define i32 @swap_maximal_size() {
%1 = call i32 (...) @swap_fs_free()
%2 = call i32 @swap_validate_size(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @swap_maximal_size() {
%1 = tail call i32 (...) @swap_fs_free()
%2 = tail call i32 @swap_validate_size(i32 %1)
ret i32 %2
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned char)234;
    if ((state[0UL] >> (unsigned char)4) & (unsigned char)1) {
      state[0UL] += state[0UL];
    } else {
      state[0UL] += state[0UL];
    }
    output[0UL] = state[0UL] + (unsigned char)142;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0x30dd5ac,%rax
add    $0xea,%rax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
sar    $0x4,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1147 <RandomFunc+0x47>
movzbl -0x11(%rbp),%ecx
movzbl -0x11(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x11(%rbp)
jmp    1154 <RandomFunc+0x54>
movzbl -0x11(%rbp),%ecx
movzbl -0x11(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
add    $0x8e,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%al
add    %al,%al
add    $0xba,%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i64
%10 = add i64 %9, 51238316
%11 = add i64 %10, 234
%12 = trunc i64 %11 to i8
%13 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %12, i8* %13
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = ashr i32 %16, 4
%18 = and i32 %17, 1
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %29
20: ; preds = %2
%21 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = add nsw i32 %26, %23
%28 = trunc i32 %27 to i8
store i8 %28, i8* %24
br label %38
29: ; preds = %2
%30 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = add nsw i32 %35, %32
%37 = trunc i32 %36 to i8
store i8 %37, i8* %33
br label %38
38: ; preds = %29, %20
%39 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = add nsw i32 %41, 142
%43 = trunc i32 %42 to i8
%44 = load i8*, i8** %4
%45 = getelementptr inbounds i8, i8* %44, i64 0
store i8 %43, i8* %45
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = shl i8 %3, 1
%5 = add i8 %4, -70
store i8 %5, i8* %1
ret void
}