xunge/DecIR huggingface dataset:
/* Variables and functions */
int fn_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102(
    char const *);
int fn_al_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102(
    const char *text) {
  int pos = 0;
  pos = fn_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102(
      text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102>:
jmp    1030 <fn_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102(i8* %0) {
%2 = tail call i32 @fn_sq_ch_83_ch_117_ch_98_ch_67_ch_108_ch_97_ch_115_ch_115_ch_79_ch_102(i8* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ ceil(size_t);
size_t MCMEstimateBas64DecodedDataSize(size_t inDataSize) {
  size_t theDecodedDataSize = (int)ceil(inDataSize / 4.0) * 3;
  return (theDecodedDataSize);
}


x86 assembly (clang, -O0):
<MCMEstimateBas64DecodedDataSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movaps 0xedd(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xedc(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
mov    %rdi,%rcx
sar    $0x3f,%rcx
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rdi
call   1030 <ceil@plt>
imul   $0x3,%eax,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MCMEstimateBas64DecodedDataSize>:
push   %rax
movq   %rdi,%xmm0
punpckldq 0xee2(%rip),%xmm0
subpd  0xeea(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xee6(%rip),%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xeda(%rip),%xmm1
cvttsd2si %xmm1,%rdi
and    %rcx,%rdi
or     %rax,%rdi
call   1030 <ceil@plt>
shl    $0x20,%rax
lea    (%rax,%rax,2),%rax
sar    $0x20,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @MCMEstimateBas64DecodedDataSize(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = uitofp i64 %4 to double
%6 = fdiv double %5, 4.000000e+00
%7 = fptoui double %6 to i64
%8 = call i64 @ceil(i64 %7)
%9 = trunc i64 %8 to i32
%10 = mul nsw i32 %9, 3
%11 = sext i32 %10 to i64
store i64 %11, i64* %3
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @MCMEstimateBas64DecodedDataSize(i64 %0) {
%2 = uitofp i64 %0 to double
%3 = fmul double %2, 2.500000e-01
%4 = fptoui double %3 to i64
%5 = tail call i64 @ceil(i64 %4)
%6 = mul i64 %5, 12884901888
%7 = ashr exact i64 %6, 32
ret i64 %7
}
/* Type definitions */
struct tpacket2_hdr {
  int tp_status;
};

/* Variables and functions */
int TP_STATUS_USER;
int __v2_rx_kernel_ready(struct tpacket2_hdr *hdr) {
  return ((hdr->tp_status & TP_STATUS_USER) == TP_STATUS_USER);
}


x86 assembly (clang, -O0):
<__v2_rx_kernel_ready>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ed3(%rip),%rcx
and    (%rcx),%eax
mov    0x2eca(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__v2_rx_kernel_ready>:
mov    (%rdi),%ecx
mov    0x2edf(%rip),%rdx
not    %ecx
xor    %eax,%eax
test   %ecx,(%rdx)
sete   %al
ret

LLVM IR (-O0):
%struct.tpacket2_hdr = type { i32 }
@TP_STATUS_USER = global i32 0
define i32 @__v2_rx_kernel_ready(%struct.tpacket2_hdr* %0) {
%2 = alloca %struct.tpacket2_hdr*
store %struct.tpacket2_hdr* %0, %struct.tpacket2_hdr** %2
%3 = load %struct.tpacket2_hdr*, %struct.tpacket2_hdr** %2
%4 = getelementptr inbounds %struct.tpacket2_hdr, %struct.tpacket2_hdr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = load i32, i32* @TP_STATUS_USER
%7 = and i32 %5, %6
%8 = load i32, i32* @TP_STATUS_USER
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.tpacket2_hdr = type { i32 }
@TP_STATUS_USER = global i32 0
define i32 @__v2_rx_kernel_ready(%struct.tpacket2_hdr* nocapture %0) {
%2 = getelementptr inbounds %struct.tpacket2_hdr, %struct.tpacket2_hdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = load i32, i32* @TP_STATUS_USER
%5 = and i32 %4, %3
%6 = icmp eq i32 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double random();
double getRandom() { return (random() / (double)(RAND_MAX)); }


x86 assembly (clang, -O0):
<getRandom>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random@plt>
mov    0x2ec6(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandom>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
mov    0x2ec9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @getRandom() {
%1 = call double (...) @random()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
ret double %4
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @getRandom() {
%1 = tail call double (...) @random()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
ret double %4
}
/* Type definitions */
struct sb_image_ctx {
  int dummy;
};
struct sb_cmd_list {
  int dummy;
};

/* Variables and functions */
int sb_build_command_jump_call(struct sb_image_ctx *, struct sb_cmd_list *,
                               int /*<<< orphan*/);
int sb_build_command_jump(struct sb_image_ctx *ictx, struct sb_cmd_list *cmd) {
  return sb_build_command_jump_call(ictx, cmd, 0);
}


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

x86 assembly (clang, -O2):
<sb_build_command_jump>:
xor    %edx,%edx
jmp    1030 <sb_build_command_jump_call@plt>

LLVM IR (-O0):
%struct.sb_image_ctx = type { i32 }
%struct.sb_cmd_list = type { i32 }
define i32 @sb_build_command_jump(%struct.sb_image_ctx* %0, %struct.sb_cmd_list* %1) {
%3 = alloca %struct.sb_image_ctx*
%4 = alloca %struct.sb_cmd_list*
store %struct.sb_image_ctx* %0, %struct.sb_image_ctx** %3
store %struct.sb_cmd_list* %1, %struct.sb_cmd_list** %4
%5 = load %struct.sb_image_ctx*, %struct.sb_image_ctx** %3
%6 = load %struct.sb_cmd_list*, %struct.sb_cmd_list** %4
%7 = call i32 @sb_build_command_jump_call(%struct.sb_image_ctx* %5, %struct.sb_cmd_list* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.sb_image_ctx = type { i32 }
%struct.sb_cmd_list = type { i32 }
define i32 @sb_build_command_jump(%struct.sb_image_ctx* %0, %struct.sb_cmd_list* %1) {
%3 = tail call i32 @sb_build_command_jump_call(%struct.sb_image_ctx* %0, %struct.sb_cmd_list* %1, i32 0)
ret i32 %3
}
void FixedDiv1_C() {}


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

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

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

LLVM IR (-O2):
define void @FixedDiv1_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int A, B, SOMA;
  scanf("%d%d", &A, &B);
  SOMA = A + B;
  printf("SOMA = %d\n", SOMA);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [11 x i8] c"SOMA = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  double avg = 0.0;
  double A[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  int i;
#pragma omp parallel for reduction(+ : avg)
  for (i = 0; i < 10; ++i) {
    avg += A[i];
  }
  avg = avg / 10;
  printf("Avg = %lf", avg);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xece(%rip),%rsi
mov    $0x50,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    117f <main+0x5f>
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1153 <main+0x33>
movsd  -0x10(%rbp),%xmm0
movsd  0xe74(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.A = [10 x double] [double 0.000000e+00, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00]
@.str = [10 x i8] c"Avg = %lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [10 x double]
%4 = alloca i32
store i32 0, i32* %1
store double 0.000000e+00, double* %2
%5 = bitcast [10 x double]* %3 to i8*
store i32 0, i32* %4
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 %11
%13 = load double, double* %12
%14 = load double, double* %2
%15 = fadd double %14, %13
store double %15, double* %2
br label %16
16: ; preds = %9
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %6
19: ; preds = %6
%20 = load double, double* %2
%21 = fdiv double %20, 1.000000e+01
store double %21, double* %2
%22 = load double, double* %2
%23 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Avg = %lf\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 4.500000e+00)
ret i32 0
}
void makeData(unsigned *nObsP, unsigned *nDimsP, double **inputsPP,
              double **targetsPP) {
  static unsigned nObs = 4;
  static unsigned nDims = 2;
  static double inputs[] = {0, 0, 1, 1, 2, 2, 3, 3};
  static double targets[] = {0, 1, 2, 3};
  *nObsP = nObs;
  *nDimsP = nDims;
  *inputsPP = inputs;
  *targetsPP = targets;
}


x86 assembly (clang, -O0):
<makeData>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2f16(%rip),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2f0e(%rip),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
lea    0x2f09(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
lea    0x2f3b(%rip),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeData>:
movl   $0x4,(%rdi)
movl   $0x2,(%rsi)
lea    0x2f1d(%rip),%rax
mov    %rax,(%rdx)
lea    0x2f53(%rip),%rax
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
@makeData.nObs = internal global i32 4
@makeData.nDims = internal global i32 2
@makeData.inputs = internal global [8 x double] [double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, double 1.000000e+00, double 2.000000e+00, double 2.000000e+00, double 3.000000e+00, double 3.000000e+00]
@makeData.targets = internal global [4 x double] [double 0.000000e+00, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
define void @makeData(i32* %0, i32* %1, double** %2, double** %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca double**
%8 = alloca double**
store i32* %0, i32** %5
store i32* %1, i32** %6
store double** %2, double*** %7
store double** %3, double*** %8
%9 = load i32, i32* @makeData.nObs
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load i32, i32* @makeData.nDims
%12 = load i32*, i32** %6
store i32 %11, i32* %12
%13 = load double**, double*** %7
store double* getelementptr inbounds ([8 x double], [8 x double]* @makeData.inputs, i64 0, i64 0), double** %13
%14 = load double**, double*** %8
store double* getelementptr inbounds ([4 x double], [4 x double]* @makeData.targets, i64 0, i64 0), double** %14
ret void
}

LLVM IR (-O2):
@makeData.inputs = internal global [8 x double] [double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, double 1.000000e+00, double 2.000000e+00, double 2.000000e+00, double 3.000000e+00, double 3.000000e+00]
@makeData.targets = internal global [4 x double] [double 0.000000e+00, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
define void @makeData(i32* nocapture writeonly %0, i32* nocapture writeonly %1, double** nocapture writeonly %2, double** nocapture writeonly %3) {
store i32 4, i32* %0
store i32 2, i32* %1
store double* getelementptr inbounds ([8 x double], [8 x double]* @makeData.inputs, i64 0, i64 0), double** %2
store double* getelementptr inbounds ([4 x double], [4 x double]* @makeData.targets, i64 0, i64 0), double** %3
ret void
}
void run_all_test() {}


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

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

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

LLVM IR (-O2):
define void @run_all_test() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ gluPerspective(int, double, double, double);
int /*<<< orphan*/ glutPostRedisplay();
void reshape(int w, int h) {
  glViewport(0, 0, w, h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(60, 1.0, 16.0, 2048.0);
  glutPostRedisplay();
}


x86 assembly (clang, -O0):
<reshape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1070 <glViewport@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
mov    $0x3c,%edi
movsd  0xe71(%rip),%xmm0
movsd  0xe71(%rip),%xmm1
movsd  0xe71(%rip),%xmm2
call   1040 <gluPerspective@plt>
mov    $0x0,%al
call   1060 <glutPostRedisplay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reshape>:
push   %rax
mov    %esi,%ecx
mov    %edi,%edx
xor    %edi,%edi
xor    %esi,%esi
call   1070 <glViewport@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
movsd  0xe85(%rip),%xmm0
movsd  0xe85(%rip),%xmm1
movsd  0xe85(%rip),%xmm2
mov    $0x3c,%edi
call   1040 <gluPerspective@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <glutPostRedisplay@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
define void @reshape(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 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* @GL_PROJECTION
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = call i32 @gluPerspective(i32 60, double 1.000000e+00, double 1.600000e+01, double 2.048000e+03)
%12 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
define void @reshape(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = tail call i32 @gluPerspective(i32 60, double 1.000000e+00, double 1.600000e+01, double 2.048000e+03)
%8 = tail call i32 (...) @glutPostRedisplay()
ret void
}
int abs(int n) { return __builtin_abs(n); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    %eax,%ecx
cmp    $0x0,%eax
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 0, %3
%5 = icmp slt i32 %3, 0
%6 = select i1 %5, i32 %4, i32 %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int is_directory(const char *path) {
  int is_dir = 0;
  struct stat st;
  if (stat(path, &st) == 0)
    if (S_ISDIR(st.st_mode))
      is_dir = 1;
  return is_dir;
}


x86 assembly (clang, -O0):
<is_directory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    1168 <is_directory+0x48>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1163 <is_directory+0x43>
movl   $0x1,-0xc(%rbp)
jmp    1168 <is_directory+0x48>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_directory>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <is_directory+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_directory(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.stat
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i64 @S_ISDIR(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %3
br label %14
14: ; preds = %13, %8
br label %15
15: ; preds = %14, %1
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_directory(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ b;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(void) {
  char a[16];
  char b[16];
  char c[16];
  strncpy(a, "0123456789abcdef", sizeof(a));
  strncpy(b, "0123456789abcdef", sizeof(b));
  strcpy(c, a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x10(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
lea    -0x20(%rbp),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
lea    -0x30(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xed2(%rip),%rbx
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
mov    %rsp,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789abcdef\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%7 = call i32 @strncpy(i8* %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%10 = call i32 @strcpy(i8* %8, i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%7 = call i32 @strncpy(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%8 = call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%9 = call i32 @strcpy(i8* %6, i8* %4)
ret i32 0
}
void wifi_evt_sme_scan_result_drop(
    const struct wifi_msg_sme_scan_result_drop_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_scan_result_drop_evt_t = type opaque
define void @wifi_evt_sme_scan_result_drop(%struct.wifi_msg_sme_scan_result_drop_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
void gen_less_than(void) {
  gen_pop();
  gen_call("cclt");
}


x86 assembly (clang, -O0):
<gen_less_than>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xece(%rip),%rdi
call   1040 <gen_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_less_than>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"cclt\00"
define void @gen_less_than() {
%1 = call i32 (...) @gen_pop()
%2 = call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"cclt\00"
define void @gen_less_than() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned short bytes2ushort(char *);
unsigned short packetLen(char *packet) { return 10 + bytes2ushort(&packet[6]); }


x86 assembly (clang, -O0):
<packetLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x6,%rdi
call   1030 <bytes2ushort@plt>
movzwl %ax,%eax
add    $0xa,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<packetLen>:
push   %rax
add    $0x6,%rdi
call   1030 <bytes2ushort@plt>
add    $0xa,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @packetLen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 6
%5 = call zeroext i16 @bytes2ushort(i8* %4)
%6 = zext i16 %5 to i32
%7 = add nsw i32 10, %6
%8 = trunc i32 %7 to i16
ret i16 %8
}

LLVM IR (-O2):
define zeroext i16 @packetLen(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 6
%3 = tail call zeroext i16 @bytes2ushort(i8* %2)
%4 = add i16 %3, 10
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello world!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [13 x i8] c"hello world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int entrypoint(void) { return 0x1234f00d; }


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

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

LLVM IR (-O0):
define i32 @entrypoint() {
ret i32 305459213
}

LLVM IR (-O2):
define i32 @entrypoint() {
ret i32 305459213
}
int compare(void *a, void *b) { return *(int *)a - *(int *)b; }


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

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

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void logging_fini(void) { closelog(); }


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

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

LLVM IR (-O0):
define void @logging_fini() {
%1 = call i32 (...) @closelog()
ret void
}

LLVM IR (-O2):
define void @logging_fini() {
%1 = tail call i32 (...) @closelog()
ret void
}
/* Variables and functions */
int diminuto_ipcl_stream_accept(int);
int diminuto_ipcl_packet_accept(int fd) {
  return diminuto_ipcl_stream_accept(fd);
}


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

x86 assembly (clang, -O2):
<diminuto_ipcl_packet_accept>:
jmp    1030 <diminuto_ipcl_stream_accept@plt>

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

LLVM IR (-O2):
define i32 @diminuto_ipcl_packet_accept(i32 %0) {
%2 = tail call i32 @diminuto_ipcl_stream_accept(i32 %0)
ret i32 %2
}
int test_imm_C7int8_reg(signed char val) {
  return ((val) & (-0xC7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C7int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff39,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_C7int8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -199
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int HelpItem154(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem154() {
ret i32 0
}
unsigned int bswap_32(unsigned int val) {
  return (((val)&0xff000000) >> 24) | (((val)&0x00ff0000) >> 8) |
         (((val)&0x0000ff00) << 8) | (((val)&0x000000ff) << 24);
}


x86 assembly (clang, -O0):
<bswap_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @bswap_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -16777216
%5 = lshr i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 16711680
%8 = lshr i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = shl i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, 255
%16 = shl i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @bswap_32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int strlen(char *);
uint pasm_get_memory_addr(char *arg) {
  while (*arg != 'x')
    arg++;
  arg++;
  arg[strlen(arg) - 1] = 0;
  return atoi(arg);
}


x86 assembly (clang, -O0):
<pasm_get_memory_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x78,%eax
je     114d <pasm_get_memory_addr+0x2d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <pasm_get_memory_addr+0xc>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pasm_get_memory_addr>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x78,(%rbx)
lea    0x1(%rbx),%rbx
jne    1130 <pasm_get_memory_addr+0x10>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <atoi@plt>

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

LLVM IR (-O2):
define i32 @pasm_get_memory_addr(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 120
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = tail call i32 @strlen(i8* %6)
%9 = add nsw i32 %8, -1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %6, i64 %10
store i8 0, i8* %11
%12 = tail call i32 @atoi(i8* %6)
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ isalnum(char);
int separator(char ch) {
  if (!isalnum(ch))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%eax
jne    113c <separator+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <separator+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @separator(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i32 @isalnum(i8 signext %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @separator(i8 signext %0) {
%2 = tail call i32 @isalnum(i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int U_WMRCORE_RECSAFE_get(char const *, int);
int U_WMRSETRELABS_get(const char *contents) {
  return (U_WMRCORE_RECSAFE_get(contents, (6)));
}


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

x86 assembly (clang, -O2):
<U_WMRSETRELABS_get>:
mov    $0x6,%esi
jmp    1030 <U_WMRCORE_RECSAFE_get@plt>

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

LLVM IR (-O2):
define i32 @U_WMRSETRELABS_get(i8* %0) {
%2 = tail call i32 @U_WMRCORE_RECSAFE_get(i8* %0, i32 6)
ret i32 %2
}
void UARTConfigGetExpClk(unsigned long ulBase, unsigned long ulUARTClk,
                         unsigned long *pulBaud, unsigned long *pulConfig) {
  unsigned long ulInt, ulFrac;
  ;
  ulInt = (*((volatile unsigned long *)(ulBase + 0x00000024)));
  ulFrac = (*((volatile unsigned long *)(ulBase + 0x00000028)));
  *pulBaud = (ulUARTClk * 4) / ((64 * ulInt) + ulFrac);
  *pulConfig =
      ((*((volatile unsigned long *)(ulBase + 0x0000002C))) &
       (0x00000080 | 0x00000060 | 0x00000008 | 0x00000004 | 0x00000002));
}


x86 assembly (clang, -O0):
<UARTConfigGetExpClk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
mov    -0x28(%rbp),%rcx
shl    $0x6,%rcx
add    -0x30(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%rcx
and    $0xee,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTConfigGetExpClk>:
mov    %rdx,%r8
mov    %rsi,%rax
mov    0x24(%rdi),%rsi
shl    $0x2,%rax
shl    $0x6,%rsi
add    0x28(%rdi),%rsi
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
je     1129 <UARTConfigGetExpClk+0x29>
xor    %edx,%edx
div    %rsi
jmp    112d <UARTConfigGetExpClk+0x2d>
xor    %edx,%edx
div    %esi
mov    %rax,(%r8)
mov    0x2c(%rdi),%rax
and    $0xee,%eax
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @UARTConfigGetExpClk(i64 %0, i64 %1, i64* %2, i64* %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64*
%8 = alloca i64*
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64* %2, i64** %7
store i64* %3, i64** %8
%11 = load i64, i64* %5
%12 = add i64 %11, 36
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
store i64 %14, i64* %9
%15 = load i64, i64* %5
%16 = add i64 %15, 40
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
store i64 %18, i64* %10
%19 = load i64, i64* %6
%20 = mul i64 %19, 4
%21 = load i64, i64* %9
%22 = mul i64 64, %21
%23 = load i64, i64* %10
%24 = add i64 %22, %23
%25 = udiv i64 %20, %24
%26 = load i64*, i64** %7
store i64 %25, i64* %26
%27 = load i64, i64* %5
%28 = add i64 %27, 44
%29 = inttoptr i64 %28 to i64*
%30 = load volatile i64, i64* %29
%31 = and i64 %30, 238
%32 = load i64*, i64** %8
store i64 %31, i64* %32
ret void
}

LLVM IR (-O2):
define void @UARTConfigGetExpClk(i64 %0, i64 %1, i64* nocapture writeonly %2, i64* nocapture writeonly %3) {
%5 = add i64 %0, 36
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = add i64 %0, 40
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = shl i64 %1, 2
%12 = shl i64 %7, 6
%13 = add i64 %12, %10
%14 = udiv i64 %11, %13
store i64 %14, i64* %2
%15 = add i64 %0, 44
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
%18 = and i64 %17, 238
store i64 %18, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
main() {
  char c = 65;
  switch (c) {
  case 65:
    switch (c++) {
    case 65:
      putchar('A');
      break;
    case 66:
      putchar('B');
      break;
    }
  case 'B':
    putchar('A');
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     1149 <main+0x39>
jmp    1138 <main+0x28>
mov    -0xc(%rbp),%eax
sub    $0x42,%eax
je     1195 <main+0x85>
jmp    119f <main+0x8f>
movsbl -0x5(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    %al,%cl
add    $0x1,%cl
mov    %cl,-0x5(%rbp)
sub    $0x41,%eax
je     1177 <main+0x67>
jmp    1166 <main+0x56>
mov    -0x10(%rbp),%eax
sub    $0x42,%eax
je     1186 <main+0x76>
jmp    1190 <main+0x80>
mov    $0x41,%edi
call   1030 <putchar@plt>
jmp    1190 <main+0x80>
mov    $0x42,%edi
call   1030 <putchar@plt>
jmp    1195 <main+0x85>
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %16 [
i32 65, label %5
i32 66, label %14
]
5: ; preds = %0
%6 = load i8, i8* %2
%7 = add i8 %6, 1
store i8 %7, i8* %2
%8 = sext i8 %6 to i32
switch i32 %8, label %13 [
i32 65, label %9
i32 66, label %11
]
9: ; preds = %5
%10 = call i32 @putchar(i8 signext 65)
br label %13
11: ; preds = %5
%12 = call i32 @putchar(i8 signext 66)
br label %13
13: ; preds = %5, %11, %9
br label %14
14: ; preds = %0, %13
%15 = call i32 @putchar(i8 signext 65)
br label %16
16: ; preds = %0, %14
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i8 signext 65)
%2 = tail call i32 @putchar(i8 signext 65)
ret i32 0
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, unsigned int, int);
int serial_write_byte(int pi, unsigned handle, unsigned val) {
  return pigpio_command(pi, 79, handle, val, 1);
}


x86 assembly (clang, -O0):
<serial_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x4f,%esi
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_write_byte>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x4f,%esi
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

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

LLVM IR (-O2):
define i32 @serial_write_byte(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pigpio_command(i32 %0, i32 79, i32 %1, i32 %2, i32 1)
ret i32 %4
}
void sendto_opmask_butone(struct Client *one, unsigned int mask,
                          const char *pattern, ...) {}


x86 assembly (clang, -O0):
<sendto_opmask_butone>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Client = type opaque
define void @sendto_opmask_butone(%struct.Client* %0, i32 %1, i8* %2, ...) {
%4 = alloca %struct.Client*
%5 = alloca i32
%6 = alloca i8*
store %struct.Client* %0, %struct.Client** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
%struct.Client = type opaque
define void @sendto_opmask_butone(%struct.Client* nocapture %0, i32 %1, i8* nocapture %2, ...) {
ret void
}
void arch_reset_ip_for_sstep(struct pt_regs *regs) {}


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @arch_reset_ip_for_sstep(%struct.pt_regs* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_byte(char);
void PrintChar(char *fmt, char c) {
  print_byte(c);
  return;
}


x86 assembly (clang, -O0):
<PrintChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <print_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintChar>:
mov    %esi,%edi
jmp    1030 <print_byte@plt>

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

LLVM IR (-O2):
define void @PrintChar(i8* nocapture readnone %0, i8 signext %1) {
%3 = tail call i32 @print_byte(i8 signext %1)
ret void
}
void call_main(void (*func)(void)) { func(); }


x86 assembly (clang, -O0):
<call_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_main>:
jmp    *%rdi

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

LLVM IR (-O2):
define void @call_main(void ()* nocapture %0) {
tail call void %0()
ret void
}
smg_noop() {}


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

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

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

LLVM IR (-O2):
define i32 @smg_noop() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnlt_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpnlt_sd(__m128d __a, __m128d __b) {
  return _mm_cmpnlt_sd(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpnlt_sd>:
jmp    1030 <_mm_cmpnlt_sd@plt>

LLVM IR (-O0):
define i32 @test_mm_cmpnlt_sd(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 @_mm_cmpnlt_sd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_cmpnlt_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnlt_sd(i32 %0, i32 %1)
ret i32 %3
}