xunge/DecIR huggingface dataset:
/* Variables and functions */
char *greeting(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *name = "Zac";
  printf("%s\n", greeting(name));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <greeting@plt>
lea    0xed0(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"Zac\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @greeting(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Alpha_Fire3(int value) {
  if (value) {
    cpc_key_press(0x96);
  } else {
    cpc_key_unpress(0x96);
  };
}


x86 assembly (clang, -O0):
<Joy_Alpha_Fire3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Alpha_Fire3+0x24>
mov    $0x96,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Alpha_Fire3+0x2e>
mov    $0x96,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Alpha_Fire3>:
test   %edi,%edi
je     112e <Joy_Alpha_Fire3+0xe>
mov    $0x96,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x96,%edi
jmp    1040 <cpc_key_unpress@plt>

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

LLVM IR (-O2):
define void @Joy_Alpha_Fire3(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 150)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 150)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printBBB() { printf("BBB\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"BBB\00"
define void @printBBB() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int fput_proc_vector(char const *, char *, int /*<<< orphan*/, char *,
                     int /*<<< orphan*/ *);
int fput_header(const char *pid, FILE *o) {
  fprintf(o, "%s: ", pid);
  return fput_proc_vector(pid, "cmdline", 0, " ", o);
}


x86 assembly (clang, -O0):
<fput_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xec1(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%r8
lea    0xeb2(%rip),%rsi
xor    %edx,%edx
lea    0xea7(%rip),%rcx
call   1030 <fput_proc_vector@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fput_header>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
lea    0xec2(%rip),%rsi
lea    0xeb9(%rip),%rcx
mov    %rbx,%rdi
xor    %edx,%edx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fput_proc_vector@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s: \00"
@.str.1 = [8 x i8] c"cmdline\00"
@.str.2 = [2 x i8] c" \00"
define i32 @fput_header(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = load i32*, i32** %4
%10 = call i32 @fput_proc_vector(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s: \00"
@.str.1 = [8 x i8] c"cmdline\00"
@.str.2 = [2 x i8] c" \00"
define i32 @fput_header(i8* %0, i32* %1) {
%3 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @fput_proc_vector(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32* %1)
ret i32 %4
}
/* Variables and functions */
int memcmp(unsigned char const *, unsigned char const *, long);
int lmn_byte_cmp(const unsigned char *a, long alen, const unsigned char *b,
                 long blen) {
  if (alen != blen) {
    return alen - blen;
  } else {
    return memcmp(a, b, alen);
  }
}


x86 assembly (clang, -O0):
<lmn_byte_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
je     1146 <lmn_byte_cmp+0x36>
mov    -0x18(%rbp),%rax
sub    -0x28(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    115a <lmn_byte_cmp+0x4a>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmn_byte_cmp>:
mov    %rsi,%rax
cmp    %rcx,%rsi
jne    1123 <lmn_byte_cmp+0x13>
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <memcmp@plt>
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @lmn_byte_cmp(i8* nocapture %0, i64 %1, i8* nocapture %2, i64 %3) {
%5 = icmp eq i64 %1, %3
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = sub nsw i64 %1, %3
%8 = trunc i64 %7 to i32
br label %11
9: ; preds = %4
%10 = tail call i32 @memcmp(i8* %0, i8* %2, i64 %1)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}
void MUTEX_LOCK_SOFTAP_SET_INIT(struct brcmf_pub *drvr) {}


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

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

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

LLVM IR (-O2):
%struct.brcmf_pub = type opaque
define void @MUTEX_LOCK_SOFTAP_SET_INIT(%struct.brcmf_pub* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ writeValueAsNucleotides(int /*<<< orphan*/,
                                           unsigned long long);
void printValueAsNucleotides(unsigned long long int value) {
  writeValueAsNucleotides(stdout, value);
}


x86 assembly (clang, -O0):
<printValueAsNucleotides>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <writeValueAsNucleotides@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printValueAsNucleotides>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <writeValueAsNucleotides@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @printValueAsNucleotides(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i32, i32* @stdout
%4 = load i64, i64* %2
%5 = call i32 @writeValueAsNucleotides(i32 %3, i64 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @printValueAsNucleotides(i64 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @writeValueAsNucleotides(i32 %2, i64 %0)
ret void
}
double JHKeyframeAnimationFunctionEaseOutCubic(double t, double b, double c,
                                               double d) {
  return c * ((t = t / d - 1) * t * t + 1) + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseOutCubic>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
divsd  -0x20(%rbp),%xmm2
movsd  0xed1(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  %xmm2,-0x8(%rbp)
mulsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xeb2(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseOutCubic>:
divsd  %xmm3,%xmm0
addsd  0xef4(%rip),%xmm0
movapd %xmm0,%xmm3
mulsd  %xmm0,%xmm3
mulsd  %xmm3,%xmm0
addsd  0xee8(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @JHKeyframeAnimationFunctionEaseOutCubic(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = load double, double* %5
%11 = load double, double* %8
%12 = fdiv double %10, %11
%13 = fsub double %12, 1.000000e+00
store double %13, double* %5
%14 = load double, double* %5
%15 = fmul double %13, %14
%16 = load double, double* %5
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double 1.000000e+00)
%18 = load double, double* %6
%19 = call double @llvm.fmuladd.f64(double %9, double %17, double %18)
ret double %19
}

LLVM IR (-O2):
define double @JHKeyframeAnimationFunctionEaseOutCubic(double %0, double %1, double %2, double %3) {
%5 = fdiv double %0, %3
%6 = fadd double %5, -1.000000e+00
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %7, double %6, double 1.000000e+00)
%9 = tail call double @llvm.fmuladd.f64(double %2, double %8, double %1)
ret double %9
}
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1138 <main+0x38>
jmp    112a <main+0x2a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <main+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
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
store i32 1, i32* %6
br label %7
7: ; preds = %12, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %7
br label %12
12: ; preds = %11
%13 = load i32, i32* %6
%14 = add nsw i32 %13, 1
store i32 %14, i32* %6
br label %7
15: ; preds = %7
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int disconnect_client(int);
int handle_except(int fd) { return disconnect_client(fd); }


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

x86 assembly (clang, -O2):
<handle_except>:
jmp    1030 <disconnect_client@plt>

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

LLVM IR (-O2):
define i32 @handle_except(i32 %0) {
%2 = tail call i32 @disconnect_client(i32 %0)
ret i32 %2
}
int tga_decode_8(unsigned char *input_bytes, unsigned char *output_bytes) {
  output_bytes[0] = (input_bytes[0]);
  output_bytes[1] = (input_bytes[0]);
  output_bytes[2] = (input_bytes[0]);
  return 3;
}


x86 assembly (clang, -O0):
<tga_decode_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tga_decode_8>:
mov    (%rdi),%al
mov    %al,(%rsi)
mov    (%rdi),%al
mov    %al,0x1(%rsi)
mov    (%rdi),%al
mov    %al,0x2(%rsi)
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @tga_decode_8(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 2
store i8 %17, i8* %19
ret i32 3
}

LLVM IR (-O2):
define i32 @tga_decode_8(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
%4 = load i8, i8* %0
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %4, i8* %5
%6 = load i8, i8* %0
%7 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %6, i8* %7
ret i32 3
}
void swapPtr(register char *ptr0, register char *ptr1) {
  register char tmp = *ptr1;
  *ptr1 = *ptr0;
  *ptr0 = tmp;
}


x86 assembly (clang, -O0):
<swapPtr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapPtr>:
mov    (%rsi),%al
mov    (%rdi),%cl
mov    %cl,(%rsi)
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @swapPtr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = load i8*, i8** %4
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %3
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swapPtr(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = load i8, i8* %0
store i8 %4, i8* %1
store i8 %3, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void uninivar_printf(char *Format, int Argument) {
  char *format;
  int argument;
  (void)printf("x");
  (void)printf(format, argument);
  (void)printf(Format, argument);
  (void)printf(format, Argument);
  (void)printf(format, 1);
  (void)printf(Format, Argument);
}


x86 assembly (clang, -O0):
<uninivar_printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninivar_printf>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x78,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"x\00"
define void @uninivar_printf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* %8, i32 %9)
%11 = load i8*, i8** %3
%12 = load i32, i32* %6
%13 = call i32 (i8*, ...) @printf(i8* %11, i32 %12)
%14 = load i8*, i8** %5
%15 = load i32, i32* %4
%16 = call i32 (i8*, ...) @printf(i8* %14, i32 %15)
%17 = load i8*, i8** %5
%18 = call i32 (i8*, ...) @printf(i8* %17, i32 1)
%19 = load i8*, i8** %3
%20 = load i32, i32* %4
%21 = call i32 (i8*, ...) @printf(i8* %19, i32 %20)
ret void
}

LLVM IR (-O2):
define void @uninivar_printf(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @putchar(i32 120)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) undef, i32 undef)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i32 undef)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) undef, i32 %1)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) undef, i32 1)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i32 %1)
ret void
}
/* Variables and functions */
int ardour_main(int, char **);
int main(int argc, char *argv[]) { return ardour_main(argc, argv); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <ardour_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <ardour_main@plt>

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @ardour_main(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ardour_main(i32 %0, i8** %1)
ret i32 %3
}
int reachable_size(int *vals, int maxrow, int maxcol, int row, int col) {
  return 0;
}


x86 assembly (clang, -O0):
<reachable_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reachable_size(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @reachable_size(i32* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret i32 0
}
void ft_get_values(char **data, char **str, char **actual) {
  *str = data[0];
  *actual = data[1];
}


x86 assembly (clang, -O0):
<ft_get_values>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_get_values>:
mov    (%rdi),%rax
mov    %rax,(%rsi)
mov    0x8(%rdi),%rax
mov    %rax,(%rdx)
ret

LLVM IR (-O0):
define void @ft_get_values(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*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %5
store i8* %9, i8** %10
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %6
store i8* %13, i8** %14
ret void
}

LLVM IR (-O2):
define void @ft_get_values(i8** nocapture %0, i8** nocapture writeonly %1, i8** nocapture writeonly %2) {
%4 = load i8*, i8** %0
store i8* %4, i8** %1
%5 = getelementptr inbounds i8*, i8** %0, i64 1
%6 = load i8*, i8** %5
store i8* %6, i8** %2
ret void
}
/* Type definitions */
struct c_buffer {
  int dummy;
};

/* Variables and functions */
size_t c_buffer_free_space(struct c_buffer *);
int c_buffer_grow(struct c_buffer *, size_t);
int c_buffer_ensure_free_space(struct c_buffer *buf, size_t sz) {
  size_t free_space;
  free_space = c_buffer_free_space(buf);
  if (free_space < sz)
    return c_buffer_grow(buf, sz - free_space);
  return 0;
}


x86 assembly (clang, -O0):
<c_buffer_ensure_free_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <c_buffer_free_space@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1164 <c_buffer_ensure_free_space+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
sub    -0x20(%rbp),%rsi
call   1040 <c_buffer_grow@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <c_buffer_ensure_free_space+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_buffer_ensure_free_space>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <c_buffer_free_space@plt>
cmp    %rbx,%rax
jae    1149 <c_buffer_ensure_free_space+0x29>
sub    %rax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <c_buffer_grow@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.c_buffer = type { i32 }
define i32 @c_buffer_ensure_free_space(%struct.c_buffer* %0, i64 %1) {
%3 = alloca i32
%4 = alloca %struct.c_buffer*
%5 = alloca i64
%6 = alloca i64
store %struct.c_buffer* %0, %struct.c_buffer** %4
store i64 %1, i64* %5
%7 = load %struct.c_buffer*, %struct.c_buffer** %4
%8 = call i64 @c_buffer_free_space(%struct.c_buffer* %7)
store i64 %8, i64* %6
%9 = load i64, i64* %6
%10 = load i64, i64* %5
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load %struct.c_buffer*, %struct.c_buffer** %4
%14 = load i64, i64* %5
%15 = load i64, i64* %6
%16 = sub i64 %14, %15
%17 = call i32 @c_buffer_grow(%struct.c_buffer* %13, i64 %16)
store i32 %17, i32* %3
br label %19
18: ; preds = %2
store i32 0, i32* %3
br label %19
19: ; preds = %18, %12
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.c_buffer = type { i32 }
define i32 @c_buffer_ensure_free_space(%struct.c_buffer* %0, i64 %1) {
%3 = tail call i64 @c_buffer_free_space(%struct.c_buffer* %0)
%4 = icmp ult i64 %3, %1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = sub i64 %1, %3
%7 = tail call i32 @c_buffer_grow(%struct.c_buffer* %0, i64 %6)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ 0, %2 ]
ret i32 %9
}
int fixsfsi(float f) { return f; }


x86 assembly (clang, -O0):
<fixsfsi>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixsfsi>:
cvttss2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @fixsfsi(float %0) {
%2 = fptosi float %0 to i32
ret i32 %2
}
int BTSHASP_CheckIncludeHashNext(int hash) {
  return (((hash * 251) >> 8) & 4095);
}


x86 assembly (clang, -O0):
<BTSHASP_CheckIncludeHashNext>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0xfb,-0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xfff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BTSHASP_CheckIncludeHashNext>:
imul   $0xfb,%edi,%eax
shr    $0x8,%eax
and    $0xfff,%eax
ret

LLVM IR (-O0):
define i32 @BTSHASP_CheckIncludeHashNext(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 251
%5 = ashr i32 %4, 8
%6 = and i32 %5, 4095
ret i32 %6
}

LLVM IR (-O2):
define i32 @BTSHASP_CheckIncludeHashNext(i32 %0) {
%2 = mul nsw i32 %0, 251
%3 = lshr i32 %2, 8
%4 = and i32 %3, 4095
ret i32 %4
}
extern long mpy_1_X_1_h(long mpy1, long mpy2, long *hi) {
  long eax;
  __asm__("imull %2\n\t" : "=a"(eax), "=d"(*hi) : "rm"(mpy2), "0"(mpy1));
  return eax;
}


x86 assembly (clang, -O0):
<mpy_1_X_1_h>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,-0x28(%rbp)
imull  -0x28(%rbp)
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,-0x20(%rbp)
mov    %rdx,(%rax)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i64 @mpy_1_X_1_h(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%8 = load i64*, i64** %6
%9 = load i64, i64* %5
%10 = load i64, i64* %4
%11 = call { i64, i64 } asm "imull $2\0A\09", "={ax},={dx},rm,0,~{dirflag},~{fpsr},~{flags}"(i64 %9, i64 %10)
%12 = extractvalue { i64, i64 } %11, 0
%13 = extractvalue { i64, i64 } %11, 1
store i64 %12, i64* %7
store i64 %13, i64* %8
%14 = load i64, i64* %7
ret i64 %14
}

LLVM IR (-O2):
void led_off(void) { (*((volatile unsigned long *)0xE002800C)) = (1 << 17); }


x86 assembly (clang, -O0):
<led_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe002800c,%eax
movq   $0x20000,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_off>:
mov    $0xe002800c,%eax
movq   $0x20000,(%rax)
ret

LLVM IR (-O0):
define void @led_off() {
store volatile i64 131072, i64* inttoptr (i64 3758260236 to i64*)
ret void
}

LLVM IR (-O2):
define void @led_off() {
store volatile i64 131072, i64* inttoptr (i64 3758260236 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_odd(int n) {
  if (n & 1)
    printf("n is odd.\n");
  else
    printf("n is even.\n");
  return 0;
}


x86 assembly (clang, -O0):
<test_odd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113b <test_odd+0x2b>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
jmp    1147 <test_odd+0x37>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_odd>:
push   %rax
test   $0x1,%dil
lea    0xee4(%rip),%rax
lea    0xee8(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"n is odd.\0A\00"
@.str.1 = [12 x i8] c"n is even.\0A\00"
define i32 @test_odd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"n is even.\00"
@str.2 = [10 x i8] c"n is odd.\00"
define i32 @test_odd(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void get_time_str(char *time_str) {
  struct tm *now;
  time_t time_val;
  now = NULL;
  time_val = time(NULL);
  now = localtime(&time_val);
  strftime(time_str, 64, "%a %d %b %Y %I:%M:%S %p %Z\n", now);
}


x86 assembly (clang, -O0):
<get_time_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x40,%esi
lea    0xe8f(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time_str>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    $0x40,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [28 x i8] c"%a %d %b %Y %I:%M:%S %p %Z\0A\00"
define void @get_time_str(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.tm*
%4 = alloca i32
store i8* %0, i8** %2
store %struct.tm* null, %struct.tm** %3
%5 = call i32 @time(i32* null)
store i32 %5, i32* %4
%6 = call %struct.tm* @localtime(i32* %4)
store %struct.tm* %6, %struct.tm** %3
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %3
%9 = call i32 @strftime(i8* %7, i32 64, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [28 x i8] c"%a %d %b %Y %I:%M:%S %p %Z\0A\00"
define void @get_time_str(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 64, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_undefined_pd();
__m128d test_mm_undefined_pd() { return _mm_undefined_pd(); }


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

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

LLVM IR (-O0):
define i32 @test_mm_undefined_pd() {
%1 = call i32 (...) @_mm_undefined_pd()
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_mm_undefined_pd() {
%1 = tail call i32 (...) @_mm_undefined_pd()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ mov;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
const char *cell(int mov) {
  static char buf[3 + 3 + sizeof(mov) * 3];
  if (mov == 0)
    return "*m";
  sprintf(buf, "m[%d]", mov);
  return buf;
}


x86 assembly (clang, -O0):
<cell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1135 <cell+0x25>
lea    0xed4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1156 <cell+0x46>
mov    -0xc(%rbp),%edx
lea    0x2f01(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2eee(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cell>:
push   %rbx
test   %edi,%edi
je     112f <cell+0x1f>
mov    %edi,%edx
lea    0x2f22(%rip),%rbx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
jmp    1136 <cell+0x26>
lea    0xeca(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@cell.buf = internal global [18 x i8] zeroinitializer
@.str = [3 x i8] c"*m\00"
@.str.1 = [6 x i8] c"m[%d]\00"
define i8* @cell(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @sprintf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @cell.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @cell.buf, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@cell.buf = internal global [18 x i8] zeroinitializer
@.str = [3 x i8] c"*m\00"
@.str.1 = [6 x i8] c"m[%d]\00"
define i8* @cell(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @cell.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @cell.buf, i64 0, i64 0), %3 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %6
}
int XCheckMaskEvent() {}


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

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

LLVM IR (-O0):
define i32 @XCheckMaskEvent() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XCheckMaskEvent() {
ret i32 undef
}
short C_Utils_min_short(const short item1, const short item2) {
  return item1 > item2 ? item1 : item2;
}


x86 assembly (clang, -O0):
<C_Utils_min_short>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
cmp    %ecx,%eax
jle    112e <C_Utils_min_short+0x2e>
movswl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <C_Utils_min_short+0x35>
movswl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @C_Utils_min_short(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = icmp sgt i32 %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i16, i16* %3
%12 = sext i16 %11 to i32
br label %16
13: ; preds = %2
%14 = load i16, i16* %4
%15 = sext i16 %14 to i32
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %12, %10 ], [ %15, %13 ]
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define signext i16 @C_Utils_min_short(i16 signext %0, i16 signext %1) {
%3 = icmp sgt i16 %0, %1
%4 = select i1 %3, i16 %0, i16 %1
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void printx(unsigned int i) {
  int a = i;
  if (i > 16) {
    printx(i >> 4);
    a = i & 0xf;
  }
  if (a > 9) {
    a += 39;
  }
  putchar('0' + a);
}


x86 assembly (clang, -O0):
<printx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x10,-0x4(%rbp)
jbe    114f <printx+0x2f>
mov    -0x4(%rbp),%edi
shr    $0x4,%edi
call   1030 <printx@plt>
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jle    1162 <printx+0x42>
mov    -0x8(%rbp),%eax
add    $0x27,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
add    $0x30,%edi
call   1040 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printx>:
push   %rbx
mov    %edi,%ebx
cmp    $0x11,%edi
jb     1135 <printx+0x15>
mov    %ebx,%edi
shr    $0x4,%edi
call   1030 <printx@plt>
and    $0xf,%ebx
lea    0x27(%rbx),%edi
cmp    $0xa,%ebx
cmovb  %ebx,%edi
add    $0x30,%edi
pop    %rbx
jmp    1040 <putchar@plt>

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

LLVM IR (-O2):
define void @printx(i32 %0) {
%2 = icmp ugt i32 %0, 16
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = lshr i32 %0, 4
tail call void @printx(i32 %4)
%5 = and i32 %0, 15
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = icmp ugt i32 %7, 9
%9 = add nuw nsw i32 %7, 39
%10 = select i1 %8, i32 %9, i32 %7
%11 = add nuw nsw i32 %10, 48
%12 = tail call i32 @putchar(i32 %11)
ret void
}
void I444Scale_16() {}


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

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

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

LLVM IR (-O2):
define void @I444Scale_16() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_version(void) { printf("%s\n", "0.2.2"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"0.2.2\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ gen_is_ivb(int);
int gen_get_ivb_gt(int devid) {
  assert(gen_is_ivb(devid));
  return (devid & 0x30) >> 4;
}


x86 assembly (clang, -O0):
<gen_get_ivb_gt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gen_is_ivb@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
and    $0x30,%eax
sar    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_get_ivb_gt>:
push   %rbx
mov    %edi,%ebx
call   1030 <gen_is_ivb@plt>
mov    %eax,%edi
call   1040 <assert@plt>
shr    $0x4,%ebx
and    $0x3,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gen_get_ivb_gt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @gen_is_ivb(i32 %3)
%5 = call i32 @assert(i32 %4)
%6 = load i32, i32* %2
%7 = and i32 %6, 48
%8 = ashr i32 %7, 4
ret i32 %8
}

LLVM IR (-O2):
define i32 @gen_get_ivb_gt(i32 %0) {
%2 = tail call i32 @gen_is_ivb(i32 %0)
%3 = tail call i32 @assert(i32 %2)
%4 = lshr i32 %0, 4
%5 = and i32 %4, 3
ret i32 %5
}
/* Variables and functions */
char *malloc(int);
char *my_malloc(char *str, size_t len) {
  if ((str = malloc(sizeof(*str) * len)) == NULL)
    return (NULL);
  return (str);
}


x86 assembly (clang, -O0):
<my_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114a <my_malloc+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    1152 <my_malloc+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @my_malloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = mul i64 1, %6
%8 = trunc i64 %7 to i32
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %4
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %2
store i8* null, i8** %3
br label %14
12: ; preds = %2
%13 = load i8*, i8** %4
store i8* %13, i8** %3
br label %14
14: ; preds = %12, %11
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @my_malloc(i8* nocapture readnone %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = tail call i8* @malloc(i32 %3)
ret i8* %4
}
void EVP_PKCS82PKEY(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKCS82PKEY() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void myPrintHelloMake(void) {
  printf("Hello makefiles!\n");
  printf("This is my first c program..\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Hello makefiles!\0A\00"
@.str.1 = [30 x i8] c"This is my first c program..\0A\00"
define void @myPrintHelloMake() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Hello makefiles!\00"
@str.2 = [29 x i8] c"This is my first c program..\00"
define void @myPrintHelloMake() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.2, i64 0, i64 0))
ret void
}
int hasPowerDelivery(int portnum) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @hasPowerDelivery(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ genExtra3(char *);
void __foo_foo() { genExtra3("#define FSUB1(name) PREFIX2(LOWCASE(name))"); }


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"#define FSUB1(name) PREFIX2(LOWCASE(name))\00"
define void @__foo_foo() {
%1 = call i32 @genExtra3(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"#define FSUB1(name) PREFIX2(LOWCASE(name))\00"
define void @__foo_foo() {
%1 = tail call i32 @genExtra3(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int add2(int /*<<< orphan*/);
int lists_main() {
  int res = add2(0);
  return 5 / res;
}


x86 assembly (clang, -O0):
<lists_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <add2@plt>
mov    %eax,-0x4(%rbp)
mov    $0x5,%eax
cltd
idivl  -0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lists_main>:
push   %rax
xor    %edi,%edi
call   1030 <add2@plt>
mov    %eax,%ecx
mov    $0x5,%eax
xor    %edx,%edx
idiv   %ecx
pop    %rcx
ret

LLVM IR (-O0):
define i32 @lists_main() {
%1 = alloca i32
%2 = call i32 @add2(i32 0)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = sdiv i32 5, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @lists_main() {
%1 = tail call i32 @add2(i32 0)
%2 = sdiv i32 5, %1
ret i32 %2
}
_Complex double test_conj(_Complex double x) { return __builtin_conj(x); }


x86 assembly (clang, -O0):
<test_conj>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm1
movaps 0xee6(%rip),%xmm2
movsd  -0x18(%rbp),%xmm0
pxor   %xmm2,%xmm0
movsd  %xmm1,-0x10(%rbp)
movlpd %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_conj>:
xorps  0xef9(%rip),%xmm1
ret

LLVM IR (-O0):
define { double, double } @test_conj(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca { double, double }
%5 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %0, double* %5
%6 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %1, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%8 = load double, double* %7
%9 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%10 = load double, double* %9
%11 = fneg double %10
%12 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%13 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %8, double* %12
store double %11, double* %13
%14 = load { double, double }, { double, double }* %3
ret { double, double } %14
}

LLVM IR (-O2):
define { double, double } @test_conj(double %0, double %1) {
%3 = fneg double %1
%4 = insertvalue { double, double } poison, double %0, 0
%5 = insertvalue { double, double } %4, double %3, 1
ret { double, double } %5
}