xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x82() {
  Assert_real((isodigit(130) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              655, ("isodigit should be 0 for 0x82"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x82>:
push   %rax
mov    $0x82,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x28f,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x82\00"
define void @t_isodigit_0x82() {
%1 = tail call i64 @isodigit(i32 130)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 655, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int tf_bI(signed char x, unsigned int c) { return c / 3; }


x86 assembly (clang, -O0):
<tf_bI>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
xor    %edx,%edx
div    %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<tf_bI>:
mov    %esi,%ecx
mov    $0xaaaaaaab,%eax
imul   %rcx,%rax
shr    $0x21,%rax
ret

LLVM IR (-O0):
define i32 @tf_bI(i8 signext %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 = udiv i32 %5, 3
ret i32 %6
}

LLVM IR (-O2):
define i32 @tf_bI(i8 signext %0, i32 %1) {
%3 = udiv i32 %1, 3
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("12345");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ cpu_read_word(int /*<<< orphan*/);
uint32_t cpu_read_word_dasm(uint32_t address) { return cpu_read_word(address); }


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

x86 assembly (clang, -O2):
<cpu_read_word_dasm>:
jmp    1030 <cpu_read_word@plt>

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

LLVM IR (-O2):
define i32 @cpu_read_word_dasm(i32 %0) {
%2 = tail call i32 @cpu_read_word(i32 %0)
ret i32 %2
}
/* Variables and functions */
int printf(char *);
int main(int argc, char **argv) { return printf("\"Hello World!\""); }


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"\22Hello World!\22\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
@.str = [15 x i8] c"\22Hello World!\22\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ EACCES;
int /*<<< orphan*/ _stub(int /*<<< orphan*/);
clock_t __wrap_times(struct tms *buf) { return _stub(EACCES); }


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

x86 assembly (clang, -O2):
<__wrap_times>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <_stub@plt>

LLVM IR (-O0):
%struct.tms = type { i32 }
@EACCES = global i32 0
define i32 @__wrap_times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
%3 = load i32, i32* @EACCES
%4 = call i32 @_stub(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.tms = type { i32 }
@EACCES = global i32 0
define i32 @__wrap_times(%struct.tms* nocapture readnone %0) {
%2 = load i32, i32* @EACCES
%3 = tail call i32 @_stub(i32 %2)
ret i32 %3
}
/* Variables and functions */
size_t tdb_uimax(const size_t a, const size_t b) { return a > b ? a : b; }


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

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

LLVM IR (-O0):
define i64 @tdb_uimax(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 ugt 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 @tdb_uimax(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a;
  char b;
  a = 0;
  while (a < 2) {
    printf("%d", a++);
    break;
    b = 'A';
    while (b < 'C') {
      printf("%c", b++);
    }
    printf("e");
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1149 <main+0x39>
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}
int irqchip_in_kernel(struct kvm *kvm) { return 1; }


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

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

LLVM IR (-O0):
%struct.kvm = type opaque
define i32 @irqchip_in_kernel(%struct.kvm* %0) {
%2 = alloca %struct.kvm*
store %struct.kvm* %0, %struct.kvm** %2
ret i32 1
}

LLVM IR (-O2):
%struct.kvm = type opaque
define i32 @irqchip_in_kernel(%struct.kvm* nocapture readnone %0) {
ret i32 1
}
void ff_hevc_put_hevc_bi_w_qpel_h24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h24_12_sse4() {
ret void
}
/* Variables and functions */
double log(int /*<<< orphan*/);
int /*<<< orphan*/ rnd();
double expo(double a) { return (-log(rnd()) / a); }


x86 assembly (clang, -O0):
<expo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rnd@plt>
mov    %eax,%edi
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expo>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rnd@plt>
mov    %eax,%edi
call   1040 <log@plt>
xorpd  0xec4(%rip),%xmm0
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @expo(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (...) @rnd()
%4 = call double @log(i32 %3)
%5 = fneg double %4
%6 = load double, double* %2
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @expo(double %0) {
%2 = tail call i32 (...) @rnd()
%3 = tail call double @log(i32 %2)
%4 = fneg double %3
%5 = fdiv double %4, %0
ret double %5
}
/* Variables and functions */
size_t region_misc_size(void) { return 4096; }


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

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

LLVM IR (-O0):
define i64 @region_misc_size() {
ret i64 4096
}

LLVM IR (-O2):
define i64 @region_misc_size() {
ret i64 4096
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
scalar_t__ readRegister(int, int, int *);
uint8_t readTemperature() {
  int value;
  int succesful = 0;
  if (readRegister(0x94, 0x00, &value)) {
    succesful = 1;
  }
  return succesful ? (uint8_t)value : 0x78;
}


x86 assembly (clang, -O0):
<readTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x94,%edi
xor    %esi,%esi
lea    -0x4(%rbp),%rdx
call   1030 <readRegister@plt>
cmp    $0x0,%rax
je     1140 <readTemperature+0x30>
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1155 <readTemperature+0x45>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1162 <readTemperature+0x52>
mov    $0x78,%eax
mov    %eax,-0xc(%rbp)
jmp    1162 <readTemperature+0x52>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readTemperature>:
push   %rax
lea    0x4(%rsp),%rdx
mov    $0x94,%edi
xor    %esi,%esi
call   1030 <readRegister@plt>
mov    %rax,%rcx
mov    $0x78,%eax
test   %rcx,%rcx
je     1133 <readTemperature+0x23>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @readTemperature() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
%3 = call i64 @readRegister(i32 148, i32 0, i32* %1)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %2
br label %6
6: ; preds = %5, %0
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = load i32, i32* %1
br label %12
11: ; preds = %6
br label %12
12: ; preds = %11, %9
%13 = phi i32 [ %10, %9 ], [ 120, %11 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @readTemperature() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @readRegister(i32 148, i32 0, i32* %1)
%4 = icmp eq i64 %3, 0
%5 = load i32, i32* %1
%6 = select i1 %4, i32 120, i32 %5
ret i32 %6
}
/* Type definitions */
struct tmx {
  int dummy;
};
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strftime(char *, size_t, char *, struct tm *);
int /*<<< orphan*/ strfxtime(char *, size_t, char *, struct tmx *);
void uninivar_strftime(void) {
  char *s;
  size_t max;
  char *fmt;
  struct tm *p;
  (void)strftime(s, max, fmt, p);
  struct tmx *px;
  (void)strfxtime(s, max, fmt, px);
}


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

x86 assembly (clang, -O2):
<uninivar_strftime>:
push   %rax
call   1030 <strftime@plt>
pop    %rax
jmp    1040 <strfxtime@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
%struct.tmx = type { i32 }
define void @uninivar_strftime() {
%1 = alloca i8*
%2 = alloca i64
%3 = alloca i8*
%4 = alloca %struct.tm*
%5 = alloca %struct.tmx*
%6 = load i8*, i8** %1
%7 = load i64, i64* %2
%8 = load i8*, i8** %3
%9 = load %struct.tm*, %struct.tm** %4
%10 = call i32 @strftime(i8* %6, i64 %7, i8* %8, %struct.tm* %9)
%11 = load i8*, i8** %1
%12 = load i64, i64* %2
%13 = load i8*, i8** %3
%14 = load %struct.tmx*, %struct.tmx** %5
%15 = call i32 @strfxtime(i8* %11, i64 %12, i8* %13, %struct.tmx* %14)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
%struct.tmx = type { i32 }
define void @uninivar_strftime() {
%1 = tail call i32 @strftime(i8* undef, i64 undef, i8* undef, %struct.tm* undef)
%2 = tail call i32 @strfxtime(i8* undef, i64 undef, i8* undef, %struct.tmx* undef)
ret void
}
void gtk_widget_queue_resize_no_redraw() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_queue_resize_no_redraw() {
ret void
}
int main() {
  int x$1 = 20;
  int *p$1 = (&x$1);
  int **pr$1 = (&p$1);
  ((*(*pr$1)) = 30);
  ((*pr$1)++);
  return 30;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movl   $0x1e,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
mov    $0x1e,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32**
store i32 0, i32* %1
store i32 20, i32* %2
store i32* %2, i32** %3
store i32** %3, i32*** %4
%5 = load i32**, i32*** %4
%6 = load i32*, i32** %5
store i32 30, i32* %6
%7 = load i32**, i32*** %4
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %7
ret i32 30
}

LLVM IR (-O2):
define i32 @main() {
ret i32 30
}
unsigned int read4_little_endian(const unsigned char *cp) {
  return (unsigned int)(cp[0]) + ((unsigned int)(cp[1]) << 8) +
         ((unsigned int)(cp[2]) << 16) + ((unsigned int)(cp[3]) << 24);
}


x86 assembly (clang, -O0):
<read4_little_endian>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read4_little_endian>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @read4_little_endian(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = add i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 24
%24 = add i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @read4_little_endian(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
float foo(float x, float y) {
  volatile int i = 0;
  return i < 0 ? x : y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0x0,%eax
jge    1130 <foo+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    113a <foo+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x0,-0x4(%rsp)
cmpl   $0x0,-0x4(%rsp)
js     1112 <foo+0x12>
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @foo(float %0, float %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store volatile i32 0, i32* %3
%5 = load volatile i32, i32* %3
%6 = icmp slt i32 %5, 0
%7 = select i1 %6, float %0, float %1
ret float %7
}
void EVP_PBE_CipherInit(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PBE_CipherInit() {
ret void
}
int do_023() { return 23; }


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

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

LLVM IR (-O0):
define i32 @do_023() {
ret i32 23
}

LLVM IR (-O2):
define i32 @do_023() {
ret i32 23
}
cbuf17(f, n) { return (cbuf(f, n, 17)); }


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

x86 assembly (clang, -O2):
<cbuf17>:
mov    $0x11,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf17(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 17)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf17(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 17)
ret i32 %3
}
void CFGMR3CreateTree(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3CreateTree() {
ret void
}
int omp_in_parallel() { return 0; }


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

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

LLVM IR (-O0):
define i32 @omp_in_parallel() {
ret i32 0
}

LLVM IR (-O2):
define i32 @omp_in_parallel() {
ret i32 0
}
unsigned int adcGetResult(unsigned int wait) {
  unsigned int result = (*((volatile unsigned int *const)(0x48030000 + 0x300)));
  while (wait && !(result & (1 << 31))) {
    result = (*((volatile unsigned int *const)(0x48030000 + 0x300)));
  }
  return result;
}


x86 assembly (clang, -O0):
<adcGetResult>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x48030300,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     1133 <adcGetResult+0x33>
mov    -0x8(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1143 <adcGetResult+0x43>
jmp    1152 <adcGetResult+0x52>
mov    $0x48030300,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    1111 <adcGetResult+0x11>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adcGetResult>:
mov    0x48030300,%eax
test   %edi,%edi
je     110f <adcGetResult+0xf>
test   %eax,%eax
jns    1100 <adcGetResult>
ret

LLVM IR (-O0):
define i32 @adcGetResult(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load volatile i32, i32* inttoptr (i64 1208156928 to i32*)
store i32 %4, i32* %3
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %3
%10 = and i32 %9, -2147483648
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br label %13
13: ; preds = %8, %5
%14 = phi i1 [ false, %5 ], [ %12, %8 ]
br i1 %14, label %15, label %17
15: ; preds = %13
%16 = load volatile i32, i32* inttoptr (i64 1208156928 to i32*)
store i32 %16, i32* %3
br label %5
17: ; preds = %13
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @adcGetResult(i32 %0) {
%2 = icmp ne i32 %0, 0
br label %3
3: ; preds = %3, %1
%4 = load volatile i32, i32* inttoptr (i64 1208156928 to i32*)
%5 = icmp sgt i32 %4, -1
%6 = select i1 %2, i1 %5, i1 false
br i1 %6, label %3, label %7
7: ; preds = %3
ret i32 %4
}
void ASN1_d2i_bio(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_d2i_bio() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ _mm256_storeu_si256(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ const);
void yy_storeu_256(void *const a, const __m256i v) {
  _mm256_storeu_si256((__m256i *)a, v);
}


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

x86 assembly (clang, -O2):
<yy_storeu_256>:
jmp    1030 <_mm256_storeu_si256@plt>

LLVM IR (-O0):
define void @yy_storeu_256(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = call i32 @_mm256_storeu_si256(i32* %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @yy_storeu_256(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @_mm256_storeu_si256(i32* %3, i32 %1)
ret void
}
/* Type definitions */
struct map {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ *get(struct map const *, char const *);
int map_contains_key(const struct map *m, const char *key) {
  return get(m, key) != NULL;
}


x86 assembly (clang, -O0):
<map_contains_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <get@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_contains_key>:
push   %rax
call   1030 <get@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.map = type { i32 }
define i32 @map_contains_key(%struct.map* %0, i8* %1) {
%3 = alloca %struct.map*
%4 = alloca i8*
store %struct.map* %0, %struct.map** %3
store i8* %1, i8** %4
%5 = load %struct.map*, %struct.map** %3
%6 = load i8*, i8** %4
%7 = call i32* @get(%struct.map* %5, i8* %6)
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.map = type { i32 }
define i32 @map_contains_key(%struct.map* %0, i8* %1) {
%3 = tail call i32* @get(%struct.map* %0, i8* %1)
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
void X509_CERT_AUX_print(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_CERT_AUX_print() {
ret void
}
int test_imm_C1int8_mem(signed char *val) {
  return ((*val) & (0xC1 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_C1int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -63
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int get_argCnt(char **);
int /*<<< orphan*/ isRedirected(char **);
char *getRedir(char *args[]) {
  assert(isRedirected(args));
  int ac = get_argCnt(args);
  char *res = args[ac - 1];
  return res;
}


x86 assembly (clang, -O0):
<getRedir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <isRedirected@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <get_argCnt@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRedir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <isRedirected@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <get_argCnt@plt>
cltq
mov    -0x8(%rbx,%rax,8),%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @getRedir(i8** %0) {
%2 = tail call i32 @isRedirected(i8** %0)
%3 = tail call i32 @assert(i32 %2)
%4 = tail call i32 @get_argCnt(i8** %0)
%5 = add nsw i32 %4, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8*, i8** %0, i64 %6
%8 = load i8*, i8** %7
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int /*<<< orphan*/,
                          int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char *);
void KAPI_save_as_header_Enum(FILE *fp, char *pch) {
  FILE *fpTmp = fp;
  fwrite(pch, sizeof(char), strlen(pch), fp);
}


x86 assembly (clang, -O0):
<KAPI_save_as_header_Enum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KAPI_save_as_header_Enum>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fwrite@plt>

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

LLVM IR (-O2):
define void @KAPI_save_as_header_Enum(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @fwrite(i8* %1, i32 1, i32 %3, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ play_game();
int /*<<< orphan*/ printf(char *);
int main(void) {
  play_game();
  printf("\n");
  printf("okay see you soon:\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <play_game@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb7(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [19 x i8] c"okay see you soon:\00"
define i32 @main() {
%1 = tail call i32 (...) @play_game()
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int hdr_log_writer_init(struct hdr_log_writer *writer) {
  (void)writer;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.hdr_log_writer = type opaque
define i32 @hdr_log_writer_init(%struct.hdr_log_writer* %0) {
%2 = alloca %struct.hdr_log_writer*
store %struct.hdr_log_writer* %0, %struct.hdr_log_writer** %2
%3 = load %struct.hdr_log_writer*, %struct.hdr_log_writer** %2
ret i32 0
}

LLVM IR (-O2):
%struct.hdr_log_writer = type opaque
define i32 @hdr_log_writer_init(%struct.hdr_log_writer* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct locale {
  int dummy;
};

/* Variables and functions */
struct locale *get_locale(char const *);
int /*<<< orphan*/ locale_setstring(struct locale *, char const *,
                                    char const *);
void locale_set(const char *lang, const char *key, const char *str) {
  struct locale *loc = get_locale(lang);
  if (loc) {
    locale_setstring(loc, key, str);
  }
}


x86 assembly (clang, -O0):
<locale_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_locale@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115d <locale_set+0x3d>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <locale_setstring@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<locale_set>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1040 <get_locale@plt>
test   %rax,%rax
je     1149 <locale_set+0x29>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <locale_setstring@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.locale = type { i32 }
define void @locale_set(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.locale*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = call %struct.locale* @get_locale(i8* %8)
store %struct.locale* %9, %struct.locale** %7
%10 = load %struct.locale*, %struct.locale** %7
%11 = icmp ne %struct.locale* %10, null
br i1 %11, label %12, label %17
12: ; preds = %3
%13 = load %struct.locale*, %struct.locale** %7
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = call i32 @locale_setstring(%struct.locale* %13, i8* %14, i8* %15)
br label %17
17: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
%struct.locale = type { i32 }
define void @locale_set(i8* %0, i8* %1, i8* %2) {
%4 = tail call %struct.locale* @get_locale(i8* %0)
%5 = icmp eq %struct.locale* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @locale_setstring(%struct.locale* %4, i8* %1, i8* %2)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int part(int *, int, int);
void Quicksort(int vector[], int start, int end) {
  if (start < end) {
    int P = part(vector, start, end);
    Quicksort(vector, start, P - 1);
    Quicksort(vector, P + 1, end);
  }
}


x86 assembly (clang, -O0):
<Quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <Quicksort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <part@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <Quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <Quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Quicksort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <Quicksort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <part@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <Quicksort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <Quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @Quicksort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @part(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @Quicksort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
float fabsf(float);
float fast_clamp_mul2(float x, float min, float max) {
  float x1 = fabsf(x - min);
  float x2 = fabsf(x - max);
  x = x1 + min + max - x2;
  return x;
}


x86 assembly (clang, -O0):
<fast_clamp_mul2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movaps 0xedc(%rip),%xmm1
pand   %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movaps 0xec2(%rip),%xmm1
pand   %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
subss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_clamp_mul2>:
movaps %xmm0,%xmm3
subss  %xmm1,%xmm3
movaps 0xef2(%rip),%xmm4
andps  %xmm4,%xmm3
subss  %xmm2,%xmm0
andps  %xmm4,%xmm0
addss  %xmm1,%xmm3
addss  %xmm2,%xmm3
subss  %xmm0,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @fast_clamp_mul2(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %4
%10 = load float, float* %5
%11 = fsub float %9, %10
%12 = call float @llvm.fabs.f32(float %11)
store float %12, float* %7
%13 = load float, float* %4
%14 = load float, float* %6
%15 = fsub float %13, %14
%16 = call float @llvm.fabs.f32(float %15)
store float %16, float* %8
%17 = load float, float* %7
%18 = load float, float* %5
%19 = fadd float %17, %18
%20 = load float, float* %6
%21 = fadd float %19, %20
%22 = load float, float* %8
%23 = fsub float %21, %22
store float %23, float* %4
%24 = load float, float* %4
ret float %24
}

LLVM IR (-O2):
define float @fast_clamp_mul2(float %0, float %1, float %2) {
%4 = fsub float %0, %1
%5 = tail call float @llvm.fabs.f32(float %4)
%6 = fsub float %0, %2
%7 = tail call float @llvm.fabs.f32(float %6)
%8 = fadd float %5, %1
%9 = fadd float %8, %2
%10 = fsub float %9, %7
ret float %10
}
void rop3_8_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = *D & stk3;
  stk1 = S & stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_8_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_8_0_1>:
xor    %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_8_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = and i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = and i32 %28, %30
%32 = load i8, i8* %7
%33 = zext i8 %32 to i32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = and i32 %33, %36
%38 = or i32 %31, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = load i8, i8* %5
%42 = zext i8 %41 to i32
%43 = xor i32 %42, -1
%44 = and i32 %40, %43
%45 = load i8*, i8** %4
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = and i32 %44, %47
%49 = or i32 %38, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_8_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %1, %2
%6 = and i8 %5, %4
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
scalar_t__ findkey(char const *);
int EmoteLook(const char *key) { return findkey(key) != 0; }


x86 assembly (clang, -O0):
<EmoteLook>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <findkey@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EmoteLook>:
push   %rax
call   1030 <findkey@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @EmoteLook(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @findkey(i8* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @EmoteLook(i8* %0) {
%2 = tail call i64 @findkey(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int *__v2si;
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int __attribute__((__always___, __nodebug__)) _mm_cvtsi64_si32(__m64 __m) {
  __v2si __mmx_var2 = (__v2si)__m;
  return __mmx_var2[0];
}


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

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

LLVM IR (-O0):
define i32 @_mm_cvtsi64_si32(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @_mm_cvtsi64_si32(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
bool __kv_5_filt_even(void *cc, void *k, void *v) {
  return !(*(int64_t *)k % 2);
}


x86 assembly (clang, -O0):
<__kv_5_filt_even>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__kv_5_filt_even>:
mov    (%rsi),%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @__kv_5_filt_even(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** %5
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = srem i32 %9, 2
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @__kv_5_filt_even(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = xor i32 %6, 1
ret i32 %7
}
/* Type definitions */
struct sha512_ctx {
  int dummy;
};

/* Variables and functions */
void *sha384_read_ctx(struct sha512_ctx *, void *);
int /*<<< orphan*/ sha512_conclude_ctx(struct sha512_ctx *);
void *sha384_finish_ctx(struct sha512_ctx *ctx, void *resbuf) {
  sha512_conclude_ctx(ctx);
  return sha384_read_ctx(ctx, resbuf);
}


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

x86 assembly (clang, -O2):
<sha384_finish_ctx>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <sha512_conclude_ctx@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <sha384_read_ctx@plt>

LLVM IR (-O0):
%struct.sha512_ctx = type { i32 }
define i8* @sha384_finish_ctx(%struct.sha512_ctx* %0, i8* %1) {
%3 = alloca %struct.sha512_ctx*
%4 = alloca i8*
store %struct.sha512_ctx* %0, %struct.sha512_ctx** %3
store i8* %1, i8** %4
%5 = load %struct.sha512_ctx*, %struct.sha512_ctx** %3
%6 = call i32 @sha512_conclude_ctx(%struct.sha512_ctx* %5)
%7 = load %struct.sha512_ctx*, %struct.sha512_ctx** %3
%8 = load i8*, i8** %4
%9 = call i8* @sha384_read_ctx(%struct.sha512_ctx* %7, i8* %8)
ret i8* %9
}

LLVM IR (-O2):
%struct.sha512_ctx = type { i32 }
define i8* @sha384_finish_ctx(%struct.sha512_ctx* %0, i8* %1) {
%3 = tail call i32 @sha512_conclude_ctx(%struct.sha512_ctx* %0)
%4 = tail call i8* @sha384_read_ctx(%struct.sha512_ctx* %0, i8* %1)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
ssize_t _write(int a __attribute__((unused)),
               const void *b __attribute__((unused)),
               size_t c __attribute__((unused))) {
  return 0;
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_write(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* nocapture readnone %1, i64 %2) {
ret i32 0
}