xunge/DecIR huggingface dataset:
void rcu_read_unlock_sched(void) {
  do {
  } while (0);
  (void)0;
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<rcu_read_unlock_sched>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <rcu_read_unlock_sched+0x9>
jmp    110e <rcu_read_unlock_sched+0xe>
jmp    1113 <rcu_read_unlock_sched+0x13>
jmp    1118 <rcu_read_unlock_sched+0x18>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rcu_read_unlock_sched() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
br label %3
3: ; preds = %2
br label %4
4: ; preds = %3
ret void
}

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ReplaySignal2() {
ret void
}
int main() { return (2 + 2) * 2 - 8; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
enum {
  FP_NAN,
  FP_INFINITE,
  FP_ZERO,
  FP_SUBNORMAL,
  FP_NORMAL
} fpclassify(double x) {
  return FP_NORMAL;
}


x86 assembly (clang, -O0):
<fpclassify>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    $0x4,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fpclassify(double %0) {
ret i32 4
}
/* Variables and functions */
int Sin(float);
float VectorY(int len, float angle) { return Sin(angle) * len; }


x86 assembly (clang, -O0):
<VectorY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <Sin@plt>
imul   -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VectorY>:
push   %rbx
mov    %edi,%ebx
call   1030 <Sin@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @VectorY(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = call i32 @Sin(float %5)
%7 = load i32, i32* %3
%8 = mul nsw i32 %6, %7
%9 = sitofp i32 %8 to float
ret float %9
}

LLVM IR (-O2):
define float @VectorY(i32 %0, float %1) {
%3 = tail call i32 @Sin(float %1)
%4 = mul nsw i32 %3, %0
%5 = sitofp i32 %4 to float
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;
struct timeval {
  int /*<<< orphan*/ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint random_get_seedval_from_current_time() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_usec;
}


x86 assembly (clang, -O0):
<random_get_seedval_from_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_get_seedval_from_current_time>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @random_get_seedval_from_current_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @random_get_seedval_from_current_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}
unsigned long bn_div_words(unsigned long h, unsigned long l, unsigned long d) {
  unsigned long ret, waste;
  asm("divq      %4" : "=a"(ret), "=d"(waste) : "a"(l), "d"(h), "g"(d) : "cc");
  return ret;
}


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

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

LLVM IR (-O0):
define i64 @bn_div_words(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = load i64, i64* %5
%10 = load i64, i64* %4
%11 = load i64, i64* %6
%12 = call { i64, i64 } asm "divq $4", "={ax},={dx},{ax},{dx},imr,~{cc},~{dirflag},~{fpsr},~{flags}"(i64 %9, i64 %10, i64 %11)
%13 = extractvalue { i64, i64 } %12, 0
%14 = extractvalue { i64, i64 } %12, 1
store i64 %13, i64* %7
store i64 %14, i64* %8
%15 = load i64, i64* %7
ret i64 %15
}

LLVM IR (-O2):
define i64 @bn_div_words(i64 %0, i64 %1, i64 %2) {
%4 = tail call { i64, i64 } asm "divq $4", "={ax},={dx},{ax},{dx},imr,~{cc},~{dirflag},~{fpsr},~{flags}"(i64 %1, i64 %0, i64 %2)
%5 = extractvalue { i64, i64 } %4, 0
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *, int);
int main() {
  int a = 512;
  int *x = &a;
  int *y;
  y = &a;
  printf("X address: %p, value: %d \n", x, *x);
  printf("Y address: %p, value: %d", y, *y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x200,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x200,0xc(%rsp)
lea    0xedc(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x200,%edx
call   1030 <printf@plt>
mov    0xc(%rsp),%edx
lea    0xeda(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"X address: %p, value: %d \0A\00"
@.str.1 = [25 x i8] c"Y address: %p, value: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
store i32 512, i32* %2
store i32* %2, i32** %3
store i32* %2, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32* %5, i32 %7)
%9 = load i32*, i32** %4
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %9, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"X address: %p, value: %d \0A\00"
@.str.1 = [25 x i8] c"Y address: %p, value: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 512, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32* %1, i32 512)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32 %4)
ret i32 0
}
/* Variables and functions */
int in(int, int, int);
int u8isuppergreeki(int n) { return in(n, 0x391, 0x3A9); }


x86 assembly (clang, -O0):
<u8isuppergreeki>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x391,%esi
mov    $0x3a9,%edx
call   1030 <in@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isuppergreeki>:
mov    $0x391,%esi
mov    $0x3a9,%edx
jmp    1030 <in@plt>

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

LLVM IR (-O2):
define i32 @u8isuppergreeki(i32 %0) {
%2 = tail call i32 @in(i32 %0, i32 913, i32 937)
ret i32 %2
}
/* Variables and functions */
char lettreToChar(char);
char hexaToChar(char hexa1, char hexa2) {
  hexa1 = lettreToChar(hexa1);
  hexa2 = lettreToChar(hexa2);
  return hexa1 * 16 + hexa2;
}


x86 assembly (clang, -O0):
<hexaToChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <lettreToChar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <lettreToChar@plt>
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
shl    $0x4,%eax
movsbl -0x2(%rbp),%ecx
add    %ecx,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexaToChar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <lettreToChar@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <lettreToChar@plt>
shl    $0x4,%bl
add    %bl,%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @hexaToChar(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = call signext i8 @lettreToChar(i8 signext %5)
store i8 %6, i8* %3
%7 = load i8, i8* %4
%8 = call signext i8 @lettreToChar(i8 signext %7)
store i8 %8, i8* %4
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = mul nsw i32 %10, 16
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = add nsw i32 %11, %13
%15 = trunc i32 %14 to i8
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @hexaToChar(i8 signext %0, i8 signext %1) {
%3 = tail call signext i8 @lettreToChar(i8 signext %0)
%4 = tail call signext i8 @lettreToChar(i8 signext %1)
%5 = shl i8 %3, 4
%6 = add i8 %5, %4
ret i8 %6
}
/* Variables and functions */
double pow(double, double);
double hl_math_pow(double a, double b) { return pow(a, b); }


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

x86 assembly (clang, -O2):
<hl_math_pow>:
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @hl_math_pow(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @pow(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @hl_math_pow(double %0, double %1) {
%3 = tail call double @pow(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  void insertString(char source[], const char insertChars[], int start);
  char text[] = "the wrong son";
  insertString(text, "per", 10);
  printf("%s", text);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rdi
lea    0xeb5(%rip),%rsi
mov    $0xa,%edx
call   1040 <insertString@plt>
lea    -0x12(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x6e6f7320676e6f,%rax
mov    %rax,0x6(%rsp)
movabs $0x6e6f727720656874,%rax
72 6f 6e
mov    %rax,(%rsp)
lea    0xec5(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <insertString@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.text = [14 x i8] c"the wrong son\00"
@.str = [4 x i8] c"per\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
store i32 0, i32* %1
%3 = bitcast [14 x i8]* %2 to i8*
%4 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.text = [14 x i8] c"the wrong son\00"
@.str = [4 x i8] c"per\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
void uninitvar_feof(void) {
  FILE *stream;
  (void)feof(stream);
}


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

x86 assembly (clang, -O2):
<uninitvar_feof>:
jmp    1030 <feof@plt>

LLVM IR (-O0):
define void @uninitvar_feof() {
%1 = alloca i32*
%2 = load i32*, i32** %1
%3 = call i32 @feof(i32* %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_feof() {
%1 = tail call i32 @feof(i32* undef)
ret void
}
int test(void) {
  static int i;
  if (i) {
    return 42;
  } else {
    return 43;
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
je     111d <test+0x1d>
movl   $0x2a,-0x4(%rbp)
jmp    1124 <test+0x24>
movl   $0x2b,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@test.i = internal global i32 0
define i32 @test() {
%1 = alloca i32
%2 = load i32, i32* @test.i
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 42, i32* %1
br label %6
5: ; preds = %0
store i32 43, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @test() {
ret i32 43
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ blue_max;
};
typedef TYPE_1__ XStandardColormap;

/* Variables and functions */
unsigned long get_XStandardColormap_blue_max(void *_p) {
  return (unsigned long)((XStandardColormap *)_p)->blue_max;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XStandardColormap_blue_max(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XStandardColormap_blue_max(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main(void) {
  uint32_t s = 0xD6FC;
  uint32_t t = 0x0334;
  uint32_t c;
  printf("s = U+%04X, t = U+%04X\n", s, t);
  c = s << 16 | t;
  printf("c = U+%04X\n", c);
  c = (uint32_t)-1;
  printf("c = U+%010x\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xd6fc,-0x8(%rbp)
movl   $0x334,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeb5(%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    0xee8(%rip),%rdi
mov    $0xd6fc,%esi
mov    $0x334,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0xd6fc0334,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"s = U+%04X, t = U+%04X\0A\00"
@.str.1 = [12 x i8] c"c = U+%04X\0A\00"
@.str.2 = [13 x i8] c"c = U+%010x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 55036, i32* %2
store i32 820, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %2
%9 = shl i32 %8, 16
%10 = load i32, i32* %3
%11 = or i32 %9, %10
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %12)
store i32 -1, i32* %4
%14 = load i32, i32* %4
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"s = U+%04X, t = U+%04X\0A\00"
@.str.1 = [12 x i8] c"c = U+%04X\0A\00"
@.str.2 = [13 x i8] c"c = U+%010x\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 55036, i32 820)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 -688127180)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 -1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef uintptr_t uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htole32(uintptr_t);
int /*<<< orphan*/ rgph_murmur32s_finalise(int, uintptr_t *);
int /*<<< orphan*/ rgph_murmur32s_mix(int /*<<< orphan*/, uintptr_t *, int);
uint32_t rgph_u32_murmur32s_u32(uint32_t value, uintptr_t seed) {
  uint32_t h[1] = {seed};
  rgph_murmur32s_mix(htole32(value), h, 0);
  rgph_murmur32s_mix(0, h, 1);
  rgph_murmur32s_finalise(sizeof(value), h);
  return h[0];
}


x86 assembly (clang, -O0):
<rgph_u32_murmur32s_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <htole32@plt>
mov    %eax,%edi
lea    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1040 <rgph_murmur32s_mix@plt>
lea    -0x18(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <rgph_murmur32s_mix@plt>
lea    -0x18(%rbp),%rsi
mov    $0x8,%edi
call   1050 <rgph_murmur32s_finalise@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u32_murmur32s_u32>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,0x8(%rsp)
call   1030 <htole32@plt>
lea    0x8(%rsp),%rbx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1040 <rgph_murmur32s_mix@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <rgph_murmur32s_mix@plt>
mov    $0x8,%edi
mov    %rbx,%rsi
call   1050 <rgph_murmur32s_finalise@plt>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @rgph_u32_murmur32s_u32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca [1 x i64]
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%7 = load i64, i64* %4
store i64 %7, i64* %6
%8 = load i64, i64* %3
%9 = call i32 @htole32(i64 %8)
%10 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%11 = call i32 @rgph_murmur32s_mix(i32 %9, i64* %10, i32 0)
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%13 = call i32 @rgph_murmur32s_mix(i32 0, i64* %12, i32 1)
%14 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%15 = call i32 @rgph_murmur32s_finalise(i32 8, i64* %14)
%16 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%17 = load i64, i64* %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @rgph_u32_murmur32s_u32(i64 %0, i64 %1) {
%3 = alloca [1 x i64]
%4 = bitcast [1 x i64]* %3 to i8*
%5 = getelementptr inbounds [1 x i64], [1 x i64]* %3, i64 0, i64 0
store i64 %1, i64* %5
%6 = tail call i32 @htole32(i64 %0)
%7 = call i32 @rgph_murmur32s_mix(i32 %6, i64* %5, i32 0)
%8 = call i32 @rgph_murmur32s_mix(i32 0, i64* %5, i32 1)
%9 = call i32 @rgph_murmur32s_finalise(i32 8, i64* %5)
%10 = load i64, i64* %5
ret i64 %10
}
char sanitized_char(char val) { return (val >= 'a' && val <= 'z') ? val : '.'; }


x86 assembly (clang, -O0):
<sanitized_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1130 <sanitized_char+0x30>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1130 <sanitized_char+0x30>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113d <sanitized_char+0x3d>
mov    $0x2e,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <sanitized_char+0x3d>
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sanitized_char>:
lea    -0x61(%rdi),%eax
cmp    $0x1a,%al
mov    $0x2e,%eax
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @sanitized_char(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = select i1 %3, i8 %0, i8 46
ret i8 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
void empty_handler(int sig, siginfo_t *si, void *ctx_void) {}


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

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

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

LLVM IR (-O2):
define void @empty_handler(i32 %0, i32* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
size_t size_distance(size_t from, size_t to) {
  if (to >= from)
    return to - from;
  else
    return from - to;
}


x86 assembly (clang, -O0):
<size_distance>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     112b <size_distance+0x2b>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1137 <size_distance+0x37>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_distance>:
mov    %rsi,%rax
sub    %rdi,%rax
neg    %rax
sub    %rdi,%rsi
cmovae %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @size_distance(i64 %0, i64 %1) {
%3 = icmp ult i64 %1, %0
%4 = sub i64 %1, %0
%5 = sub i64 %0, %1
%6 = select i1 %3, i64 %5, i64 %4
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void init_signal_mask(sigset_t *mask) {
  sigemptyset(mask);
  sigaddset(mask, SIGQUIT);
  sigaddset(mask, SIGPIPE);
}


x86 assembly (clang, -O0):
<init_signal_mask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sigemptyset@plt>
mov    -0x8(%rbp),%rdi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
call   1040 <sigaddset@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
call   1040 <sigaddset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_signal_mask>:
push   %rbx
mov    %rdi,%rbx
call   1030 <sigemptyset@plt>
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <sigaddset@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <sigaddset@plt>

LLVM IR (-O0):
@SIGQUIT = global i32 0
@SIGPIPE = global i32 0
define void @init_signal_mask(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32*, i32** %2
%6 = load i32, i32* @SIGQUIT
%7 = call i32 @sigaddset(i32* %5, i32 %6)
%8 = load i32*, i32** %2
%9 = load i32, i32* @SIGPIPE
%10 = call i32 @sigaddset(i32* %8, i32 %9)
ret void
}

LLVM IR (-O2):
@SIGQUIT = global i32 0
@SIGPIPE = global i32 0
define void @init_signal_mask(i32* %0) {
%2 = tail call i32 @sigemptyset(i32* %0)
%3 = load i32, i32* @SIGQUIT
%4 = tail call i32 @sigaddset(i32* %0, i32 %3)
%5 = load i32, i32* @SIGPIPE
%6 = tail call i32 @sigaddset(i32* %0, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int drv_PICGraphic_list(void) {
  printf("PICGraphic serial-to-graphic by Peter Bailey");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"PICGraphic serial-to-graphic by Peter Bailey\00"
define i32 @drv_PICGraphic_list() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"PICGraphic serial-to-graphic by Peter Bailey\00"
define i32 @drv_PICGraphic_list() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int main(int argc, char **argv) {
  char *v = (char *)malloc(10);
  char *e = v + 10;
  char *i;
  for (i = v; i < e; i++) {
    *i = 'x';
  }
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    116e <main+0x5e>
mov    -0x28(%rbp),%rax
movb   $0x78,(%rax)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1148 <main+0x38>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <malloc@plt>
movabs $0x7878787878787878,%rcx
78 78 78
mov    %rcx,(%rax)
movw   $0x7878,0x8(%rax)
add    $0xa,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(10) i8* @malloc(i64 10)
%4 = getelementptr i8, i8* %3, i64 10
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
ret i32 %6
}
void __attribute__((visibility("default")))
border_e_horizontal_special_sand_s(unsigned char *pic, unsigned char *mirr) {
  *pic = 0x2D;
  *mirr = 0;
}


x86 assembly (clang, -O0):
<border_e_horizontal_special_sand_s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2d,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_e_horizontal_special_sand_s>:
movb   $0x2d,(%rdi)
movb   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @border_e_horizontal_special_sand_s(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
store i8 45, i8* %5
%6 = load i8*, i8** %4
store i8 0, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_e_horizontal_special_sand_s(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 45, i8* %0
store i8 0, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void seltrue(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


x86 assembly (clang, -O0):
<seltrue>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<seltrue>:
xor    %edi,%edi
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
define void @seltrue() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @seltrue() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
int gb_ptr2int(const void *p) {
  union {
    const void *p;
    int i;
  } x = {p};
  return x.i;
}


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

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

LLVM IR (-O0):
%union.anon = type { i8* }
define i32 @gb_ptr2int(i8* %0) {
%2 = alloca i8*
%3 = alloca %union.anon
store i8* %0, i8** %2
%4 = bitcast %union.anon* %3 to i8**
%5 = load i8*, i8** %2
store i8* %5, i8** %4
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @gb_ptr2int(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
void truncate_filename(const char *filename, char output[64]) {
  strncpy(output, filename, 64);
  output[64 - 1] = '\0';
  for (size_t i = strlen(output); i < 64; ++i)
    output[i] = '\0';
}


x86 assembly (clang, -O0):
<truncate_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x40,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,0x3f(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x40,-0x18(%rbp)
jae    117f <truncate_filename+0x5f>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1157 <truncate_filename+0x37>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncate_filename>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
mov    $0x40,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x3f(%rbx)
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x3f,%rax
ja     116b <truncate_filename+0x3b>
add    %rax,%rbx
mov    $0x40,%edx
sub    %rax,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @truncate_filename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @strncpy(i8* %6, i8* %7, i32 64)
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 63
store i8 0, i8* %10
%11 = load i8*, i8** %4
%12 = call i64 @strlen(i8* %11)
store i64 %12, i64* %5
br label %13
13: ; preds = %20, %2
%14 = load i64, i64* %5
%15 = icmp ult i64 %14, 64
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load i8*, i8** %4
%18 = load i64, i64* %5
%19 = getelementptr inbounds i8, i8* %17, i64 %18
store i8 0, i8* %19
br label %20
20: ; preds = %16
%21 = load i64, i64* %5
%22 = add i64 %21, 1
store i64 %22, i64* %5
br label %13
23: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @truncate_filename(i8* %0, i8* %1) {
%3 = tail call i32 @strncpy(i8* %1, i8* %0, i32 64)
%4 = getelementptr inbounds i8, i8* %1, i64 63
store i8 0, i8* %4
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = icmp ult i64 %5, 64
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = getelementptr i8, i8* %1, i64 %5
%9 = sub nuw nsw i64 64, %5
br label %10
10: ; preds = %7, %2
ret void
}
/* Variables and functions */
int base64_encode_block(unsigned char *, int *, unsigned char const *, int);
int encode_block(unsigned char *dst, int *dstlen, const unsigned char *src,
                 int srclen) {
  return (base64_encode_block(dst, dstlen, src, srclen));
}


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

x86 assembly (clang, -O2):
<encode_block>:
jmp    1030 <base64_encode_block@plt>

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

LLVM IR (-O2):
define i32 @encode_block(i8* %0, i32* %1, i8* %2, i32 %3) {
%5 = tail call i32 @base64_encode_block(i8* %0, i32* %1, i8* %2, i32 %3)
ret i32 %5
}
double __attribute__((no)) double_min1(double a, double b) {
  return ((a) < (b) ? (a) : (b));
}


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

x86 assembly (clang, -O2):
<double_min1>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @double_min1(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
long long f8(void) {
  unsigned int a = 0x80000000;
  return (a & 0x80000000) ? -2147483648LL : 0LL;
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
movl   $0x80000000,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x80000000,%edx
xor    %eax,%eax
mov    $0xffffffff80000000,%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
mov    $0xffffffff80000000,%rax
ret

LLVM IR (-O0):
define i64 @f8() {
%1 = alloca i32
store i32 -2147483648, i32* %1
%2 = load i32, i32* %1
%3 = and i32 %2, -2147483648
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i64 -2147483648, i64 0
ret i64 %6
}

LLVM IR (-O2):
define i64 @f8() {
ret i64 -2147483648
}
char *langRomTypeSvi738Fdc() { return "SVI-738 Disk Controller"; }


x86 assembly (clang, -O0):
<langRomTypeSvi738Fdc>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeSvi738Fdc>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [24 x i8] c"SVI-738 Disk Controller\00"
define i8* @langRomTypeSvi738Fdc() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [24 x i8] c"SVI-738 Disk Controller\00"
define i8* @langRomTypeSvi738Fdc() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ compute(int);
int example_set_var(int *array, int array_size) {
  compute(10);
  return 0;
}


x86 assembly (clang, -O0):
<example_set_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xa,%edi
call   1030 <compute@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @example_set_var(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 @compute(i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @example_set_var(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @compute(i32 10)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ rem;
  int quot;
};
typedef TYPE_1__ div_t;

/* Variables and functions */
TYPE_1__ div(int, int);
int base64_encoded_size(int unenc_len) {
  div_t d = div(unenc_len, 3);
  if (d.rem == 0)
    return unenc_len + d.quot + 1;
  return (d.quot + 1) * 4 + 1;
}


x86 assembly (clang, -O0):
<base64_encoded_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1030 <div@plt>
mov    %rax,-0x18(%rbp)
mov    %edx,-0x10(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114b <base64_encoded_size+0x3b>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <base64_encoded_size+0x4a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
shl    $0x2,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_encoded_size>:
push   %rbx
mov    %edi,%ebx
mov    $0x3,%esi
call   1030 <div@plt>
test   %rax,%rax
lea    0x1(%rbx,%rdx,1),%ecx
lea    0x5(,%rdx,4),%eax
cmove  %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i32 }
define i32 @base64_encoded_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.TYPE_3__
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call { i64, i32 } @div(i32 %5, i32 3)
%7 = bitcast %struct.TYPE_3__* %4 to { i64, i32 }*
%8 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %7, i32 0, i32 0
%9 = extractvalue { i64, i32 } %6, 0
store i64 %9, i64* %8
%10 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %7, i32 0, i32 1
%11 = extractvalue { i64, i32 } %6, 1
store i32 %11, i32* %10
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i32 0, i32 0
%13 = load i64, i64* %12
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %1
%16 = load i32, i32* %3
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i32 0, i32 1
%18 = load i32, i32* %17
%19 = add nsw i32 %16, %18
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %27
21: ; preds = %1
%22 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i32 0, i32 1
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
%25 = mul nsw i32 %24, 4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %27
27: ; preds = %21, %15
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @base64_encoded_size(i32 %0) {
%2 = tail call { i64, i32 } @div(i32 %0, i32 3)
%3 = extractvalue { i64, i32 } %2, 0
%4 = extractvalue { i64, i32 } %2, 1
%5 = icmp eq i64 %3, 0
%6 = add i32 %0, 1
%7 = add i32 %6, %4
%8 = shl i32 %4, 2
%9 = add i32 %8, 5
%10 = select i1 %5, i32 %7, i32 %9
ret i32 %10
}
void pgaspi_statistic_print_counters(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_shufflelo_epi16(int /*<<< orphan*/, int);
__m128i __mm_shufflelo_epi16(__m128i A, int const I) {
  return _mm_shufflelo_epi16(A, 1);
}


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

x86 assembly (clang, -O2):
<__mm_shufflelo_epi16>:
mov    $0x1,%esi
jmp    1030 <_mm_shufflelo_epi16@plt>

LLVM IR (-O0):
define i32 @__mm_shufflelo_epi16(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 = call i32 @_mm_shufflelo_epi16(i32 %5, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @__mm_shufflelo_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_shufflelo_epi16(i32 %0, i32 1)
ret i32 %3
}
void __attribute__((used)) breakpt() {}


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

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

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @breakpt to i8*)], section "llvm.metadata"
define void @breakpt() {
ret void
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @breakpt to i8*)], section "llvm.metadata"
define void @breakpt() {
ret void
}
indirect(typeobj) char typeobj;
{
  if (typeobj == 1) {
    ol("MOV  BX,AX");
    ol("MOV  AL,[Byte BX]");
    ol("CBW");
  } else {
    ol("MOV  BX,AX");
    ol("MOV  AX,[BX]");
  }
}


x86 assembly (clang, -O0):
<indirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x1,%eax
jne    115a <indirect+0x4a>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
jmp    1176 <indirect+0x66>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indirect>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1030 <ol@plt>
cmp    $0x1,%bl
jne    113d <indirect+0x2d>
lea    0xede(%rip),%rdi
xor    %eax,%eax
call   1030 <ol@plt>
lea    0xee2(%rip),%rdi
jmp    1144 <indirect+0x34>
lea    0xedd(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"MOV BX,AX\00"
@.str.1 = [18 x i8] c"MOV AL,[Byte BX]\00"
@.str.2 = [4 x i8] c"CBW\00"
@.str.3 = [13 x i8] c"MOV AX,[BX]\00"
define i32 @indirect(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %15
12: ; preds = %1
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %12, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [11 x i8] c"MOV BX,AX\00"
@.str.1 = [18 x i8] c"MOV AL,[Byte BX]\00"
@.str.2 = [4 x i8] c"CBW\00"
@.str.3 = [13 x i8] c"MOV AX,[BX]\00"
define i32 @indirect(i32 %0) {
%2 = and i32 %0, 255
%3 = icmp eq i32 %2, 1
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br i1 %3, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
%8 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), %1 ]
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* %8)
ret i32 undef
}