xunge/DecIR huggingface dataset:
/* Variables and functions */
int powf(int, int);
int sinf(float);
float warp_ease_elastic(float t) {
  const float p = 0.5f;
  return 1 + powf(2, -10 * t) *
                 sinf((t - p / 4) * (2 * ((float)3.14159265358979323846)) / p);
}


x86 assembly (clang, -O0):
<warp_ease_elastic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xecb(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeca(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <powf@plt>
mov    %eax,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xea3(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe93(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe83(%rip),%xmm1
divss  %xmm1,%xmm0
call   1030 <sinf@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warp_ease_elastic>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
movss  0xecd(%rip),%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%esi
mov    $0x2,%edi
call   1040 <powf@plt>
movss  0xc(%rsp),%xmm0
addss  0xeb1(%rip),%xmm0
mov    %eax,%ebx
mulss  0xeab(%rip),%xmm0
addss  %xmm0,%xmm0
call   1030 <sinf@plt>
imul   %ebx,%eax
add    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @warp_ease_elastic(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
store float 5.000000e-01, float* %3
%4 = load float, float* %2
%5 = fmul float -1.000000e+01, %4
%6 = fptosi float %5 to i32
%7 = call i32 @powf(i32 2, i32 %6)
%8 = load float, float* %2
%9 = fsub float %8, 1.250000e-01
%10 = fmul float %9, 0x401921FB60000000
%11 = fdiv float %10, 5.000000e-01
%12 = call i32 @sinf(float %11)
%13 = mul nsw i32 %7, %12
%14 = add nsw i32 1, %13
%15 = sitofp i32 %14 to float
ret float %15
}

LLVM IR (-O2):
define float @warp_ease_elastic(float %0) {
%2 = fmul float %0, -1.000000e+01
%3 = fptosi float %2 to i32
%4 = tail call i32 @powf(i32 2, i32 %3)
%5 = fadd float %0, -1.250000e-01
%6 = fmul float %5, 0x401921FB60000000
%7 = fmul float %6, 2.000000e+00
%8 = tail call i32 @sinf(float %7)
%9 = mul nsw i32 %8, %4
%10 = add nsw i32 %9, 1
%11 = sitofp i32 %10 to float
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ libdeflate_free(void *);
void libdeflate_aligned_free(void *ptr) {
  if (ptr)
    libdeflate_free(((void **)ptr)[-1]);
}


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

x86 assembly (clang, -O2):
<libdeflate_aligned_free>:
test   %rdi,%rdi
je     111e <libdeflate_aligned_free+0xe>
mov    -0x8(%rdi),%rdi
jmp    1030 <libdeflate_free@plt>
ret

LLVM IR (-O0):
define void @libdeflate_aligned_free(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 %11
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i8**
%8 = getelementptr inbounds i8*, i8** %7, i64 -1
%9 = load i8*, i8** %8
%10 = call i32 @libdeflate_free(i8* %9)
br label %11
11: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @libdeflate_aligned_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @libdeflate_free(i8* %6)
br label %8
8: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef double int32_t;

/* Variables and functions */
int log(double);
int32_t pressure_to_altitude(int32_t pressure) {
  return (int32_t)(log(1013.0 / pressure) * 7800000);
}


x86 assembly (clang, -O0):
<pressure_to_altitude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
imul   $0x7704c0,%eax,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pressure_to_altitude>:
push   %rax
movsd  0xee7(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <log@plt>
imul   $0x7704c0,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @pressure_to_altitude(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 1.013000e+03, %3
%5 = call i32 @log(double %4)
%6 = mul nsw i32 %5, 7800000
%7 = sitofp i32 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @pressure_to_altitude(double %0) {
%2 = fdiv double 1.013000e+03, %0
%3 = tail call i32 @log(double %2)
%4 = mul nsw i32 %3, 7800000
%5 = sitofp i32 %4 to double
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ updateOwnerSingle(short *, int, short);
void updateOwner(short *world, int myId, short startZone, short endZone) {
  updateOwnerSingle(world, myId, startZone);
  updateOwnerSingle(world, myId, endZone);
}


x86 assembly (clang, -O0):
<updateOwner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %cx,-0xe(%rbp)
mov    %ax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movswl -0xe(%rbp),%edx
call   1030 <updateOwnerSingle@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movswl -0x10(%rbp),%edx
call   1030 <updateOwnerSingle@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<updateOwner>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <updateOwnerSingle@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <updateOwnerSingle@plt>

LLVM IR (-O0):
define void @updateOwner(i16* %0, i32 %1, i16 signext %2, i16 signext %3) {
%5 = alloca i16*
%6 = alloca i32
%7 = alloca i16
%8 = alloca i16
store i16* %0, i16** %5
store i32 %1, i32* %6
store i16 %2, i16* %7
store i16 %3, i16* %8
%9 = load i16*, i16** %5
%10 = load i32, i32* %6
%11 = load i16, i16* %7
%12 = call i32 @updateOwnerSingle(i16* %9, i32 %10, i16 signext %11)
%13 = load i16*, i16** %5
%14 = load i32, i32* %6
%15 = load i16, i16* %8
%16 = call i32 @updateOwnerSingle(i16* %13, i32 %14, i16 signext %15)
ret void
}

LLVM IR (-O2):
define void @updateOwner(i16* %0, i32 %1, i16 signext %2, i16 signext %3) {
%5 = tail call i32 @updateOwnerSingle(i16* %0, i32 %1, i16 signext %2)
%6 = tail call i32 @updateOwnerSingle(i16* %0, i32 %1, i16 signext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ print_policies();
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("memhog [-rNUM] size[kmg] [policy [nodeset]]\n");
  printf("-rNUM repeat memset NUM times\n");
  printf("-H disable transparent hugepages\n");
  print_policies();
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
call   1040 <printf@plt>
lea    0xef9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_policies@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <print_policies@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"memhog [-rNUM] size[kmg] [policy [nodeset]]\0A\00"
@.str.1 = [31 x i8] c"-rNUM repeat memset NUM times\0A\00"
@.str.2 = [34 x i8] c"-H disable transparent hugepages\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (...) @print_policies()
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [44 x i8] c"memhog [-rNUM] size[kmg] [policy [nodeset]]\00"
@str.3 = [30 x i8] c"-rNUM repeat memset NUM times\00"
@str.4 = [33 x i8] c"-H disable transparent hugepages\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 (...) @print_policies()
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double atan(double);
double fn(double t) { return atan(t); }


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

x86 assembly (clang, -O2):
<fn>:
jmp    1030 <atan@plt>

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

LLVM IR (-O2):
define double @fn(double %0) {
%2 = tail call double @atan(double %0)
ret double %2
}
void *_mem_ndup(const char *src, int len) {
  char *dst;
  dst = malloc(len + 1);
  memcpy(dst, src, len);
  dst[len] = '\0';
  return dst;
}


x86 assembly (clang, -O0):
<_mem_ndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mem_ndup>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%eax
movslq %eax,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
movslq %r15d,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @_mem_ndup(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = load i8*, i8** %5
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define noalias i8* @_mem_ndup(i8* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = sext i32 %1 to i64
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 %0, i64 %6, i1 false)
%7 = getelementptr inbounds i8, i8* %5, i64 %6
store i8 0, i8* %7
ret i8* %5
}
/* Type definitions */
struct constructHeader {
  int dummy;
};

/* Variables and functions */
char const *GetConstructNameString(struct constructHeader *);
const char *EnvGetDefgenericName(void *theEnv, void *theDefgeneric) {
  return GetConstructNameString((struct constructHeader *)theDefgeneric);
}


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

x86 assembly (clang, -O2):
<EnvGetDefgenericName>:
mov    %rsi,%rdi
jmp    1030 <GetConstructNameString@plt>

LLVM IR (-O0):
%struct.constructHeader = type { i32 }
define i8* @EnvGetDefgenericName(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to %struct.constructHeader*
%7 = call i8* @GetConstructNameString(%struct.constructHeader* %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.constructHeader = type { i32 }
define i8* @EnvGetDefgenericName(i8* nocapture readnone %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.constructHeader*
%4 = tail call i8* @GetConstructNameString(%struct.constructHeader* %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void divisor(int a) {
  for (int i = 1; i <= a; ++i) {
    if (a % i == 0) {
      printf("%d ", i);
    }
  }
}


x86 assembly (clang, -O0):
<divisor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1160 <divisor+0x50>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    114d <divisor+0x3d>
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
jmp    1152 <divisor+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <divisor+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divisor>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1158 <divisor+0x48>
mov    %edi,%r15d
mov    %edi,%ebp
neg    %ebp
mov    $0x1,%ebx
lea    0xed2(%rip),%r14
jmp    1142 <divisor+0x32>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
je     1158 <divisor+0x48>
mov    %r15d,%eax
cltd
idiv   %ebx
test   %edx,%edx
jne    1130 <divisor+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <divisor+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @divisor(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %4
3: ; preds = %10, %1
ret void
4: ; preds = %1, %10
%5 = phi i32 [ %11, %10 ], [ 1, %1 ]
%6 = srem i32 %0, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %10
10: ; preds = %4, %8
%11 = add nuw i32 %5, 1
%12 = icmp eq i32 %5, %0
br i1 %12, label %3, label %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ isspace(int);
int _fgetc_skip_whitespace(FILE *stream) {
  while (1) {
    int c = fgetc(stream);
    if (c == EOF || !isspace(c)) {
      return c;
    }
  }
}


x86 assembly (clang, -O0):
<_fgetc_skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ea6(%rip),%rcx
cmp    (%rcx),%eax
je     115b <_fgetc_skip_whitespace+0x3b>
mov    -0xc(%rbp),%edi
call   1040 <isspace@plt>
cmp    $0x0,%eax
jne    1164 <_fgetc_skip_whitespace+0x44>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    112c <_fgetc_skip_whitespace+0xc>

x86 assembly (clang, -O2):
<_fgetc_skip_whitespace>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2eba(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
cmp    (%r14),%eax
je     114a <_fgetc_skip_whitespace+0x2a>
mov    %ebp,%edi
call   1040 <isspace@plt>
test   %eax,%eax
jne    1130 <_fgetc_skip_whitespace+0x10>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @_fgetc_skip_whitespace(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %1, %16
%5 = load i32*, i32** %2
%6 = call i32 @fgetc(i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = load i32, i32* %3
%12 = call i32 @isspace(i32 %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %10, %4
%15 = load i32, i32* %3
ret i32 %15
16: ; preds = %10
br label %4
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @_fgetc_skip_whitespace(i32* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @isspace(i32 %3)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %2
9: ; preds = %2, %6
ret i32 %3
}
/* Variables and functions */
void *Mem_Malloc(size_t, char const *);
int /*<<< orphan*/ Mem_Set(void *, int /*<<< orphan*/, size_t);
void *Mem_Calloc(size_t nobjs, size_t size, const char *funcname) {
  void *p;
  p = Mem_Malloc(size * nobjs, funcname);
  Mem_Set(p, 0, size * nobjs);
  return p;
}


x86 assembly (clang, -O0):
<Mem_Calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
imul   -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <Mem_Malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
imul   -0x8(%rbp),%rdx
xor    %esi,%esi
call   1040 <Mem_Set@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mem_Calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
mov    %rdx,%rsi
call   1030 <Mem_Malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <Mem_Set@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @Mem_Calloc(i64 %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i64, i64* %5
%9 = load i64, i64* %4
%10 = mul i64 %8, %9
%11 = load i8*, i8** %6
%12 = call i8* @Mem_Malloc(i64 %10, i8* %11)
store i8* %12, i8** %7
%13 = load i8*, i8** %7
%14 = load i64, i64* %5
%15 = load i64, i64* %4
%16 = mul i64 %14, %15
%17 = call i32 @Mem_Set(i8* %13, i32 0, i64 %16)
%18 = load i8*, i8** %7
ret i8* %18
}

LLVM IR (-O2):
define i8* @Mem_Calloc(i64 %0, i64 %1, i8* %2) {
%4 = mul i64 %1, %0
%5 = tail call i8* @Mem_Malloc(i64 %4, i8* %2)
%6 = tail call i32 @Mem_Set(i8* %5, i32 0, i64 %4)
ret i8* %5
}
void xsbt_init() {}


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

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

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

LLVM IR (-O2):
define void @xsbt_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  int alas;
  int tinggi;
  float luas_segitiga;
  alas = 4;
  tinggi = 5;
  luas_segitiga = 0.5 * alas * tinggi;
  printf("Luas Segitiga = %.1f \n\n", luas_segitiga);
  system("PAUSE");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
movl   $0x5,-0x18(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xeaf(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
lea    0xea1(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Luas Segitiga = %.1f \0A\0A\00"
@.str.1 = [6 x i8] c"PAUSE\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 4, i32* %6
store i32 5, i32* %7
%9 = load i32, i32* %6
%10 = sitofp i32 %9 to double
%11 = fmul double 5.000000e-01, %10
%12 = load i32, i32* %7
%13 = sitofp i32 %12 to double
%14 = fmul double %11, %13
%15 = fptrunc double %14 to float
store float %15, float* %8
%16 = load float, float* %8
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float %16)
%18 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Luas Segitiga = %.1f \0A\0A\00"
@.str.1 = [6 x i8] c"PAUSE\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float 1.000000e+01)
%4 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ tcgetsize(int, int *, int *);
int ttysize(int *rowsp, int *colsp) {
  int x;
  for (x = 0; x < 3; ++x) {
    if (tcgetsize(x, rowsp, colsp) >= 0) {
      return (1);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<ttysize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    116a <ttysize+0x5a>
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <tcgetsize@plt>
cmp    $0x0,%rax
jl     1157 <ttysize+0x47>
movl   $0x1,-0x4(%rbp)
jmp    1171 <ttysize+0x61>
jmp    115c <ttysize+0x4c>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1127 <ttysize+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttysize>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <tcgetsize@plt>
mov    $0x1,%ebx
test   %rax,%rax
jns    1166 <ttysize+0x56>
mov    $0x1,%ebx
mov    $0x1,%edi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <tcgetsize@plt>
test   %rax,%rax
jns    1166 <ttysize+0x56>
mov    $0x2,%edi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <tcgetsize@plt>
mov    %rax,%rbx
shr    $0x3f,%rbx
xor    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @ttysize(i32* %0, i32* %1) {
%3 = tail call i64 @tcgetsize(i32 0, i32* %0, i32* %1)
%4 = icmp sgt i64 %3, -1
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = tail call i64 @tcgetsize(i32 1, i32* %0, i32* %1)
%7 = icmp sgt i64 %6, -1
br i1 %7, label %13, label %8
8: ; preds = %5
%9 = tail call i64 @tcgetsize(i32 2, i32* %0, i32* %1)
%10 = lshr i64 %9, 63
%11 = trunc i64 %10 to i32
%12 = xor i32 %11, 1
br label %13
13: ; preds = %8, %5, %2
%14 = phi i32 [ 1, %2 ], [ 1, %5 ], [ %12, %8 ]
ret i32 %14
}
unsigned int explicit_unsigned_int_to_unsigned_int(unsigned int src) {
  return (unsigned int)src;
}


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

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

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

LLVM IR (-O2):
define i32 @explicit_unsigned_int_to_unsigned_int(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ isspace(unsigned char);
int allws(const char *cp) {
  while (*cp)
    if (!isspace(((unsigned char)(*cp++))))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<allws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <allws+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    1155 <allws+0x45>
movl   $0x0,-0x4(%rbp)
jmp    1161 <allws+0x51>
jmp    111c <allws+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allws>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     113b <allws+0x2b>
add    $0x1,%rbx
movzbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1120 <allws+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @allws(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %15, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
%11 = load i8, i8* %9
%12 = call i32 @isspace(i8 zeroext %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %8
store i32 0, i32* %2
br label %17
15: ; preds = %8
br label %4
16: ; preds = %4
store i32 1, i32* %2
br label %17
17: ; preds = %16, %14
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @allws(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = tail call i32 @isspace(i8 zeroext %4)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %2
10: ; preds = %2, %6
%11 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %11
}
/* Variables and functions */
float cRand(int, int, int);
int /*<<< orphan*/ checkSeed();
float uRand(int min, int max) {
  checkSeed();
  return cRand(min, max, 1);
}


x86 assembly (clang, -O0):
<uRand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <checkSeed@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
call   1030 <cRand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uRand>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <checkSeed@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <cRand@plt>

LLVM IR (-O0):
define float @uRand(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @checkSeed()
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call float @cRand(i32 %6, i32 %7, i32 1)
ret float %8
}

LLVM IR (-O2):
define float @uRand(i32 %0, i32 %1) {
%3 = tail call i32 (...) @checkSeed()
%4 = tail call float @cRand(i32 %0, i32 %1, i32 1)
ret float %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rus_lowercase(uint32_t cp) {
  if (cp >= 0x410 && cp <= 0x042F)
    return cp + 0x20;
  if (cp == 0x401)
    return 0x451;
  return cp;
}


x86 assembly (clang, -O0):
<rus_lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x410,-0x8(%rbp)
jl     112f <rus_lowercase+0x2f>
cmpl   $0x42f,-0x8(%rbp)
jg     112f <rus_lowercase+0x2f>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    114e <rus_lowercase+0x4e>
cmpl   $0x401,-0x8(%rbp)
jne    1148 <rus_lowercase+0x48>
movl   $0x451,-0x4(%rbp)
jmp    114e <rus_lowercase+0x4e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rus_lowercase>:
lea    -0x410(%rdi),%ecx
cmp    $0x401,%edi
mov    $0x451,%eax
cmovne %edi,%eax
lea    0x20(%rdi),%edx
cmp    $0x20,%ecx
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define i32 @rus_lowercase(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 1040
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 1071
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 32
store i32 %11, i32* %2
br label %18
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 1025
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 1105, i32* %2
br label %18
16: ; preds = %12
%17 = load i32, i32* %3
store i32 %17, i32* %2
br label %18
18: ; preds = %16, %15, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @rus_lowercase(i32 %0) {
%2 = add i32 %0, -1040
%3 = icmp ult i32 %2, 32
%4 = add nsw i32 %0, 32
%5 = icmp eq i32 %0, 1025
%6 = select i1 %5, i32 1105, i32 %0
%7 = select i1 %3, i32 %4, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void test(void (*func4test)(char *, unsigned), char *str, unsigned length) {
  func4test(str, length);
  printf("The replaced string is \"%s\"\n", str);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   *%rax
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %edx,%esi
call   *%rax
lea    0xedb(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [29 x i8] c"The replaced string is \22%s\22\0A\00"
define void @test(void (i8*, i32)* nocapture %0, i8* %1, i32 %2) {
tail call void %0(i8* %1, i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: bruteln existing symlink\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Usage: bruteln existing symlink\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [33 x i8] c"Usage: bruteln existing symlink\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int test_imm_9Buint8_mem(unsigned char *val) {
  return ((*val) & (-0x9B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Buint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff65,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_9Buint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 101
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Postman_send(char *);
void Proxy_send(char *message) { Postman_send(message); }


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

x86 assembly (clang, -O2):
<Proxy_send>:
jmp    1030 <Postman_send@plt>

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

LLVM IR (-O2):
define void @Proxy_send(i8* %0) {
%2 = tail call i32 @Postman_send(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displaygoal();
int /*<<< orphan*/ input();
void drawgoalscreen(void) {
  displaygoal();
  input();
}


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

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

LLVM IR (-O0):
define void @drawgoalscreen() {
%1 = call i32 (...) @displaygoal()
%2 = call i32 (...) @input()
ret void
}

LLVM IR (-O2):
define void @drawgoalscreen() {
%1 = tail call i32 (...) @displaygoal()
%2 = tail call i32 (...) @input()
ret void
}
void gtk_toggle_tool_button_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toggle_tool_button_get_type() {
ret void
}
/* Variables and functions */
double exp(double);
double pow(double, double);
double e_ft(double ft) {
  if (ft > 10)
    return 1.0;
  else {
    double a = -1.680 * pow(ft, 0.3325);
    return 213.7 * exp(a);
  }
}


x86 assembly (clang, -O0):
<e_ft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1156 <e_ft+0x36>
movsd  0xed4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    119a <e_ft+0x7a>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb5(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe9d(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe77(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_ft>:
push   %rax
ucomisd 0xedf(%rip),%xmm0
jbe    1135 <e_ft+0x15>
movsd  0xecd(%rip),%xmm0
pop    %rax
ret
movsd  0xed3(%rip),%xmm1
call   1040 <pow@plt>
mulsd  0xece(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xec9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @e_ft(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp ogt double %5, 1.000000e+01
br i1 %6, label %7, label %8
7: ; preds = %1
store double 1.000000e+00, double* %2
br label %15
8: ; preds = %1
%9 = load double, double* %3
%10 = call double @pow(double %9, double 3.325000e-01)
%11 = fmul double -1.680000e+00, %10
store double %11, double* %4
%12 = load double, double* %4
%13 = call double @exp(double %12)
%14 = fmul double 2.137000e+02, %13
store double %14, double* %2
br label %15
15: ; preds = %8, %7
%16 = load double, double* %2
ret double %16
}

LLVM IR (-O2):
define double @e_ft(double %0) {
%2 = fcmp ogt double %0, 1.000000e+01
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call double @pow(double %0, double 3.325000e-01)
%5 = fmul double %4, -1.680000e+00
%6 = tail call double @exp(double %5)
%7 = fmul double %6, 2.137000e+02
br label %8
8: ; preds = %1, %3
%9 = phi double [ %7, %3 ], [ 1.000000e+00, %1 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ die(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strsignal(int);
void handler(int sig) { die(8, "%s", strsignal(sig)); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <strsignal@plt>
mov    %eax,%edx
mov    $0x8,%edi
lea    0xebf(%rip),%rsi
call   1040 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
call   1030 <strsignal@plt>
lea    0xed3(%rip),%rsi
mov    $0x8,%edi
mov    %eax,%edx
pop    %rax
jmp    1040 <die@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @handler(i32 %0) {
%2 = tail call i32 @strsignal(i32 %0)
%3 = tail call i32 @die(i32 8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
float __divsf3(float a __attribute__((unused)),
               float b __attribute__((unused))) {
  return 0.0;
}


x86 assembly (clang, -O0):
<__divsf3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__divsf3>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @__divsf3(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @__divsf3(float %0, float %1) {
ret float 0.000000e+00
}
/* Variables and functions */
int RTLD_LAZY;
int RTLD_LOCAL;
int /*<<< orphan*/ dlerror();
void *dlopen(char *, int);
int /*<<< orphan*/ print_error(char *, int /*<<< orphan*/);
void *load_shared_object(char *name) {
  void *handle = NULL;
  handle = dlopen(name, (RTLD_LAZY | RTLD_LOCAL));
  if (NULL == handle) {
    print_error("dlopen", dlerror());
  }
  return handle;
}


x86 assembly (clang, -O0):
<load_shared_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e91(%rip),%rax
mov    (%rax),%esi
mov    0x2e78(%rip),%rax
or     (%rax),%esi
call   1050 <dlopen@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1184 <load_shared_object+0x54>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %eax,%esi
lea    0xe81(%rip),%rdi
call   1040 <print_error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_shared_object>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    0x2e91(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
call   1050 <dlopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1165 <load_shared_object+0x35>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
call   1040 <print_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@RTLD_LAZY = global i32 0
@RTLD_LOCAL = global i32 0
@.str = [7 x i8] c"dlopen\00"
define i8* @load_shared_object(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = load i32, i32* @RTLD_LAZY
%6 = load i32, i32* @RTLD_LOCAL
%7 = or i32 %5, %6
%8 = call i8* @dlopen(i8* %4, i32 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp eq i8* null, %9
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = call i32 (...) @dlerror()
%13 = call i32 @print_error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@RTLD_LAZY = global i32 0
@RTLD_LOCAL = global i32 0
@.str = [7 x i8] c"dlopen\00"
define i8* @load_shared_object(i8* %0) {
%2 = load i32, i32* @RTLD_LAZY
%3 = load i32, i32* @RTLD_LOCAL
%4 = or i32 %3, %2
%5 = tail call i8* @dlopen(i8* %0, i32 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = tail call i32 (...) @dlerror()
%9 = tail call i32 @print_error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %1
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ SV_WriteIPList();
void Cmd_WriteIP_f(void) { SV_WriteIPList(); }


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

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

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

LLVM IR (-O2):
define void @Cmd_WriteIP_f() {
%1 = tail call i32 (...) @SV_WriteIPList()
ret void
}
double coco_double_min(const double a, const double b) {
  if (a <= b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<coco_double_min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1131 <coco_double_min+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <coco_double_min+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<coco_double_min>:
movapd %xmm0,%xmm2
cmplesd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @coco_double_min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp ole double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @coco_double_min(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void Log(char *x, ...) { ; }


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

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

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

LLVM IR (-O2):
define void @Log(i8* nocapture %0, ...) {
ret void
}
unsigned ZSTD_versionNumber(void) { return (0 * 100 * 100 + 6 * 100 + 1); }


x86 assembly (clang, -O0):
<ZSTD_versionNumber>:
push   %rbp
mov    %rsp,%rbp
mov    $0x259,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ZSTD_versionNumber() {
ret i32 601
}

LLVM IR (-O2):
define i32 @ZSTD_versionNumber() {
ret i32 601
}
/* Variables and functions */
int strcmp(char *, char *);
int comp(const void *p1, const void *p2) {
  return strcmp((char *)p2, (char *)p1);
}


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

x86 assembly (clang, -O2):
<comp>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
ret i32 %3
}
/* Variables and functions */
int strtol(char *, int /*<<< orphan*/ *, int);
char parse_byte(char *ch) {
  char s[3];
  char val;
  s[0] = ch[0];
  s[1] = ch[1];
  s[2] = 0;
  val = 0xff & strtol(s, NULL, 16);
  return val;
}


x86 assembly (clang, -O0):
<parse_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0xa(%rbp)
movb   $0x0,-0x9(%rbp)
lea    -0xb(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1030 <strtol@plt>
and    $0xff,%eax
mov    %al,-0xc(%rbp)
movsbl -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_byte>:
push   %rax
mov    (%rdi),%al
mov    %al,0x5(%rsp)
mov    0x1(%rdi),%al
mov    %al,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x5(%rsp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <strtol@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @parse_byte(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i8]
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
store i8 %11, i8* %12
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 0, i8* %13
%14 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%15 = call i32 @strtol(i8* %14, i32* null, i32 16)
%16 = and i32 255, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %4
%18 = load i8, i8* %4
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @parse_byte(i8* nocapture %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = load i8, i8* %0
store i8 %4, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 1
store i8 %6, i8* %7
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 2
store i8 0, i8* %8
%9 = call i32 @strtol(i8* nocapture %3, i32* null, i32 16)
%10 = trunc i32 %9 to i8
ret i8 %10
}