xunge/DecIR huggingface dataset:
void freeaddrinfo(struct addrinfo *ai) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<freeaddrinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
lea    0xedb(%rip),%rsi
lea    0xee6(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
jmp    1133 <freeaddrinfo+0x23>

x86 assembly (clang, -O2):
<freeaddrinfo>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
nopl   0x0(%rax,%rax,1)
jmp    1130 <freeaddrinfo+0x20>

LLVM IR (-O0):
%struct.addrinfo = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.freeaddrinfo = [13 x i8] c"freeaddrinfo\00"
define void @freeaddrinfo(%struct.addrinfo* %0) {
%2 = alloca %struct.addrinfo*
store %struct.addrinfo* %0, %struct.addrinfo** %2
%3 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.freeaddrinfo, i64 0, i64 0))
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
%struct.addrinfo = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.freeaddrinfo = [13 x i8] c"freeaddrinfo\00"
define void @freeaddrinfo(%struct.addrinfo* nocapture readnone %0) {
%2 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.freeaddrinfo, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int path_mkdir(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/,
               int /*<<< orphan*/ *);
int path_create(const char *path, mode_t mode) {
  return path_mkdir(path, NULL, mode, NULL);
}


x86 assembly (clang, -O0):
<path_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rsi
call   1030 <path_mkdir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_create>:
mov    %esi,%edx
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <path_mkdir@plt>

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

LLVM IR (-O2):
define i32 @path_create(i8* %0, i32 %1) {
%3 = tail call i32 @path_mkdir(i8* %0, i32* null, i32 %1, i32* null)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *check_alloc(size_t n, void *ptr, const char *file, int line) {
  void *ret = realloc(ptr, n);
  if (ret == NULL) {
    fprintf(stderr, "Could not allocate memory at '%s' line %i\n", file, line);
    exit(1);
  }
  return ret;
}


x86 assembly (clang, -O0):
<check_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1189 <check_alloc+0x59>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xe86(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_alloc>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1040 <realloc@plt>
test   %rax,%rax
je     1152 <check_alloc+0x22>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Could not allocate memory at '%s' line %i\0A\00"
define i8* @check_alloc(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i64 %0, i64* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %6
%11 = load i64, i64* %5
%12 = call i8* @realloc(i8* %10, i64 %11)
store i8* %12, i8** %9
%13 = load i8*, i8** %9
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %21
15: ; preds = %4
%16 = load i32, i32* @stderr
%17 = load i8*, i8** %7
%18 = load i32, i32* %8
%19 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %17, i32 %18)
%20 = call i32 @exit(i32 1)
unreachable
21: ; preds = %4
%22 = load i8*, i8** %9
ret i8* %22
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Could not allocate memory at '%s' line %i\0A\00"
define noalias i8* @check_alloc(i64 %0, i8* nocapture %1, i8* %2, i32 %3) {
%5 = tail call i8* @realloc(i8* %1, i64 %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %4
ret i8* %5
}
int fitsBits(int x, int n) {
  int offs = 32 + (~n + 1);
  int y = x << offs;
  y = y >> offs;
  return !(x + ~y + 1);
}


x86 assembly (clang, -O0):
<fitsBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
add    $0x1,%eax
add    $0x20,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
add    %ecx,%eax
add    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitsBits>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%edx
shl    %cl,%edx
sar    %cl,%edx
xor    %eax,%eax
cmp    %edi,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @fitsBits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = xor i32 %7, -1
%9 = add nsw i32 %8, 1
%10 = add nsw i32 32, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = shl i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = ashr i32 %14, %15
store i32 %16, i32* %6
%17 = load i32, i32* %3
%18 = load i32, i32* %6
%19 = xor i32 %18, -1
%20 = add nsw i32 %17, %19
%21 = add nsw i32 %20, 1
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @fitsBits(i32 %0, i32 %1) {
%3 = sub i32 32, %1
%4 = shl i32 %0, %3
%5 = ashr i32 %4, %3
%6 = icmp eq i32 %5, %0
%7 = zext i1 %6 to i32
ret i32 %7
}
float jc_if_map_to_01(float value, float min, float max) {
  return (value - min) / (max - min);
}


x86 assembly (clang, -O0):
<jc_if_map_to_01>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jc_if_map_to_01>:
subss  %xmm1,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @jc_if_map_to_01(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fsub float %7, %8
%10 = load float, float* %6
%11 = load float, float* %5
%12 = fsub float %10, %11
%13 = fdiv float %9, %12
ret float %13
}

LLVM IR (-O2):
define float @jc_if_map_to_01(float %0, float %1, float %2) {
%4 = fsub float %0, %1
%5 = fsub float %2, %1
%6 = fdiv float %4, %5
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_mul(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void SANDSHREW_BN_mul(BIGNUM *result, BIGNUM *input, BN_CTX *ctx) {
  BN_mul(result, input, input, ctx);
}


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

x86 assembly (clang, -O2):
<SANDSHREW_BN_mul>:
mov    %rdx,%rcx
mov    %rsi,%rdx
jmp    1030 <BN_mul@plt>

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

LLVM IR (-O2):
define void @SANDSHREW_BN_mul(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @BN_mul(i32* %0, i32* %1, i32* %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void depFreeFileMemory(void *pvFile, void *pvOpaque) { free(pvFile); }


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

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

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

LLVM IR (-O2):
define void @depFreeFileMemory(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
float inv_q30_to_float(long q30) { return (float)q30 / ((float)(1 << 30)); }


x86 assembly (clang, -O0):
<inv_q30_to_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cvtsi2ssq -0x8(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_q30_to_float>:
cvtsi2ss %rdi,%xmm0
mulss  0xef3(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @inv_q30_to_float(i64 %0) {
%2 = sitofp i64 %0 to float
%3 = fmul float %2, 0x3E10000000000000
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int v1(int);
int v2(int);
int v3(int);
int main(int argc, char const *argv[]) {
  printf("v1: %d, v2: %d, v3: %d\n", v1(10), v2(10), v3(10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
call   1040 <v1@plt>
mov    %eax,-0x18(%rbp)
mov    $0xa,%edi
call   1060 <v2@plt>
mov    %eax,-0x14(%rbp)
mov    $0xa,%edi
call   1050 <v3@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    %eax,%ecx
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0xa,%edi
call   1040 <v1@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1060 <v2@plt>
mov    %eax,%ebp
mov    $0xa,%edi
call   1050 <v3@plt>
lea    0xe94(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"v1: %d, v2: %d, v3: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @v1(i32 10)
%7 = call i32 @v2(i32 10)
%8 = call i32 @v3(i32 10)
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"v1: %d, v2: %d, v3: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @v1(i32 10)
%4 = tail call i32 @v2(i32 10)
%5 = tail call i32 @v3(i32 10)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4, i32 %5)
ret i32 0
}
float min(float a, float b) {
  if (a <= b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1130 <min+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <min+0x3a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
movaps %xmm0,%xmm2
cmpless %xmm1,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define float @min(float %0, float %1) {
%3 = fcmp ole float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ Print(char *);
scalar_t__ readboard();
int show_visitors(int /*<<< orphan*/);
int show_winners();
void showscores(void) {
  int i, j;
  if (readboard() < 0) {
    return;
  }
  i = show_winners();
  j = show_visitors(0);
  if ((i + j) == 0)
    Print("The scoreboard is empty.");
  else
    Print("");
}


x86 assembly (clang, -O0):
<showscores>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <readboard@plt>
cmp    $0x0,%rax
jge    115e <showscores+0x1e>
jmp    119e <showscores+0x5e>
mov    $0x0,%al
call   1050 <show_winners@plt>
mov    %eax,-0x4(%rbp)
xor    %edi,%edi
call   1060 <show_visitors@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    $0x0,%eax
jne    1192 <showscores+0x52>
lea    0xe78(%rip),%rdi
call   1040 <Print@plt>
jmp    119e <showscores+0x5e>
lea    0xe7f(%rip),%rdi
call   1040 <Print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showscores>:
push   %rbx
xor    %eax,%eax
call   1030 <readboard@plt>
test   %rax,%rax
js     1177 <showscores+0x37>
xor    %eax,%eax
call   1050 <show_winners@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1060 <show_visitors@plt>
add    %ebx,%eax
lea    0xe9a(%rip),%rax
lea    0xeab(%rip),%rdi
cmove  %rax,%rdi
pop    %rbx
jmp    1040 <Print@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"The scoreboard is empty.\00"
@.str.1 = [1 x i8] zeroinitializer
define void @showscores() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 (...) @readboard()
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %17
6: ; preds = %0
%7 = call i32 (...) @show_winners()
store i32 %7, i32* %1
%8 = call i32 @show_visitors(i32 0)
store i32 %8, i32* %2
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %9, %10
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %6
%14 = call i32 @Print(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %17
15: ; preds = %6
%16 = call i32 @Print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %5, %15, %13
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"The scoreboard is empty.\00"
@.str.1 = [1 x i8] zeroinitializer
define void @showscores() {
%1 = tail call i64 (...) @readboard()
%2 = icmp slt i64 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i32 (...) @show_winners()
%5 = tail call i32 @show_visitors(i32 0)
%6 = sub i32 0, %5
%7 = icmp eq i32 %4, %6
%8 = select i1 %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%9 = tail call i32 @Print(i8* %8)
br label %10
10: ; preds = %3, %0
ret void
}
void f4_1(void) { extern int x10; }


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

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

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

LLVM IR (-O2):
define void @f4_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  float tab[20];
  float tab2[20];
  float tab3[20];
  float tab4[20];
  printf("Going to read: %d elements\n", 1);
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Going to read: %d elements\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [20 x float]
%6 = alloca [20 x float]
%7 = alloca [20 x float]
%8 = alloca [20 x float]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Going to read: %d elements\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int bs_get_info(int, char *, char **);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int bs_stats_tube(int fd, char *tube, char **yaml) {
  char command[512];
  snprintf(command, 512, "stats-tube %s\r\n", tube);
  return bs_get_info(fd, command, yaml);
}


x86 assembly (clang, -O0):
<bs_stats_tube>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x220(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x200,%esi
lea    0xeb3(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x220(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <bs_get_info@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bs_stats_tube>:
push   %rbp
push   %r14
push   %rbx
sub    $0x200,%rsp
mov    %rdx,%rbx
mov    %rsi,%rcx
mov    %edi,%ebp
lea    0xec6(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x200,%esi
call   1040 <snprintf@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <bs_get_info@plt>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"stats-tube %s\0D\0A\00"
define i32 @bs_stats_tube(i32 %0, i8* %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca [512 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = call i32 @snprintf(i8* %8, i32 512, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* %4
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%13 = load i8**, i8*** %6
%14 = call i32 @bs_get_info(i32 %11, i8* %12, i8** %13)
ret i32 %14
}

LLVM IR (-O2):
@.str = [16 x i8] c"stats-tube %s\0D\0A\00"
define i32 @bs_stats_tube(i32 %0, i8* %1, i8** %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 512, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = call i32 @bs_get_info(i32 %0, i8* %5, i8** %2)
ret i32 %7
}
/* Variables and functions */
int ceil(double);
unsigned int SecToUsec(double time) {
  int us = ceil(time * 1e6);
  return us;
}


x86 assembly (clang, -O0):
<SecToUsec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SecToUsec>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @SecToUsec(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 1.000000e+06
%6 = call i32 @ceil(double %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @SecToUsec(double %0) {
%2 = fmul double %0, 1.000000e+06
%3 = tail call i32 @ceil(double %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_header() {
  printf("Content-type: text/html; charset=koi8-r\n\n");
  printf(
      "<html>\n	<head>\n		<title>AllTer:-> File "
      "Search</title>\n		<link href=\"alter.css\" type=\"text/css\" "
      "rel=StyleSheet>\n		<meta http-equiv=Content-Type "
      "content=\"text/html; charset=koi8-r\">\n		<link rel=\"search\" "
      "type=\"application/opensearchdescription+xml\" title=\"Allter File "
      "search\" href=\"/opensearch.xml\" />\n	</head>\n<body bgcolor=#ffffff "
      "text=#000000>");
}


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

x86 assembly (clang, -O2):
<print_header>:
push   %rax
lea    0x1030(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Content-type: text/html; charset=koi8-r\0A\0A\00"
@.str.1 = [344 x i8] c"<html>\0A\09<head>\0A\09\09<title>AllTer:-> File Search</title>\0A\09\09<link href=\22alter.css\22 type=\22text/css\22 rel=StyleSheet>\0A\09\09<meta http-equiv=Content-Type content=\22text/html; charset=koi8-r\22>\0A\09\09<link rel=\22search\22 type=\22application/opensearchdescription+xml\22 title=\22Allter File search\22 href=\22/opensearch.xml\22 />\0A\09</head>\0A<body bgcolor=#ffffff text=>\00"
define void @print_header() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([344 x i8], [344 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [344 x i8] c"<html>\0A\09<head>\0A\09\09<title>AllTer:-> File Search</title>\0A\09\09<link href=\22alter.css\22 type=\22text/css\22 rel=StyleSheet>\0A\09\09<meta http-equiv=Content-Type content=\22text/html; charset=koi8-r\22>\0A\09\09<link rel=\22search\22 type=\22application/opensearchdescription+xml\22 title=\22Allter File search\22 href=\22/opensearch.xml\22 />\0A\09</head>\0A<body bgcolor=#ffffff text=>\00"
@str = [41 x i8] c"Content-type: text/html; charset=koi8-r\0A\00"
define void @print_header() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([344 x i8], [344 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_5Euint8_mem(unsigned char *val) {
  return ((*val) & (-0x5E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_5Euint8_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, -94
%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_5Euint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -94
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *f(int *p) { return p; }


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

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

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

LLVM IR (-O2):
define i8* @f(i32* readnone %0) {
%2 = bitcast i32* %0 to i8*
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Menu() {
  printf("\n################¿QUE INFORMACION DESEA OBTENER DEL PROCESO "
         "AMIGO?#################\n");
  printf("1- Los usuarios logueados del sistema\n2- La hora del sistema \n3- "
         "Nombre de la maquina\n4- Temperatura de la localidad donde esta "
         "ubicado\n-5 'Salir'\n \n");
}


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

x86 assembly (clang, -O2):
<Menu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf31(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [86 x i8] c"\0A################\C2\BFQUE INFORMACION DESEA OBTENER DEL PROCESO AMIGO?#################\0A\00"
@.str.1 = [150 x i8] c"1- Los usuarios logueados del sistema\0A2- La hora del sistema \0A3- Nombre de la maquina\0A4- Temperatura de la localidad donde esta ubicado\0A-5 'Salir'\0A \0A\00"
define void @Menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [85 x i8] c"\0A################\C2\BFQUE INFORMACION DESEA OBTENER DEL PROCESO AMIGO?#################\00"
@str.2 = [149 x i8] c"1- Los usuarios logueados del sistema\0A2- La hora del sistema \0A3- Nombre de la maquina\0A4- Temperatura de la localidad donde esta ubicado\0A-5 'Salir'\0A \00"
define void @Menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([149 x i8], [149 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(const char *pname) {
  printf("konvertiert eine KCC-Datei nach .WAV\n");
  printf("%s <KCC File> <output.wav>\n", pname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"konvertiert eine KCC-Datei nach .WAV\0A\00"
@.str.1 = [28 x i8] c"%s <KCC File> <output.wav>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"%s <KCC File> <output.wav>\0A\00"
@str = [37 x i8] c"konvertiert eine KCC-Datei nach .WAV\00"
define void @usage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int IsAlNum(char C) {
  return (C >= 'a' && C <= 'z') || (C >= 'A' && C <= 'Z') ||
         (C >= '0' && C <= '9');
}


x86 assembly (clang, -O0):
<IsAlNum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <IsAlNum+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    116d <IsAlNum+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1148 <IsAlNum+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    116d <IsAlNum+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x3(%rbp)
jl     1167 <IsAlNum+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsAlNum>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
add    $0xd0,%dil
cmp    $0xa,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @IsAlNum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 48
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @IsAlNum(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ultoa(long, char *, int);
char *ltoa(long val, char *s, int radix) {
  if (val >= 0) {
    ultoa(val, s, radix);
  } else {
    *s = '-';
    ultoa(-val, s + 1, radix);
  }
  return s;
}


x86 assembly (clang, -O0):
<ltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jl     1143 <ltoa+0x33>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <ultoa@plt>
jmp    1162 <ltoa+0x52>
mov    -0x10(%rbp),%rax
movb   $0x2d,(%rax)
xor    %eax,%eax
mov    %eax,%edi
sub    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
mov    -0x14(%rbp),%edx
call   1030 <ultoa@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltoa>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
js     111e <ltoa+0xe>
mov    %rbx,%rsi
jmp    1128 <ltoa+0x18>
movb   $0x2d,(%rbx)
neg    %rdi
lea    0x1(%rbx),%rsi
call   1030 <ultoa@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ltoa(i64 %0, i8* returned %1, i32 %2) {
%4 = icmp sgt i64 %0, -1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @ultoa(i64 %0, i8* %1, i32 %2)
br label %11
7: ; preds = %3
store i8 45, i8* %1
%8 = sub nsw i64 0, %0
%9 = getelementptr inbounds i8, i8* %1, i64 1
%10 = tail call i32 @ultoa(i64 %8, i8* %9, i32 %2)
br label %11
11: ; preds = %7, %5
ret i8* %1
}
/* Variables and functions */
int abs(float);
float dist(float a, float b) {
  return abs((a < b ? a : b) - (a > b ? a : b)) * (a < b ? 1 : -1);
}


x86 assembly (clang, -O0):
<dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1144 <dist+0x34>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    114e <dist+0x3e>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1176 <dist+0x66>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1180 <dist+0x70>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
subss  %xmm1,%xmm0
call   1030 <abs@plt>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
mov    $0xffffffff,%ecx
mov    $0x1,%edx
ucomiss %xmm1,%xmm0
cmova  %edx,%ecx
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist>:
push   %rax
movss  %xmm1,(%rsp)
movaps %xmm0,%xmm2
movss  %xmm0,0x4(%rsp)
minss  %xmm1,%xmm0
maxss  %xmm1,%xmm2
subss  %xmm2,%xmm0
call   1030 <abs@plt>
mov    %eax,%ecx
neg    %ecx
movss  (%rsp),%xmm0
ucomiss 0x4(%rsp),%xmm0
cmova  %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @dist(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
%14 = load float, float* %3
%15 = load float, float* %4
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load float, float* %3
br label %21
19: ; preds = %12
%20 = load float, float* %4
br label %21
21: ; preds = %19, %17
%22 = phi float [ %18, %17 ], [ %20, %19 ]
%23 = fsub float %13, %22
%24 = call i32 @abs(float %23)
%25 = load float, float* %3
%26 = load float, float* %4
%27 = fcmp olt float %25, %26
%28 = zext i1 %27 to i64
%29 = select i1 %27, i32 1, i32 -1
%30 = mul nsw i32 %24, %29
%31 = sitofp i32 %30 to float
ret float %31
}

LLVM IR (-O2):
define float @dist(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
%5 = fcmp ogt float %0, %1
%6 = select i1 %5, float %0, float %1
%7 = fsub float %4, %6
%8 = tail call i32 @abs(float %7)
%9 = sub nsw i32 0, %8
%10 = select i1 %3, i32 %8, i32 %9
%11 = sitofp i32 %10 to float
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, char *, size_t);
void swap(void *i, void *j, size_t size) {
  char temp[size];
  memcpy(temp, i, size);
  memcpy(i, j, size);
  memcpy(j, temp, size);
}


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

x86 assembly (clang, -O2):
<swap>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsp,%rbx
lea    0xf(%rdx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1030 <memcpy@plt>
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%9 = load i64, i64* %6
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %7
%11 = alloca i8, i64 %9
store i64 %9, i64* %8
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = call i32 @memcpy(i8* %15, i8* %16, i64 %17)
%19 = load i8*, i8** %5
%20 = load i64, i64* %6
%21 = call i32 @memcpy(i8* %19, i8* %11, i64 %20)
%22 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
define void @swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8, i64 %2
%5 = call i32 @memcpy(i8* %4, i8* %0, i64 %2)
%6 = call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%7 = call i32 @memcpy(i8* %1, i8* %4, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ banktitle(char *);
void obank2(void) {
  banktitle("Welcome to the 5th level branch office of the First National Bank "
            "of Larn.");
}


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

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

LLVM IR (-O0):
@.str = [75 x i8] c"Welcome to the 5th level branch office of the First National Bank of Larn.\00"
define void @obank2() {
%1 = call i32 @banktitle(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [75 x i8] c"Welcome to the 5th level branch office of the First National Bank of Larn.\00"
define void @obank2() {
%1 = tail call i32 @banktitle(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
ret void
}
int fibsum1() {
  int term1 = 1;
  int term2 = 2;
  int sum = 2;
  while (term2 < 4000000) {
    int i;
    for (i = 0; i < 3; i++) {
      int temp = term2;
      term2 += term1;
      term1 = temp;
    }
    sum += term2;
  }
  if (term2 > 4000000)
    sum -= term2;
  return sum;
}


x86 assembly (clang, -O0):
<fibsum1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
cmpl   $0x3d0900,-0x8(%rbp)
jge    1168 <fibsum1+0x68>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    115a <fibsum1+0x5a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <fibsum1+0x2d>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <fibsum1+0x19>
cmpl   $0x3d0900,-0x8(%rbp)
jle    1180 <fibsum1+0x80>
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibsum1>:
mov    $0x2,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
nop
mov    %esi,%eax
add    %ecx,%edx
add    %edx,%ecx
mov    %edx,%edi
add    %ecx,%edi
lea    (%rdi,%rax,1),%esi
mov    %ecx,%edx
mov    %edi,%ecx
cmp    $0x3d0900,%edi
jl     1110 <fibsum1+0x10>
cmove  %esi,%eax
ret

LLVM IR (-O0):
define i32 @fibsum1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
store i32 2, i32* %3
br label %6
6: ; preds = %22, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 4000000
br i1 %8, label %9, label %26
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %19, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i32, i32* %2
store i32 %14, i32* %5
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = add nsw i32 %16, %15
store i32 %17, i32* %2
%18 = load i32, i32* %5
store i32 %18, i32* %1
br label %19
19: ; preds = %13
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %10
22: ; preds = %10
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = add nsw i32 %24, %23
store i32 %25, i32* %3
br label %6
26: ; preds = %6
%27 = load i32, i32* %2
%28 = icmp sgt i32 %27, 4000000
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = load i32, i32* %2
%31 = load i32, i32* %3
%32 = sub nsw i32 %31, %30
store i32 %32, i32* %3
br label %33
33: ; preds = %29, %26
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
define i32 @fibsum1() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %6, %1 ]
%3 = phi i32 [ 2, %0 ], [ %8, %1 ]
%4 = phi i32 [ 2, %0 ], [ %7, %1 ]
%5 = add nsw i32 %2, %4
%6 = add nsw i32 %4, %5
%7 = add nsw i32 %5, %6
%8 = add nsw i32 %7, %3
%9 = icmp slt i32 %7, 4000000
br i1 %9, label %1, label %10
10: ; preds = %1
%11 = icmp eq i32 %7, 4000000
%12 = select i1 %11, i32 %8, i32 %3
ret i32 %12
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *comdCalloc(size_t num, size_t iSize) { return calloc(num, iSize); }


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

x86 assembly (clang, -O2):
<comdCalloc>:
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define noalias i8* @comdCalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
void H_Pass_8_C() {}


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

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

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

LLVM IR (-O2):
define void @H_Pass_8_C() {
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char);
unsigned short isxdigit(char c) {
  return isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    117d <isxdigit+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1158 <isxdigit+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x46,%ecx
mov    %al,-0x2(%rbp)
jle    117d <isxdigit+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
jl     1177 <isxdigit+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x66,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @isxdigit(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i16
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ fmod(int, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  printf("fmod(2, 7) = [%lf]\n", fmod(2, 7));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [20 x i8] c"fmod(2, 7) = [%lf]\0A\00"
define i32 @main() {
%1 = tail call i32 @fmod(i32 2, i32 7)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
unsigned short inw(unsigned int);
int /*<<< orphan*/ outb(unsigned char, unsigned int);
unsigned short zf_readw(unsigned char port) {
  unsigned short tmp;
  {
    outb(port, 536U);
    tmp = inw(538U);
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<zf_readw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x218,%esi
movzbl -0x1(%rbp),%edi
call   1040 <outb@plt>
mov    $0x21a,%edi
call   1030 <inw@plt>
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zf_readw>:
push   %rax
mov    $0x218,%esi
call   1040 <outb@plt>
mov    $0x21a,%edi
pop    %rax
jmp    1030 <inw@plt>

LLVM IR (-O0):
define zeroext i16 @zf_readw(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i16
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @outb(i8 zeroext %4, i32 536)
%6 = call zeroext i16 @inw(i32 538)
store i16 %6, i16* %3
%7 = load i16, i16* %3
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @zf_readw(i8 zeroext %0) {
%2 = tail call i32 @outb(i8 zeroext %0, i32 536)
%3 = tail call zeroext i16 @inw(i32 538)
ret i16 %3
}
void foo08() {}


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

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

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

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