xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ affichageMenu();
int /*<<< orphan*/ choixFonction(int);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ viderTampon();
int main(int argc, char **argv) {
  while (1) {
    affichageMenu();
    int c;
    scanf("%1d", &c);
    viderTampon();
    choixFonction(c);
  }
}


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    $0x0,%al
call   1060 <affichageMenu@plt>
lea    0xe9c(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x0,%al
call   1030 <viderTampon@plt>
mov    -0x14(%rbp),%edi
call   1050 <choixFonction@plt>
jmp    1156 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%r14
lea    0x4(%rsp),%rbx
xor    %eax,%eax
call   1060 <affichageMenu@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
call   1030 <viderTampon@plt>
mov    0x4(%rsp),%edi
call   1050 <choixFonction@plt>
jmp    1150 <main+0x10>

LLVM IR (-O0):
@.str = [4 x i8] c"%1d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %2, %7
%8 = call i32 (...) @affichageMenu()
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %6)
%10 = call i32 (...) @viderTampon()
%11 = load i32, i32* %6
%12 = call i32 @choixFonction(i32 %11)
br label %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"%1d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
br label %5
5: ; preds = %2, %5
%6 = call i32 (...) @affichageMenu()
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = call i32 (...) @viderTampon()
%9 = load i32, i32* %3
%10 = call i32 @choixFonction(i32 %9)
br label %5
}
__typeof__(isalpha(1)) test_isalpha_1(void) { return isalpha(1); }


x86 assembly (clang, -O0):
<test_isalpha_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <isalpha@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_isalpha_1() {
%1 = call i32 @isalpha(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_isalpha_1() {
%1 = tail call i32 @isalpha(i32 1)
ret i32 %1
}
__attribute__((no, noclone)) signed __int128 t114_3sub(signed __int128 y) {
  signed __int128 r;
  if (__builtin_sub_overflow(
          (signed __int128)((
              (signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1))),
          y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t114_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
movabs $0x7fffffffffffffff,%rdx
ff ff 7f
sub    %rax,%rdx
seto   %al
not    %rcx
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    1160 <t114_3sub+0x50>
jmp    1167 <t114_3sub+0x57>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t114_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
not    %r14
movabs $0x7fffffffffffffff,%rbx
ff ff 7f
sub    %rsi,%rbx
jno    1130 <t114_3sub+0x20>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t114_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 170141183460469231731687303715884105727, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t114_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 170141183460469231731687303715884105727, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int buffer_insert_with_len(char *, int *, int *, int, char *,
                           int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int buffer_insert(char *buffer, int *start, int *stop, int limit,
                  char *string) {
  return buffer_insert_with_len(buffer, start, stop, limit, string,
                                strlen(string));
}


x86 assembly (clang, -O0):
<buffer_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x34(%rbp),%ecx
mov    -0x30(%rbp),%r8
mov    %eax,%r9d
call   1040 <buffer_insert_with_len@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_insert>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8,%rbx
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbp
mov    %r8,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %rbx,%r8
mov    %eax,%r9d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <buffer_insert_with_len@plt>

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

LLVM IR (-O2):
define i32 @buffer_insert(i8* %0, i32* %1, i32* %2, i32 %3, i8* %4) {
%6 = tail call i32 @strlen(i8* %4)
%7 = tail call i32 @buffer_insert_with_len(i8* %0, i32* %1, i32* %2, i32 %3, i8* %4, i32 %6)
ret i32 %7
}
/* Variables and functions */
size_t min_size(size_t a, size_t b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<min_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <min_size+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <min_size+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_size>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @min_size(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 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @min_size(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void H360S1V1toHSV255(double h1, double s1, double v1, double *h2, double *s2,
                      double *v2) {
  *h2 = (h1 * 255.) / 360.;
  *s2 = s1 * 255.;
  *v2 = v1 * 255.;
}


x86 assembly (clang, -O0):
<H360S1V1toHSV255>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movsd  0xed9(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xeb8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xea3(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<H360S1V1toHSV255>:
movsd  0xef8(%rip),%xmm3
mulsd  %xmm3,%xmm0
divsd  0xef4(%rip),%xmm0
movsd  %xmm0,(%rdi)
mulsd  %xmm3,%xmm1
movsd  %xmm1,(%rsi)
mulsd  %xmm3,%xmm2
movsd  %xmm2,(%rdx)
ret

LLVM IR (-O0):
define void @H360S1V1toHSV255(double %0, double %1, double %2, double* %3, double* %4, double* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double* %3, double** %10
store double* %4, double** %11
store double* %5, double** %12
%13 = load double, double* %7
%14 = fmul double %13, 2.550000e+02
%15 = fdiv double %14, 3.600000e+02
%16 = load double*, double** %10
store double %15, double* %16
%17 = load double, double* %8
%18 = fmul double %17, 2.550000e+02
%19 = load double*, double** %11
store double %18, double* %19
%20 = load double, double* %9
%21 = fmul double %20, 2.550000e+02
%22 = load double*, double** %12
store double %21, double* %22
ret void
}

LLVM IR (-O2):
define void @H360S1V1toHSV255(double %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = fmul double %0, 2.550000e+02
%8 = fdiv double %7, 3.600000e+02
store double %8, double* %3
%9 = fmul double %1, 2.550000e+02
store double %9, double* %4
%10 = fmul double %2, 2.550000e+02
store double %10, double* %5
ret void
}
/* Variables and functions */
long random();
long our_random() { return random(); }


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

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

LLVM IR (-O0):
define i64 @our_random() {
%1 = call i64 (...) @random()
ret i64 %1
}

LLVM IR (-O2):
define i64 @our_random() {
%1 = tail call i64 (...) @random()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char const *);
int /*<<< orphan*/ stderr;
void config_fatal_error(void *data, int lineno, const char *msg) {
  fprintf(stderr, "configuration file error on line %d: %s\n", lineno, msg);
}


x86 assembly (clang, -O0):
<config_fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_fatal_error>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"configuration file error on line %d: %s\0A\00"
define void @config_fatal_error(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"configuration file error on line %d: %s\0A\00"
define void @config_fatal_error(i8* nocapture readnone %0, i32 %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func();
int main(int argc, char *argv[]) {
  func();
  func();
  func();
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @func()
%4 = tail call i32 (...) @func()
%5 = tail call i32 (...) @func()
ret i32 0
}
/* Type definitions */
struct openconnect_info {
  int dummy;
};
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ EVP_sha1();
int get_cert_fingerprint(struct openconnect_info *, int /*<<< orphan*/ *,
                         int /*<<< orphan*/, char *);
int get_cert_sha1_fingerprint(struct openconnect_info *vpninfo, X509 *cert,
                              char *buf) {
  return get_cert_fingerprint(vpninfo, cert, EVP_sha1(), buf);
}


x86 assembly (clang, -O0):
<get_cert_sha1_fingerprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    -0x18(%rbp),%rcx
call   1030 <get_cert_fingerprint@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cert_sha1_fingerprint>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %eax,%edx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <get_cert_fingerprint@plt>

LLVM IR (-O0):
%struct.openconnect_info = type { i32 }
define i32 @get_cert_sha1_fingerprint(%struct.openconnect_info* %0, i32* %1, i8* %2) {
%4 = alloca %struct.openconnect_info*
%5 = alloca i32*
%6 = alloca i8*
store %struct.openconnect_info* %0, %struct.openconnect_info** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load %struct.openconnect_info*, %struct.openconnect_info** %4
%8 = load i32*, i32** %5
%9 = call i32 (...) @EVP_sha1()
%10 = load i8*, i8** %6
%11 = call i32 @get_cert_fingerprint(%struct.openconnect_info* %7, i32* %8, i32 %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.openconnect_info = type { i32 }
define i32 @get_cert_sha1_fingerprint(%struct.openconnect_info* %0, i32* %1, i8* %2) {
%4 = tail call i32 (...) @EVP_sha1()
%5 = tail call i32 @get_cert_fingerprint(%struct.openconnect_info* %0, i32* %1, i32 %4, i8* %2)
ret i32 %5
}
int min0(int a, int b) {
  if (a <= b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<min0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1121 <min0+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min0+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min0>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min0(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ smbhash(unsigned char *, unsigned char *, unsigned char *,
                           int /*<<< orphan*/);
void D_P16(unsigned char *p14, unsigned char *in, unsigned char *out) {
  smbhash(out, in, p14, 0);
  smbhash(out + 8, in + 8, p14 + 7, 0);
}


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

x86 assembly (clang, -O2):
<D_P16>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
mov    %r15,%rdx
xor    %ecx,%ecx
call   1030 <smbhash@plt>
add    $0x8,%rbx
add    $0x8,%r14
add    $0x7,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %ecx,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <smbhash@plt>

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

LLVM IR (-O2):
define void @D_P16(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @smbhash(i8* %2, i8* %1, i8* %0, i32 0)
%5 = getelementptr inbounds i8, i8* %2, i64 8
%6 = getelementptr inbounds i8, i8* %1, i64 8
%7 = getelementptr inbounds i8, i8* %0, i64 7
%8 = tail call i32 @smbhash(i8* %5, i8* %6, i8* %7, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  int a = 2, b = 1, c = 2;
  (a == 0)   ? puts("0")
  : (a == 1) ? puts("1")
  : (a == 2) ? puts("2")
             : puts("andet");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    114f <main+0x3f>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
jmp    11a3 <main+0x93>
cmpl   $0x1,-0x8(%rbp)
jne    116d <main+0x5d>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
mov    %eax,-0x14(%rbp)
jmp    11a0 <main+0x90>
cmpl   $0x2,-0x8(%rbp)
jne    118b <main+0x7b>
lea    0xe86(%rip),%rdi
call   1030 <puts@plt>
mov    %eax,-0x18(%rbp)
jmp    119a <main+0x8a>
lea    0xe74(%rip),%rdi
call   1030 <puts@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [2 x i8] c"2\00"
@.str.3 = [6 x i8] c"andet\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 1, i32* %3
store i32 2, i32* %4
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %25
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %23
14: ; preds = %9
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 2
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %21
19: ; preds = %14
%20 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = phi i32 [ %18, %17 ], [ %20, %19 ]
br label %23
23: ; preds = %21, %12
%24 = phi i32 [ %13, %12 ], [ %22, %21 ]
br label %25
25: ; preds = %23, %7
%26 = phi i32 [ %8, %7 ], [ %24, %23 ]
ret i32 0
}

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


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

x86 assembly (clang, -O2):
<add>:
lea    0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}
void s3c_i2c1_setname(char *name) {}


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

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

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

LLVM IR (-O2):
define void @s3c_i2c1_setname(i8* nocapture %0) {
ret void
}
int test_imm_26uint16_reg(unsigned short val) {
  return ((val) & (-0x26 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_26uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffda,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_26uint16_reg>:
test   $0xffda,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_26uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -38
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void vde_chain_nm3_decref(void) {}


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

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

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

LLVM IR (-O2):
define void @vde_chain_nm3_decref() {
ret void
}
float findtfrom_x_va(float x, float va) { return x / va; }


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

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

LLVM IR (-O0):
define float @findtfrom_x_va(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 = fdiv float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @findtfrom_x_va(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
float Sleef_ceilf(float x) { return __builtin_ceilf(x); }


x86 assembly (clang, -O0):
<Sleef_ceilf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <ceilf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sleef_ceilf>:
jmp    1030 <ceilf@plt>

LLVM IR (-O0):
define float @Sleef_ceilf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.ceil.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @Sleef_ceilf(float %0) {
%2 = tail call float @llvm.ceil.f32(float %0)
ret float %2
}
/* Variables and functions */
int foo(int);
__attribute__((no, noclone)) int bar(int j) {
  if (j > 8)
    return foo(j + 2);
  else if (j > 2)
    return foo(j + 3);
  return 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jle    1138 <bar+0x28>
mov    -0x8(%rbp),%edi
add    $0x2,%edi
call   1030 <foo@plt>
mov    %eax,-0x4(%rbp)
jmp    1161 <bar+0x51>
cmpl   $0x2,-0x8(%rbp)
jle    1155 <bar+0x45>
mov    -0x8(%rbp),%edi
add    $0x3,%edi
call   1030 <foo@plt>
mov    %eax,-0x4(%rbp)
jmp    1161 <bar+0x51>
jmp    115a <bar+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    $0x2,%eax
cmp    $0x8,%edi
jg     1124 <bar+0x14>
mov    $0x3,%eax
cmp    $0x3,%edi
jl     112d <bar+0x1d>
add    %edi,%eax
mov    %eax,%edi
jmp    1030 <foo@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = icmp sgt i32 %0, 8
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 2
br i1 %4, label %5, label %9
5: ; preds = %3, %1
%6 = phi i32 [ 2, %1 ], [ 3, %3 ]
%7 = add nuw nsw i32 %6, %0
%8 = tail call i32 @foo(i32 %7)
br label %9
9: ; preds = %5, %3
%10 = phi i32 [ 0, %3 ], [ %8, %5 ]
ret i32 %10
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t AONRTCModeCh2Get(void) {
  return ((
      *((volatile unsigned long
             *)(((unsigned long)(0x40092000 + 0x00000014) & 0xF0000000) |
                0x02000000 |
                (((unsigned long)(0x40092000 + 0x00000014) & 0x000FFFFF) << 5) |
                ((18) << 2)))));
}


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

x86 assembly (clang, -O2):
<AONRTCModeCh2Get>:
mov    0x432402c8,%rax
43
ret

LLVM IR (-O0):
define i64 @AONRTCModeCh2Get() {
%1 = load volatile i64, i64* inttoptr (i64 1126433480 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @AONRTCModeCh2Get() {
%1 = load volatile i64, i64* inttoptr (i64 1126433480 to i64*)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void report_and_die(char *message) {
  fprintf(stderr, "ERROR: %s\n", message);
  exit(-1);
}


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

x86 assembly (clang, -O2):
<report_and_die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @report_and_die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
char serial_byte_rx();
char scan_char(void) { return serial_byte_rx(); }


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

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

LLVM IR (-O0):
define signext i8 @scan_char() {
%1 = call signext i8 (...) @serial_byte_rx()
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @scan_char() {
%1 = tail call signext i8 (...) @serial_byte_rx()
ret i8 %1
}
/* Variables and functions */
int /*<<< orphan*/ backlight_enable();
int /*<<< orphan*/ displaycon_on();
int /*<<< orphan*/ lcd_on();
void lcd_enable(void) {
  lcd_on();
  backlight_enable();
  displaycon_on();
}


x86 assembly (clang, -O0):
<lcd_enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <lcd_on@plt>
mov    $0x0,%al
call   1050 <backlight_enable@plt>
mov    $0x0,%al
call   1030 <displaycon_on@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_enable>:
push   %rax
xor    %eax,%eax
call   1040 <lcd_on@plt>
xor    %eax,%eax
call   1050 <backlight_enable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <displaycon_on@plt>

LLVM IR (-O0):
define void @lcd_enable() {
%1 = call i32 (...) @lcd_on()
%2 = call i32 (...) @backlight_enable()
%3 = call i32 (...) @displaycon_on()
ret void
}

LLVM IR (-O2):
define void @lcd_enable() {
%1 = tail call i32 (...) @lcd_on()
%2 = tail call i32 (...) @backlight_enable()
%3 = tail call i32 (...) @displaycon_on()
ret void
}
int calu(char *a) {
  int rt = 1;
  while (*a) {
    rt *= (*a - 'A' + 1);
    a++;
  }
  rt %= 47;
  return rt;
}


x86 assembly (clang, -O0):
<calu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1141 <calu+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x41,%eax
add    $0x1,%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <calu+0xf>
mov    -0xc(%rbp),%eax
mov    $0x2f,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calu>:
mov    (%rdi),%cl
test   %cl,%cl
je     1143 <calu+0x43>
add    $0x1,%rdi
mov    $0x1,%eax
nop
movsbl %cl,%ecx
add    $0xffffffc0,%ecx
imul   %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <calu+0x10>
cltq
imul   $0xffffffffae4c415d,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x2f,%ecx,%ecx
sub    %ecx,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @calu(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 1, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = add nsw i32 %8, -64
%10 = mul nsw i32 %9, %6
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = srem i32 %10, 47
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 1, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ luaL_check_string(int);
int /*<<< orphan*/ pushresult(int);
scalar_t__ rename(int /*<<< orphan*/, int /*<<< orphan*/);
void io_rename(void) {
  pushresult(rename(luaL_check_string(1), luaL_check_string(2)) == 0);
}


x86 assembly (clang, -O0):
<io_rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1040 <luaL_check_string@plt>
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <luaL_check_string@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1050 <rename@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <pushresult@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_rename>:
push   %rbx
mov    $0x1,%edi
call   1040 <luaL_check_string@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1040 <luaL_check_string@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <rename@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rbx
jmp    1030 <pushresult@plt>

LLVM IR (-O0):
define void @io_rename() {
%1 = call i32 @luaL_check_string(i32 1)
%2 = call i32 @luaL_check_string(i32 2)
%3 = call i64 @rename(i32 %1, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @pushresult(i32 %5)
ret void
}

LLVM IR (-O2):
define void @io_rename() {
%1 = tail call i32 @luaL_check_string(i32 1)
%2 = tail call i32 @luaL_check_string(i32 2)
%3 = tail call i64 @rename(i32 %1, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @pushresult(i32 %5)
ret void
}
double degree_to_rad(double d) { return d / 180 * 3.14159265358979; }


x86 assembly (clang, -O0):
<degree_to_rad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @degree_to_rad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.800000e+02
%5 = fmul double %4, 0x400921FB54442D11
ret double %5
}

LLVM IR (-O2):
define double @degree_to_rad(double %0) {
%2 = fdiv double %0, 1.800000e+02
%3 = fmul double %2, 0x400921FB54442D11
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ check_vect();
int /*<<< orphan*/ s221();
int main(int argc, char *argv[]) {
  check_vect();
  s221();
  return 0;
}


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

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

LLVM IR (-O0):
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 (...) @check_vect()
%7 = call i32 (...) @s221()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @check_vect()
%4 = tail call i32 (...) @s221()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_count_cover(char *, int);
float HMM_Lerp(float A, float Time, float B) {
  { _hmt_count_cover("HMM_Lerp", 587); };
  float Result = (1.0f - Time) * A + Time * B;
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_Lerp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x24b,%esi
call   1030 <_hmt_count_cover@plt>
movss  0xec0(%rip),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_Lerp>:
sub    $0x18,%rsp
movss  %xmm2,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x14(%rsp)
lea    0xed7(%rip),%rdi
mov    $0x24b,%esi
call   1030 <_hmt_count_cover@plt>
movss  0xec1(%rip),%xmm0
movss  0xc(%rsp),%xmm2
subss  %xmm2,%xmm0
movss  0x10(%rsp),%xmm1
mulss  %xmm2,%xmm1
mulss  0x14(%rsp),%xmm0
addss  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"HMM_Lerp\00"
define float @HMM_Lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = call i32 @_hmt_count_cover(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 587)
%9 = load float, float* %5
%10 = fsub float 1.000000e+00, %9
%11 = load float, float* %4
%12 = load float, float* %5
%13 = load float, float* %6
%14 = fmul float %12, %13
%15 = call float @llvm.fmuladd.f32(float %10, float %11, float %14)
store float %15, float* %7
%16 = load float, float* %7
ret float %16
}

LLVM IR (-O2):
@.str = [9 x i8] c"HMM_Lerp\00"
define float @HMM_Lerp(float %0, float %1, float %2) {
%4 = tail call i32 @_hmt_count_cover(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 587)
%5 = fsub float 1.000000e+00, %1
%6 = fmul float %1, %2
%7 = tail call float @llvm.fmuladd.f32(float %5, float %0, float %6)
ret float %7
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int store_quaddobl_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(671, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<store_quaddobl_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x29f,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_quaddobl_solutions>:
mov    $0x29f,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @store_quaddobl_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 671, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @store_quaddobl_solutions() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 671, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void mtarch_stop(struct mtarch_thread *thread) {}


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

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

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

LLVM IR (-O2):
%struct.mtarch_thread = type opaque
define void @mtarch_stop(%struct.mtarch_thread* nocapture %0) {
ret void
}
max(a, b) char *a, *b;
{
  if (a > b)
    return (a);
  return (b);
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1126 <max+0x26>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    112d <max+0x2d>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i8* %0, i8* %1) {
%3 = icmp ugt i8* %0, %1
%4 = select i1 %3, i8* %0, i8* %1
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ showCookTimeForTurkey(int);
int main(int argc, const char *argv[]) {
  int totalWeight = 10;
  int gibletsWeight = 1;
  int turkeyWeight = totalWeight + gibletsWeight;
  showCookTimeForTurkey(turkeyWeight);
  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   $0xa,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <showCookTimeForTurkey@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
store i32 1, i32* %7
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = add nsw i32 %9, %10
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = call i32 @showCookTimeForTurkey(i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @showCookTimeForTurkey(i32 11)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ X509_CRL;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int PEM_ASN1_write_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_X509_CRL;
scalar_t__ i2d_X509_CRL;
int PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x) {
  return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509_CRL, PEM_STRING_X509_CRL,
                            bp, x, NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_bio_X509_CRL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_bio_X509_CRL>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb7(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_X509_CRL = global i64 0
@PEM_STRING_X509_CRL = global i32 0
define i32 @PEM_write_bio_X509_CRL(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_X509_CRL
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_X509_CRL
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @PEM_ASN1_write_bio(i32* %6, i32 %7, i32* %8, i32* %9, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@i2d_X509_CRL = global i64 0
@PEM_STRING_X509_CRL = global i32 0
define i32 @PEM_write_bio_X509_CRL(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_X509_CRL
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_X509_CRL
%6 = tail call i32 @PEM_ASN1_write_bio(i32* %4, i32 %5, i32* %0, i32* %1, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_NAME_ENTRY;
typedef int /*<<< orphan*/ X509_NAME;
typedef int /*<<< orphan*/ ASN1_STRING;

/* Variables and functions */
int /*<<< orphan*/ *X509_NAME_ENTRY_get_data(int /*<<< orphan*/ *);
int /*<<< orphan*/ *req_GetNameENidI(int /*<<< orphan*/ *, unsigned long, int);
ASN1_STRING *req_GetNameNidI(X509_NAME *name, unsigned long nid) {
  X509_NAME_ENTRY *ne = req_GetNameENidI(name, nid, -1);
  if (!ne)
    return NULL;
  return X509_NAME_ENTRY_get_data(ne);
}


x86 assembly (clang, -O0):
<req_GetNameNidI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xffffffff,%edx
call   1040 <req_GetNameENidI@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115e <req_GetNameNidI+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    116b <req_GetNameNidI+0x4b>
mov    -0x20(%rbp),%rdi
call   1030 <X509_NAME_ENTRY_get_data@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_GetNameNidI>:
push   %rax
mov    $0xffffffff,%edx
call   1040 <req_GetNameENidI@plt>
test   %rax,%rax
je     1139 <req_GetNameNidI+0x19>
mov    %rax,%rdi
pop    %rax
jmp    1030 <X509_NAME_ENTRY_get_data@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32* @req_GetNameNidI(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32*
store i32* %0, i32** %4
store i64 %1, i64* %5
%7 = load i32*, i32** %4
%8 = load i64, i64* %5
%9 = call i32* @req_GetNameENidI(i32* %7, i64 %8, i32 -1)
store i32* %9, i32** %6
%10 = load i32*, i32** %6
%11 = icmp ne i32* %10, null
br i1 %11, label %13, label %12
12: ; preds = %2
store i32* null, i32** %3
br label %16
13: ; preds = %2
%14 = load i32*, i32** %6
%15 = call i32* @X509_NAME_ENTRY_get_data(i32* %14)
store i32* %15, i32** %3
br label %16
16: ; preds = %13, %12
%17 = load i32*, i32** %3
ret i32* %17
}

LLVM IR (-O2):
define i32* @req_GetNameNidI(i32* %0, i64 %1) {
%3 = tail call i32* @req_GetNameENidI(i32* %0, i64 %1, i32 -1)
%4 = icmp eq i32* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32* @X509_NAME_ENTRY_get_data(i32* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32* [ %6, %5 ], [ null, %2 ]
ret i32* %8
}
void SPUstartChannels1(unsigned short channels) {}


x86 assembly (clang, -O0):
<SPUstartChannels1>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SPUstartChannels1(i16 zeroext %0) {
ret void
}