xunge/DecIR huggingface dataset:
void ADC_escribeCommandRAM() {
  *((volatile unsigned short *)(0x10000000 + 0x00B0)) = 0x20;
  *((volatile unsigned short *)(0x10000000 + 0x00B4)) = 0x8E00;
  *((volatile unsigned short *)(0x10000000 + 0x00B4)) = 0x8E00;
  *((volatile unsigned short *)(0x10000000 + 0x00B4)) = 0x0E00;
}


x86 assembly (clang, -O0):
<ADC_escribeCommandRAM>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100000b0,%eax
movw   $0x20,(%rax)
mov    $0x100000b4,%eax
movw   $0x8e00,(%rax)
mov    $0x100000b4,%eax
movw   $0x8e00,(%rax)
mov    $0x100000b4,%eax
movw   $0xe00,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_escribeCommandRAM>:
movw   $0x20,0x100000b0
movw   $0x8e00,0x100000b4
movw   $0x8e00,0x100000b4
movw   $0xe00,0x100000b4
ret

LLVM IR (-O0):
define void @ADC_escribeCommandRAM() {
store volatile i16 32, i16* inttoptr (i64 268435632 to i16*)
store volatile i16 -29184, i16* inttoptr (i64 268435636 to i16*)
store volatile i16 -29184, i16* inttoptr (i64 268435636 to i16*)
store volatile i16 3584, i16* inttoptr (i64 268435636 to i16*)
ret void
}

LLVM IR (-O2):
define void @ADC_escribeCommandRAM() {
store volatile i16 32, i16* inttoptr (i64 268435632 to i16*)
store volatile i16 -29184, i16* inttoptr (i64 268435636 to i16*)
store volatile i16 -29184, i16* inttoptr (i64 268435636 to i16*)
store volatile i16 3584, i16* inttoptr (i64 268435636 to i16*)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t instruction_operation_extract_register_high(uint16_t instruction) {
  return (instruction >> 0x09) & 0x07;
}


x86 assembly (clang, -O0):
<instruction_operation_extract_register_high>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x9,%eax
and    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<instruction_operation_extract_register_high>:
mov    %edi,%eax
shr    $0x9,%eax
and    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @instruction_operation_extract_register_high(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 9
%5 = and i32 %4, 7
ret i32 %5
}

LLVM IR (-O2):
define i32 @instruction_operation_extract_register_high(i32 %0) {
%2 = lshr i32 %0, 9
%3 = and i32 %2, 7
ret i32 %3
}
int fun(int *a) { return a[0] + a[1] + a[2]; }


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
add    0x4(%rcx),%eax
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
mov    0x4(%rdi),%eax
add    (%rdi),%eax
add    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @fun(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = add nsw i32 %5, %8
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 2
%12 = load i32, i32* %11
%13 = add nsw i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @fun(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = add nsw i32 %4, %2
%6 = getelementptr inbounds i32, i32* %0, i64 2
%7 = load i32, i32* %6
%8 = add nsw i32 %5, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 0; i <= 500; i += 2) {
    printf("%d-", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1f4,-0x8(%rbp)
jg     1150 <main+0x40>
mov    -0x8(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xfffffffe,%ebx
lea    0xee0(%rip),%r14
add    $0x2,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x1f3,%ebx
jb     1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d-\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 2
%5 = icmp ult i32 %2, 499
br i1 %5, label %1, label %6
6: ; preds = %1
ret i32 0
}
int pathconN_nm2_n_in(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @pathconN_nm2_n_in() {
ret i32 1
}

LLVM IR (-O2):
define i32 @pathconN_nm2_n_in() {
ret i32 1
}
char *mote8_Name(void) { return "MOTE8"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"MOTE8\00"
define i8* @mote8_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"MOTE8\00"
define i8* @mote8_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  char c;
  char d;
  int nbits;
  c = -1;
  for (nbits = 1; nbits < 100; nbits++) {
    d = (1 << nbits) - 1;
    if (d == c)
      break;
  }
  if (nbits == 100)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xff,-0x5(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    117c <main+0x5c>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1169 <main+0x49>
jmp    117c <main+0x5c>
jmp    116e <main+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x1a>
cmpl   $0x64,-0xc(%rbp)
jne    118d <main+0x6d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
store i32 0, i32* %1
store i8 -1, i8* %2
store i32 1, i32* %4
br label %5
5: ; preds = %20, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %4
%10 = shl i32 1, %9
%11 = sub nsw i32 %10, 1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %3
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %14, %16
br i1 %17, label %18, label %19
18: ; preds = %8
br label %23
19: ; preds = %8
br label %20
20: ; preds = %19
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %5
23: ; preds = %18, %5
%24 = load i32, i32* %4
%25 = icmp eq i32 %24, 100
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 (...) @abort()
unreachable
28: ; preds = %23
%29 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void handle_error(const char *msg, void *ctx) { fprintf(stderr, "%s\n", msg); }


x86 assembly (clang, -O0):
<handle_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @handle_error(i8* %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_dobldobl_target_solutions_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(255, a, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @copy_dobldobl_target_solutions_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 255, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
float function_f(float y, float z, float mu, float sigma, float r, float d) {
  float f;
  f = (-r) * y - 1 / sigma * (mu - r + d) * z;
  return f;
}


x86 assembly (clang, -O0):
<function_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xebf(%rip),%xmm1
divss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm3
subss  -0x14(%rbp),%xmm3
addss  -0x18(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_f>:
subss  %xmm4,%xmm2
addss  %xmm5,%xmm2
movss  0xef0(%rip),%xmm5
divss  %xmm3,%xmm5
mulss  %xmm2,%xmm5
mulss  %xmm1,%xmm5
mulss  %xmm4,%xmm0
subss  %xmm0,%xmm5
movaps %xmm5,%xmm0
ret

LLVM IR (-O0):
define float @function_f(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%14 = load float, float* %11
%15 = fneg float %14
%16 = load float, float* %7
%17 = load float, float* %10
%18 = fdiv float 1.000000e+00, %17
%19 = load float, float* %9
%20 = load float, float* %11
%21 = fsub float %19, %20
%22 = load float, float* %12
%23 = fadd float %21, %22
%24 = fmul float %18, %23
%25 = load float, float* %8
%26 = fmul float %24, %25
%27 = fneg float %26
%28 = call float @llvm.fmuladd.f32(float %15, float %16, float %27)
store float %28, float* %13
%29 = load float, float* %13
ret float %29
}

LLVM IR (-O2):
define float @function_f(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fneg float %4
%8 = fsub float %2, %4
%9 = fadd float %8, %5
%10 = fdiv float -1.000000e+00, %3
%11 = fmul float %10, %9
%12 = fmul float %11, %1
%13 = tail call float @llvm.fmuladd.f32(float %7, float %0, float %12)
ret float %13
}
void SPUsetVolumeR(unsigned char ch, short vol) {}


x86 assembly (clang, -O0):
<SPUsetVolumeR>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @SPUsetVolumeR(i8 zeroext %0, i16 signext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
ret void
}

LLVM IR (-O2):
define void @SPUsetVolumeR(i8 zeroext %0, i16 signext %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _setjmp(int /*<<< orphan*/);
void f20(void) { _setjmp(0); }


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

x86 assembly (clang, -O2):
<f20>:
push   %rax
xor    %edi,%edi
call   1030 <_setjmp@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @f20() {
%1 = call i32 @_setjmp(i32 0)
ret void
}
void glPixelStorei(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glPixelStorei() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ barrier();
void putc(char c) {
  while (!(((volatile unsigned long *)0x40100000)[5] & 0x20))
    barrier();
  ((volatile unsigned long *)0x40100000)[0] = c;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x40100000,%eax
mov    0x28(%rax),%rax
and    $0x20,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1141 <putc+0x31>
jmp    114d <putc+0x3d>
mov    $0x0,%al
call   1030 <barrier@plt>
jmp    111e <putc+0xe>
movsbq -0x1(%rbp),%rcx
mov    $0x40100000,%eax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbx
mov    %edi,%ebx
testq  $0x20,0x40100028
jne    1145 <putc+0x35>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <barrier@plt>
testq  $0x20,0x40100028
je     1130 <putc+0x20>
movsbq %bl,%rax
mov    %rax,0x40100000
40
pop    %rbx
ret

LLVM IR (-O0):
define void @putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %8, %1
%4 = load volatile i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 1074790400 to i64*), i64 5)
%5 = and i64 %4, 32
%6 = icmp ne i64 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 (...) @barrier()
br label %3
10: ; preds = %3
%11 = load i8, i8* %2
%12 = sext i8 %11 to i64
store volatile i64 %12, i64* inttoptr (i64 1074790400 to i64*)
ret void
}

LLVM IR (-O2):
define void @putc(i8 signext %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074790440 to i64*)
%3 = and i64 %2, 32
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1, %5
%6 = tail call i32 (...) @barrier()
%7 = load volatile i64, i64* inttoptr (i64 1074790440 to i64*)
%8 = and i64 %7, 32
%9 = icmp eq i64 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %1
%11 = sext i8 %0 to i64
store volatile i64 %11, i64* inttoptr (i64 1074790400 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_RADIO_GIO0_INPUT() { clear_io_bit(-3, 5); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RADIO_GIO0_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffd,%edi
mov    $0x5,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RADIO_GIO0_INPUT>:
mov    $0xfffffffd,%edi
mov    $0x5,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RADIO_GIO0_INPUT() {
%1 = call i32 @clear_io_bit(i32 -3, i32 5)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RADIO_GIO0_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 -3, i32 5)
ret void
}
/* Variables and functions */
int vendor_mac_hash(int mac[]) {
  if (mac == NULL) {
    return -1;
  }
  return (mac[0] ^ mac[1] ^ mac[2]) % 61;
}


x86 assembly (clang, -O0):
<vendor_mac_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <vendor_mac_hash+0x1f>
movl   $0xffffffff,-0x4(%rbp)
jmp    113e <vendor_mac_hash+0x3e>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
xor    0x4(%rcx),%eax
mov    -0x10(%rbp),%rcx
xor    0x8(%rcx),%eax
mov    $0x3d,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vendor_mac_hash>:
test   %rdi,%rdi
je     1129 <vendor_mac_hash+0x29>
mov    0x4(%rdi),%eax
xor    (%rdi),%eax
xor    0x8(%rdi),%eax
cltq
imul   $0x4325c53f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x3d,%ecx,%ecx
sub    %ecx,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @vendor_mac_hash(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %20
7: ; preds = %1
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = xor i32 %10, %13
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 2
%17 = load i32, i32* %16
%18 = xor i32 %14, %17
%19 = srem i32 %18, 61
store i32 %19, i32* %2
br label %20
20: ; preds = %7, %6
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @vendor_mac_hash(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = load i32, i32* %0
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = xor i32 %6, %4
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = xor i32 %7, %9
%11 = srem i32 %10, 61
br label %12
12: ; preds = %1, %3
%13 = phi i32 [ %11, %3 ], [ -1, %1 ]
ret i32 %13
}
double hms2sec(unsigned char h, unsigned char m, unsigned char s) {
  return (((h * 60) + m) * 60) + s;
}


x86 assembly (clang, -O0):
<hms2sec>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%eax
imul   $0x3c,%eax,%eax
movzbl -0x2(%rbp),%ecx
add    %ecx,%eax
imul   $0x3c,%eax,%eax
movzbl -0x3(%rbp),%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<hms2sec>:
imul   $0x3c,%edi,%eax
add    %esi,%eax
imul   $0x3c,%eax,%eax
add    %edx,%eax
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @hms2sec(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = mul nsw i32 %8, 60
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = add nsw i32 %9, %11
%13 = mul nsw i32 %12, 60
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = add nsw i32 %13, %15
%17 = sitofp i32 %16 to double
ret double %17
}

LLVM IR (-O2):
define double @hms2sec(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %0 to i32
%5 = mul nuw nsw i32 %4, 60
%6 = zext i8 %1 to i32
%7 = add nuw nsw i32 %5, %6
%8 = mul nuw nsw i32 %7, 60
%9 = zext i8 %2 to i32
%10 = add nuw nsw i32 %8, %9
%11 = sitofp i32 %10 to double
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long, long, double, double, double,
                          double);
void POUT(long N, long J, long K, double X1, double X2, double X3, double X4) {
  printf("%7ld %7ld %7ld %12.4e %12.4e %12.4e %12.4e\n", N, J, K, X1, X2, X3,
         X4);
}


x86 assembly (clang, -O0):
<POUT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<POUT>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [44 x i8] c"%7ld %7ld %7ld %12.4e %12.4e %12.4e %12.4e\0A\00"
define void @POUT(i64 %0, i64 %1, i64 %2, double %3, double %4, double %5, double %6) {
%8 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1, i64 %2, double %3, double %4, double %5, double %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void test(long long x, long long y, long long q, long long r) {
  if ((x / y) != q || (x % y) != r)
    abort();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
cmp    -0x18(%rbp),%rax
jne    1150 <test+0x40>
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
cmp    -0x20(%rbp),%rdx
je     1157 <test+0x47>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    %rdx,%r8
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     112e <test+0x1e>
mov    %rdi,%rax
cqto
idiv   %rsi
cmp    %r8,%rax
je     1139 <test+0x29>
jmp    113f <test+0x2f>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
cmp    %r8,%rax
jne    113f <test+0x2f>
cmp    %rcx,%rdx
jne    113f <test+0x2f>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = sdiv i64 %9, %10
%12 = load i64, i64* %7
%13 = icmp ne i64 %11, %12
br i1 %13, label %20, label %14
14: ; preds = %4
%15 = load i64, i64* %5
%16 = load i64, i64* %6
%17 = srem i64 %15, %16
%18 = load i64, i64* %8
%19 = icmp ne i64 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %14, %4
%21 = call i32 (...) @abort()
unreachable
22: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @test(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = sdiv i64 %0, %1
%6 = srem i64 %0, %1
%7 = icmp eq i64 %5, %2
%8 = icmp eq i64 %6, %3
%9 = and i1 %7, %8
br i1 %9, label %12, label %10
10: ; preds = %4
%11 = tail call i32 (...) @abort()
unreachable
12: ; preds = %4
ret void
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ connection;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int wait_connection(int sock) {
  struct sockaddr_in connection;
  int new_socket;
  socklen_t size;
  size = sizeof(connection);
  new_socket = accept(sock, (struct sockaddr *)&connection, &size);
  return new_socket;
}


x86 assembly (clang, -O0):
<wait_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_connection>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @wait_connection(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %5
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %5)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @wait_connection(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %3)
ret i32 %7
}
add6(a, b, c, d, e, f) { return a + b + c + d + e + f; }


x86 assembly (clang, -O0):
<add6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add6>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
add    %r8d,%eax
add    %r9d,%eax
ret

LLVM IR (-O0):
define i32 @add6(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %9
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %10
%19 = add nsw i32 %17, %18
%20 = load i32, i32* %11
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %12
%23 = add nsw i32 %21, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @add6(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = add nsw i32 %1, %0
%8 = add nsw i32 %7, %2
%9 = add nsw i32 %8, %3
%10 = add nsw i32 %9, %4
%11 = add nsw i32 %10, %5
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ put_ch(int);
int putnchars(int ch, int n) {
  int i = 0;
  for (; i < n; i++)
    put_ch(ch);
  return n;
}


x86 assembly (clang, -O0):
<putnchars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1147 <putnchars+0x37>
mov    -0x4(%rbp),%edi
call   1030 <put_ch@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <putnchars+0x15>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putnchars>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
test   %esi,%esi
jle    112c <putnchars+0x1c>
mov    %edi,%ebp
mov    %r14d,%ebx
mov    %ebp,%edi
call   1030 <put_ch@plt>
add    $0xffffffff,%ebx
jne    1120 <putnchars+0x10>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @putnchars(i32 %0, i32 returned %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @put_ch(i32 %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(char *, int /*<<< orphan*/);
int /*<<< orphan*/ ft_strlen(char *);
void ft_strclr(char *s) { ft_bzero(s, ft_strlen(s)); }


x86 assembly (clang, -O0):
<ft_strclr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <ft_bzero@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <ft_bzero@plt>

LLVM IR (-O0):
define void @ft_strclr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @ft_strlen(i8* %4)
%6 = call i32 @ft_bzero(i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @ft_strclr(i8* %0) {
%2 = tail call i32 @ft_strlen(i8* %0)
%3 = tail call i32 @ft_bzero(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_atomic_assert(int);
int __VERIFIER_nondet_int();
int push(int);
void push_loop() {
  int r = -1;
  int arg = __VERIFIER_nondet_int();
  while (1) {
    r = push(arg);
    __VERIFIER_atomic_assert(r);
  }
}


x86 assembly (clang, -O0):
<push_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <push@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__VERIFIER_atomic_assert@plt>
jmp    1149 <push_loop+0x19>

x86 assembly (clang, -O2):
<push_loop>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1050 <push@plt>
mov    %eax,%edi
call   1030 <__VERIFIER_atomic_assert@plt>
jmp    1140 <push_loop+0x10>

LLVM IR (-O0):
define void @push_loop() {
%1 = alloca i32
%2 = alloca i32
store i32 -1, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
br label %4
4: ; preds = %0, %4
%5 = load i32, i32* %2
%6 = call i32 @push(i32 %5)
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @__VERIFIER_atomic_assert(i32 %7)
br label %4
}

LLVM IR (-O2):
define void @push_loop() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @push(i32 %1)
%4 = tail call i32 @__VERIFIER_atomic_assert(i32 %3)
br label %2
}
unsigned char __inbc(unsigned short port) {
  unsigned char _v;
  __asm__ __volatile__("in"
                       "b"
                       " %"
                       ""
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "id"(port));
  return _v;
}


x86 assembly (clang, -O0):
<__inbc>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inbc>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @__inbc(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @__inbc(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
int fn_a(int x, int y) { return (x + y); }


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

x86 assembly (clang, -O2):
<fn_a>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @fn_a(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fn_a(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t max_u8(uint8_t a, uint8_t b) { return a > b ? a : b; }


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

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

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

LLVM IR (-O2):
define i64 @max_u8(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void wbe32(uint8_t *p, uint32_t v) {
  p[0] = v >> 24;
  p[1] = v >> 16;
  p[2] = v >> 8;
  p[3] = v;
}


x86 assembly (clang, -O0):
<wbe32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<wbe32>:
mov    %esi,%eax
sar    $0x18,%eax
mov    %eax,(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
mov    %eax,0x4(%rdi)
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,0x8(%rdi)
mov    %esi,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @wbe32(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
store i32 %3, i32* %0
%4 = ashr i32 %1, 16
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %4, i32* %5
%6 = ashr i32 %1, 8
%7 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %6, i32* %7
%8 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %1, i32* %8
ret void
}
unsigned invert(unsigned x, int p, int n) {
  unsigned t;
  t = (~(x >> (p + 1 - n)) & ~(~0 << n)) << (p + 1 - n);
  return ((x >> (p + 1)) << p + 1) | t | (x & ~(~0 << (p + 1 - n)));
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shr    %cl,%eax
xor    $0xffffffff,%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
shr    %cl,%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
shl    %cl,%eax
or     -0x10(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    -0x14(%rbp),%ecx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%r9d
lea    0x1(%rsi),%r8d
mov    %r8d,%esi
sub    %edx,%esi
mov    %edi,%eax
mov    %esi,%ecx
shr    %cl,%eax
mov    $0xffffffff,%edx
mov    %r9d,%ecx
shl    %cl,%edx
or     %eax,%edx
not    %edx
mov    %esi,%ecx
shl    %cl,%edx
mov    $0xffffffff,%r9d
mov    %r8d,%ecx
shl    %cl,%r9d
mov    $0xffffffff,%eax
mov    %esi,%ecx
shl    %cl,%eax
not    %eax
or     %r9d,%eax
and    %edi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
%11 = load i32, i32* %6
%12 = sub nsw i32 %10, %11
%13 = lshr i32 %8, %12
%14 = xor i32 %13, -1
%15 = load i32, i32* %6
%16 = shl i32 -1, %15
%17 = xor i32 %16, -1
%18 = and i32 %14, %17
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
%21 = load i32, i32* %6
%22 = sub nsw i32 %20, %21
%23 = shl i32 %18, %22
store i32 %23, i32* %7
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
%27 = lshr i32 %24, %26
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
%30 = shl i32 %27, %29
%31 = load i32, i32* %7
%32 = or i32 %30, %31
%33 = load i32, i32* %4
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
%36 = load i32, i32* %6
%37 = sub nsw i32 %35, %36
%38 = shl i32 -1, %37
%39 = xor i32 %38, -1
%40 = and i32 %33, %39
%41 = or i32 %32, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, 1
%5 = sub nsw i32 %4, %2
%6 = lshr i32 %0, %5
%7 = shl nsw i32 -1, %2
%8 = or i32 %6, %7
%9 = xor i32 %8, -1
%10 = shl i32 %9, %5
%11 = shl nsw i32 -1, %4
%12 = shl nsw i32 -1, %5
%13 = xor i32 %12, -1
%14 = or i32 %11, %13
%15 = and i32 %14, %0
%16 = or i32 %15, %10
ret i32 %16
}
int lower(int c) { return ('A' <= c && c <= 'Z') ? c - 'A' + 'a' : c; }


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x41,%eax
cmp    -0x4(%rbp),%eax
jg     1130 <lower+0x30>
cmpl   $0x5a,-0x4(%rbp)
jg     1130 <lower+0x30>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <lower+0x36>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @lower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 65, %3
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 65
%11 = add nsw i32 %10, 97
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @lower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int obeb(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y;
  scanf("%d%d", &x, &y);
  printf("sonuc: %d\n", obeb(x, y));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <obeb@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
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"sonuc: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @obeb(i32 %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [11 x i8] c"sonuc: %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 = call i32 @obeb(i32 %6, i32 %7)
%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 rand();
void randomScore(int *score) { *score = rand() % 10; }


x86 assembly (clang, -O0):
<randomScore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
mov    %edx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomScore>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @randomScore(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 10
%5 = load i32*, i32** %2
store i32 %4, i32* %5
ret void
}

LLVM IR (-O2):
define void @randomScore(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 10
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void smallAdjustmentGE(unsigned a) {
  if (a + 2 >= 1)
    clang_analyzer_eval(a < (~0U) - 1 || a == (~0U));
  else
    clang_analyzer_eval(a == (~0U) - 1);
}


x86 assembly (clang, -O0):
<smallAdjustmentGE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    $0x1,%eax
jb     1155 <smallAdjustmentGE+0x45>
mov    $0x1,%al
cmpl   $0xfffffffe,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jb     1143 <smallAdjustmentGE+0x33>
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
jmp    1166 <smallAdjustmentGE+0x56>
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @smallAdjustmentGE(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 2
%5 = icmp uge i32 %4, 1
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ult i32 %7, -2
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, -1
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ true, %6 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
br label %21
16: ; preds = %1
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, -2
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
br label %21
21: ; preds = %16, %12
ret void
}

LLVM IR (-O2):
define void @smallAdjustmentGE(i32 %0) {
%2 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char *, struct stat *);
int is_directory(char *dir) {
  struct stat dirStat;
  stat(dir, &dirStat);
  return S_ISDIR(dirStat.st_mode);
}


x86 assembly (clang, -O0):
<is_directory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_directory>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%edi
pop    %rax
jmp    1030 <S_ISDIR@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_directory(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @S_ISDIR(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_directory(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @S_ISDIR(i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ cgincglob(char *, char *, int);
void cgdecgw(char *s) { cgincglob("sub", s, 1); }


x86 assembly (clang, -O0):
<cgdecgw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x1,%edx
call   1030 <cgincglob@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdecgw>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
mov    $0x1,%edx
jmp    1030 <cgincglob@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"sub\00"
define void @cgdecgw(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @cgincglob(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
define void @cgdecgw(i8* %0) {
%2 = tail call i32 @cgincglob(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("User:perrenc\nName:Corwin\nFavorite Color:Dark Neon Green\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c"User:perrenc\0AName:Corwin\0AFavorite Color:Dark Neon Green\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [56 x i8] c"User:perrenc\0AName:Corwin\0AFavorite Color:Dark Neon Green\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
ret i32 0
}