xunge/DecIR huggingface dataset:
unsigned char get_ni(unsigned char sio) { return (sio >> 6) & 0x3; }


x86 assembly (clang, -O0):
<get_ni>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x6,%eax
and    $0x3,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ni>:
mov    %edi,%eax
shr    $0x6,%al
ret

LLVM IR (-O0):
define zeroext i8 @get_ni(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = ashr i32 %4, 6
%6 = and i32 %5, 3
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @get_ni(i8 zeroext %0) {
%2 = lshr i8 %0, 6
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ gfx_set_display_video_yuv_pitch(unsigned long,
                                                   unsigned long);
int gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch) {
  gfx_set_display_video_yuv_pitch(ypitch, uvpitch);
  return (0);
}


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

x86 assembly (clang, -O2):
<gfx_set_video_yuv_pitch>:
push   %rax
call   1030 <gfx_set_display_video_yuv_pitch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gfx_set_video_yuv_pitch(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 = call i32 @gfx_set_display_video_yuv_pitch(i64 %5, i64 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @gfx_set_video_yuv_pitch(i64 %0, i64 %1) {
%3 = tail call i32 @gfx_set_display_video_yuv_pitch(i64 %0, i64 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mb();
extern void __local_outb(unsigned char b, unsigned long addr) {
  *(volatile unsigned int *)((addr << 9) +
                             ((0xfffffc0000000000UL) + 0x1C0000000UL)) = b;
  mb();
}


x86 assembly (clang, -O0):
<__local_outb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%ecx
mov    -0x10(%rbp),%rax
shl    $0x9,%rax
movabs $0xfffffc01c0000000,%rdx
fc ff ff
add    %rdx,%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <mb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__local_outb>:
shl    $0x9,%rsi
movabs $0xfffffc01c0000000,%rax
fc ff ff
mov    %edi,(%rsi,%rax,1)
xor    %eax,%eax
jmp    1030 <mb@plt>

LLVM IR (-O0):
define void @__local_outb(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = shl i64 %7, 9
%9 = add i64 %8, -4390530318336
%10 = inttoptr i64 %9 to i32*
store volatile i32 %6, i32* %10
%11 = call i32 (...) @mb()
ret void
}

LLVM IR (-O2):
define void @__local_outb(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = shl i64 %1, 9
%5 = add i64 %4, -4390530318336
%6 = inttoptr i64 %5 to i32*
store volatile i32 %3, i32* %6
%7 = tail call i32 (...) @mb()
ret void
}
/* Type definitions */
struct type_info {
  int dummy;
};
struct scan_ops {
  int dummy;
};

/* Variables and functions */
int scan_type_fl(struct type_info *, struct scan_ops const *, void *,
                 int /*<<< orphan*/);
int scan_type(struct type_info *ti, const struct scan_ops *sops, void *aux) {
  return scan_type_fl(ti, sops, aux, 0);
}


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

x86 assembly (clang, -O2):
<scan_type>:
xor    %ecx,%ecx
jmp    1030 <scan_type_fl@plt>

LLVM IR (-O0):
%struct.type_info = type { i32 }
%struct.scan_ops = type { i32 }
define i32 @scan_type(%struct.type_info* %0, %struct.scan_ops* %1, i8* %2) {
%4 = alloca %struct.type_info*
%5 = alloca %struct.scan_ops*
%6 = alloca i8*
store %struct.type_info* %0, %struct.type_info** %4
store %struct.scan_ops* %1, %struct.scan_ops** %5
store i8* %2, i8** %6
%7 = load %struct.type_info*, %struct.type_info** %4
%8 = load %struct.scan_ops*, %struct.scan_ops** %5
%9 = load i8*, i8** %6
%10 = call i32 @scan_type_fl(%struct.type_info* %7, %struct.scan_ops* %8, i8* %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.type_info = type { i32 }
%struct.scan_ops = type { i32 }
define i32 @scan_type(%struct.type_info* %0, %struct.scan_ops* %1, i8* %2) {
%4 = tail call i32 @scan_type_fl(%struct.type_info* %0, %struct.scan_ops* %1, i8* %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ main();
void _start() { main(); }


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

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

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

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @main()
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void spanish_UTF_8_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<spanish_UTF_8_close_env>:
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @spanish_UTF_8_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @spanish_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
/* Variables and functions */
float fDiff(float, float);
float fProd(float, float);
float fSum(float, float);
int main(void) {
  float a = 0.3, b = -4.3;
  float sum = fSum(a, b);
  float diff = fDiff(a, b);
  float prod = fProd(a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1040 <fSum@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <fDiff@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1050 <fProd@plt>
movss  %xmm0,-0x18(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xec7(%rip),%xmm0
movss  0xec3(%rip),%xmm1
call   1040 <fSum@plt>
movss  0xeb2(%rip),%xmm0
movss  0xeae(%rip),%xmm1
call   1030 <fDiff@plt>
movss  0xe9d(%rip),%xmm0
movss  0xe99(%rip),%xmm1
call   1050 <fProd@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
store float 0x3FD3333340000000, float* %2
store float 0xC011333340000000, float* %3
%7 = load float, float* %2
%8 = load float, float* %3
%9 = call float @fSum(float %7, float %8)
store float %9, float* %4
%10 = load float, float* %2
%11 = load float, float* %3
%12 = call float @fDiff(float %10, float %11)
store float %12, float* %5
%13 = load float, float* %2
%14 = load float, float* %3
%15 = call float @fProd(float %13, float %14)
store float %15, float* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float @fSum(float 0x3FD3333340000000, float 0xC011333340000000)
%2 = tail call float @fDiff(float 0x3FD3333340000000, float 0xC011333340000000)
%3 = tail call float @fProd(float 0x3FD3333340000000, float 0xC011333340000000)
ret i32 0
}
void foo583(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo583(i32 %0) {
ret void
}
void memory_copy(char **ptr) {
  *ptr = "world";
  ptr = (char *)malloc(sizeof(char) * 6);
  memcpy(ptr, "world", strlen("world"));
  printf("%s \n", *ptr);
}


x86 assembly (clang, -O0):
<memory_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    0xec9(%rip),%rcx
mov    %rcx,(%rax)
mov    $0x6,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xeae(%rip),%ecx
mov    %ecx,(%rax)
mov    0xeaa(%rip),%cl
mov    %cl,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_copy>:
push   %rax
lea    0xed8(%rip),%rax
mov    %rax,(%rdi)
mov    $0x6,%edi
call   1040 <malloc@plt>
movl   $0x6c726f77,(%rax)
movb   $0x64,0x4(%rax)
mov    (%rax),%rsi
lea    0xebd(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"world\00"
@.str.1 = [5 x i8] c"%s \0A\00"
define void @memory_copy(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = call i8* @malloc(i64 6)
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %2
%6 = load i8**, i8*** %2
%7 = bitcast i8** %6 to i8*
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"world\00"
@.str.1 = [5 x i8] c"%s \0A\00"
define void @memory_copy(i8** nocapture writeonly %0) {
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %0
%2 = tail call dereferenceable_or_null(6) i8* @malloc(i64 6)
%3 = bitcast i8* %2 to i8**
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 dereferenceable(5) %2, i8* align 1 dereferenceable(5) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5, i1 false)
%4 = load i8*, i8** %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void debug_mul_u32_u32(uint32_t a, uint32_t b, int a_shift, int b_shift,
                       uint64_t ret) {}


x86 assembly (clang, -O0):
<debug_mul_u32_u32>:
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)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @debug_mul_u32_u32(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret void
}
int sumd(int num) {
  static int sum = 0;
  if (num > 0) {
    sum = sum + (num % 10);
    sumd(num / 10);
  }
  return sum;
}


x86 assembly (clang, -O0):
<sumd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1156 <sumd+0x46>
mov    0x2f01(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%eax
add    %edx,%eax
mov    %eax,0x2ee8(%rip)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <sumd@plt>
mov    0x2ed0(%rip),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumd>:
push   %rax
test   %edi,%edi
jle    1139 <sumd+0x29>
mov    %edi,%ecx
mov    $0xcccccccd,%eax
imul   %rcx,%rax
shr    $0x23,%rax
lea    (%rax,%rax,1),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%edi
add    %edi,0x2efa(%rip)
mov    %eax,%edi
call   1030 <sumd@plt>
mov    0x2eed(%rip),%eax
pop    %rcx
ret

LLVM IR (-O0):
@sumd.sum = internal global i32 0
define i32 @sumd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = load i32, i32* @sumd.sum
%7 = load i32, i32* %2
%8 = srem i32 %7, 10
%9 = add nsw i32 %6, %8
store i32 %9, i32* @sumd.sum
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 10
%12 = call i32 @sumd(i32 %11)
br label %13
13: ; preds = %5, %1
%14 = load i32, i32* @sumd.sum
ret i32 %14
}

LLVM IR (-O2):
@sumd.sum = internal unnamed_addr global i32 0
define i32 @sumd(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1
%4 = load i32, i32* @sumd.sum
%5 = urem i32 %0, 10
%6 = add nsw i32 %4, %5
store i32 %6, i32* @sumd.sum
%7 = udiv i32 %0, 10
%8 = tail call i32 @sumd(i32 %7)
br label %9
9: ; preds = %3, %1
%10 = load i32, i32* @sumd.sum
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ _con_out(char);
int /*<<< orphan*/ par(short);
void pari(short r) {
  _con_out((char)'(');
  par(r);
  _con_out((char)')');
}


x86 assembly (clang, -O0):
<pari>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x28,%edi
call   1030 <_con_out@plt>
movswl -0x2(%rbp),%edi
call   1040 <par@plt>
mov    $0x29,%edi
call   1030 <_con_out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pari>:
push   %rbx
mov    %edi,%ebx
mov    $0x28,%edi
call   1030 <_con_out@plt>
mov    %ebx,%edi
call   1040 <par@plt>
mov    $0x29,%edi
pop    %rbx
jmp    1030 <_con_out@plt>

LLVM IR (-O0):
define void @pari(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @_con_out(i8 signext 40)
%4 = load i16, i16* %2
%5 = call i32 @par(i16 signext %4)
%6 = call i32 @_con_out(i8 signext 41)
ret void
}

LLVM IR (-O2):
define void @pari(i16 signext %0) {
%2 = tail call i32 @_con_out(i8 signext 40)
%3 = tail call i32 @par(i16 signext %0)
%4 = tail call i32 @_con_out(i8 signext 41)
ret void
}
/* Variables and functions */
scalar_t__ system(char *);
int del_bridge(void) {
  system("ip link set "
         "zdtmbr0"
         " down");
  if (system("ip link del "
             "zdtmbr0"))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<del_bridge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <system@plt>
lea    0xeee(%rip),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     1146 <del_bridge+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <del_bridge+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<del_bridge>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xef5(%rip),%rdi
call   1030 <system@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"ip link set zdtmbr0 down\00"
@.str.1 = [20 x i8] c"ip link del zdtmbr0\00"
define i32 @del_bridge() {
%1 = alloca i32
%2 = call i64 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i64 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 -1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [25 x i8] c"ip link set zdtmbr0 down\00"
@.str.1 = [20 x i8] c"ip link del zdtmbr0\00"
define i32 @del_bridge() {
%1 = tail call i64 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef size_t uint32_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, size_t);
int __int8_t_decode_array(const void *_buf, uint32_t offset, uint32_t maxlen,
                          int8_t *p, uint32_t elements) {
  if (maxlen < elements)
    return -1;
  int8_t *buf = (int8_t *)_buf;
  memcpy(p, &buf[offset], elements);
  return elements;
}


x86 assembly (clang, -O0):
<__int8_t_decode_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1146 <__int8_t_decode_array+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <__int8_t_decode_array+0x61>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x30(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x30(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__int8_t_decode_array>:
mov    $0xffffffff,%eax
cmp    %r8,%rdx
jb     1130 <__int8_t_decode_array+0x20>
push   %rbx
mov    %r8,%rbx
lea    (%rdi,%rsi,4),%rsi
mov    %rcx,%rdi
mov    %r8,%rdx
call   1030 <memcpy@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @__int8_t_decode_array(i8* %0, i64 %1, i64 %2, i32* %3, i64 %4) {
%6 = icmp ult i64 %2, %4
br i1 %6, label %12, label %7
7: ; preds = %5
%8 = bitcast i8* %0 to i32*
%9 = getelementptr inbounds i32, i32* %8, i64 %1
%10 = tail call i32 @memcpy(i32* %3, i32* %9, i64 %4)
%11 = trunc i64 %4 to i32
br label %12
12: ; preds = %5, %7
%13 = phi i32 [ %11, %7 ], [ -1, %5 ]
ret i32 %13
}
void NV12ToARGBRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @NV12ToARGBRow_NEON() {
ret void
}
void gtk_toolbar_get_item_index() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toolbar_get_item_index() {
ret void
}
long long foo3(long long x) { return x - 1; }


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

x86 assembly (clang, -O2):
<foo3>:
lea    -0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @foo3(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 %3, 1
ret i64 %4
}

LLVM IR (-O2):
define i64 @foo3(i64 %0) {
%2 = add nsw i64 %0, -1
ret i64 %2
}
void foo_2_1_1_1_1_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_1_1_2_2_2() {
ret void
}
unsigned int performJXX() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @performJXX() {
ret i32 0
}
int need_sh_quote(char c) { return (c == '\'' || c == '!'); }


x86 assembly (clang, -O0):
<need_sh_quote>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x27,%ecx
mov    %al,-0x2(%rbp)
je     1129 <need_sh_quote+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x21,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<need_sh_quote>:
cmp    $0x27,%dil
sete   %al
cmp    $0x21,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @need_sh_quote(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 39
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 33
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @need_sh_quote(i8 signext %0) {
%2 = icmp eq i8 %0, 39
%3 = icmp eq i8 %0, 33
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
int /*<<< orphan*/ stderr;
void error(char *s, char *file, int line) {
  fprintf(stderr, "Error: (%s, %d): %s\n", file, line, s);
  exit(0);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%r8
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Error: (%s, %d): %s\0A\00"
define void @error(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = load i8*, i8** %4
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i8* %10)
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Error: (%s, %d): %s\0A\00"
define void @error(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %0)
%6 = tail call i32 @exit(i32 0)
unreachable
}
int LZ4_sizeofStreamState() {
  return (((1 << (14 - 2)) + 8) * sizeof(unsigned int));
}


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

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

LLVM IR (-O0):
define i32 @LZ4_sizeofStreamState() {
ret i32 16416
}

LLVM IR (-O2):
define i32 @LZ4_sizeofStreamState() {
ret i32 16416
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
void Write4Bytes(FILE *f, int value) {
  int ix;
  for (ix = 0; ix < 4; ix++) {
    fputc(value & 0xff, f);
    value = value >> 8;
  }
}


x86 assembly (clang, -O0):
<Write4Bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1159 <Write4Bytes+0x49>
mov    -0xc(%rbp),%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <Write4Bytes+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write4Bytes>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
movzbl %bl,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
shr    $0x18,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @Write4Bytes(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 = %16, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = call i32 @fputc(i32 %11, i32* %12)
%14 = load i32, i32* %4
%15 = ashr i32 %14, 8
store i32 %15, i32* %4
br label %16
16: ; preds = %9
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @Write4Bytes(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @fputc(i32 %3, i32* %0)
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = tail call i32 @fputc(i32 %6, i32* %0)
%8 = lshr i32 %1, 16
%9 = and i32 %8, 255
%10 = tail call i32 @fputc(i32 %9, i32* %0)
%11 = lshr i32 %1, 24
%12 = tail call i32 @fputc(i32 %11, i32* %0)
ret void
}
/* Variables and functions */
int floor(int /*<<< orphan*/);
int /*<<< orphan*/ sqrt(int);
int is_prime(int n) {
  const int limit = floor(sqrt(n));
  int i;
  for (i = 2; i <= limit; i++) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     117f <is_prime+0x5f>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    116c <is_prime+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1186 <is_prime+0x66>
jmp    1171 <is_prime+0x51>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <is_prime+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
push   %rbx
mov    %edi,%ebx
call   1030 <sqrt@plt>
mov    %eax,%edi
call   1040 <floor@plt>
mov    $0x1,%ecx
cmp    $0x2,%eax
jl     116f <is_prime+0x4f>
mov    %eax,%esi
neg    %esi
mov    $0x2,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%eax
cltd
idiv   %edi
test   %edx,%edx
je     116d <is_prime+0x4d>
lea    (%rsi,%rdi,1),%eax
add    $0x1,%eax
mov    %edi,%edx
add    $0x1,%edx
mov    %edx,%edi
cmp    $0x1,%eax
jne    1150 <is_prime+0x30>
jmp    116f <is_prime+0x4f>
xor    %ecx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
%2 = tail call i32 @sqrt(i32 %0)
%3 = tail call i32 @floor(i32 %2)
%4 = icmp slt i32 %3, 2
br i1 %4, label %12, label %8
5: ; preds = %8
%6 = add nuw i32 %9, 1
%7 = icmp eq i32 %9, %3
br i1 %7, label %12, label %8
8: ; preds = %1, %5
%9 = phi i32 [ %6, %5 ], [ 2, %1 ]
%10 = srem i32 %0, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %8, %5, %1
%13 = phi i32 [ 1, %1 ], [ 1, %5 ], [ 0, %8 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int fileSize(FILE *fp) {
  int sz;
  fseek(fp, 0L, SEEK_END);
  sz = ftell(fp);
  fseek(fp, 0L, SEEK_SET);
  return sz;
}


x86 assembly (clang, -O0):
<fileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e7f(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileSize>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @fileSize(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i64 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i32 @ftell(i32* %7)
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* @SEEK_SET
%11 = call i32 @fseek(i32* %9, i64 0, i32 %10)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @fileSize(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i64 0, i32 %2)
%4 = tail call i32 @ftell(i32* %0)
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %0, i64 0, i32 %5)
ret i32 %4
}
/* Type definitions */
struct rng {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ format_region(struct rng *, int, int);
int /*<<< orphan*/ precision_region(struct rng *, int);
void set_region_format(struct rng *rng, int fmt) {
  int format = (fmt & 0xF0) >> 4;
  int precision = fmt & 0x0F;
  format_region(rng, format, -1);
  precision_region(rng, precision);
}


x86 assembly (clang, -O0):
<set_region_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    $0xffffffff,%edx
call   1030 <format_region@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <precision_region@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_region_format>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
shr    $0x4,%esi
and    $0xf,%esi
and    $0xf,%ebx
mov    $0xffffffff,%edx
call   1030 <format_region@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <precision_region@plt>

LLVM IR (-O0):
%struct.rng = type { i32 }
define void @set_region_format(%struct.rng* %0, i32 %1) {
%3 = alloca %struct.rng*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.rng* %0, %struct.rng** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 240
%9 = ashr i32 %8, 4
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = and i32 %10, 15
store i32 %11, i32* %6
%12 = load %struct.rng*, %struct.rng** %3
%13 = load i32, i32* %5
%14 = call i32 @format_region(%struct.rng* %12, i32 %13, i32 -1)
%15 = load %struct.rng*, %struct.rng** %3
%16 = load i32, i32* %6
%17 = call i32 @precision_region(%struct.rng* %15, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.rng = type { i32 }
define void @set_region_format(%struct.rng* %0, i32 %1) {
%3 = lshr i32 %1, 4
%4 = and i32 %3, 15
%5 = and i32 %1, 15
%6 = tail call i32 @format_region(%struct.rng* %0, i32 %4, i32 -1)
%7 = tail call i32 @precision_region(%struct.rng* %0, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void badalloc(const char *message) {
  write(2, message, strlen(message));
  abort();
}


x86 assembly (clang, -O0):
<badalloc>:
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   1050 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1040 <write@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<badalloc>:
push   %rbx
mov    %rdi,%rbx
call   1050 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @badalloc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @write(i32 2, i8* %3, i32 %5)
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @badalloc(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
%4 = tail call i32 (...) @abort()
unreachable
}
const char *category_to_name(category)
int category;
{
  const char *retval;
  switch (category) {
  case 1729:
    retval = "LC_MESSAGES";
    break;
  default:
    retval = "LC_XXX";
  }
  return retval;
}


x86 assembly (clang, -O0):
<category_to_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x6c1,%eax
jne    112a <category_to_name+0x2a>
jmp    111a <category_to_name+0x1a>
lea    0xedf(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1135 <category_to_name+0x35>
lea    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<category_to_name>:
cmp    $0x6c1,%edi
lea    0xef3(%rip),%rcx
lea    0xef8(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"LC_MESSAGES\00"
@.str.1 = [7 x i8] c"LC_XXX\00"
define i8* @category_to_name(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %6 [
i32 1729, label %5
]
5: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %3
br label %7
6: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [12 x i8] c"LC_MESSAGES\00"
@.str.1 = [7 x i8] c"LC_XXX\00"
define i8* @category_to_name(i32 %0) {
%2 = icmp eq i32 %0, 1729
%3 = select i1 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
long cread_alt(long *xp) {
  long result = 0;
  if (xp)
    result = *xp;
  return result;
}


x86 assembly (clang, -O0):
<cread_alt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1126 <cread_alt+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cread_alt>:
test   %rdi,%rdi
je     1109 <cread_alt+0x9>
mov    (%rdi),%rax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @cread_alt(i64* %0) {
%2 = icmp eq i64* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i64, i64* %0
br label %5
5: ; preds = %3, %1
%6 = phi i64 [ %4, %3 ], [ 0, %1 ]
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ sha256_test();
int main() {
  printf("SHA-256 tests: %s\n", sha256_test() ? "SUCCEEDED" : "FAILEd");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <sha256_test@plt>
mov    %rax,%rcx
lea    0xedd(%rip),%rsi
lea    0xecc(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <sha256_test@plt>
test   %rax,%rax
lea    0xeeb(%rip),%rax
lea    0xeda(%rip),%rsi
cmove  %rax,%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"SHA-256 tests: %s\0A\00"
@.str.1 = [10 x i8] c"SUCCEEDED\00"
@.str.2 = [7 x i8] c"FAILEd\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @sha256_test()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"SHA-256 tests: %s\0A\00"
@.str.1 = [10 x i8] c"SUCCEEDED\00"
@.str.2 = [7 x i8] c"FAILEd\00"
define i32 @main() {
%1 = tail call i64 (...) @sha256_test()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void search_bookings() { printf("Szukanie rezerwacji\n"); }


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"Szukanie rezerwacji\00"
define void @search_bookings() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
void ILibDeleteFileFromDisk(char *FileName) {}


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

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

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

LLVM IR (-O2):
define void @ILibDeleteFileFromDisk(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 0, x = 0;
  for (i = 1; i < 10; ++i) {
    if (i % 2 == 1)
      x += i;
    else
      x--;
    printf("%d", x);
    break;
  }
  printf("\nx = %d", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1178 <main+0x68>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1160 <main+0x50>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1169 <main+0x59>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"\0Ax = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 1, i32* %2
br label %4
4: ; preds = %21, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %24
7: ; preds = %4
%8 = load i32, i32* %2
%9 = srem i32 %8, 2
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
store i32 %14, i32* %3
br label %18
15: ; preds = %7
%16 = load i32, i32* %3
%17 = add nsw i32 %16, -1
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %11
%19 = load i32, i32* %3
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %24
21: ; No predecessors!
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %4
24: ; preds = %18, %4
%25 = load i32, i32* %3
%26 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"\0Ax = %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dbLeaveRoom(char *);
int /*<<< orphan*/ dbSetOffline(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void quit(int sC, char *currentUser) {
  dbSetOffline(currentUser);
  dbLeaveRoom(currentUser);
  memset(currentUser, 0, 33);
  return;
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <dbSetOffline@plt>
mov    -0x10(%rbp),%rdi
call   1050 <dbLeaveRoom@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x21,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quit>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1040 <dbSetOffline@plt>
mov    %rbx,%rdi
call   1050 <dbLeaveRoom@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x21,%edx
pop    %rbx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @quit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @dbSetOffline(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @dbLeaveRoom(i8* %7)
%9 = load i8*, i8** %4
%10 = call i32 @memset(i8* %9, i32 0, i32 33)
ret void
}

LLVM IR (-O2):
define void @quit(i32 %0, i8* %1) {
%3 = tail call i32 @dbSetOffline(i8* %1)
%4 = tail call i32 @dbLeaveRoom(i8* %1)
%5 = tail call i32 @memset(i8* %1, i32 0, i32 33)
ret void
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_Lex_strng_next_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_Lex_strng_next(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_Lex_strng_next_rec(lexbuf, 2);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_Lex_strng_next>:
mov    $0x2,%esi
jmp    1030 <Cyc_Lex_strng_next_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_Lex_strng_next(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_Lex_strng_next_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 2)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_Lex_strng_next(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_Lex_strng_next_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 2)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Circle186(long, long, long, unsigned long, unsigned long);
void circle(long x, long y, long r, unsigned long cfg, unsigned long cbg) {
  Circle186(x, y, r, cfg, cbg);
}


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

x86 assembly (clang, -O2):
<circle>:
jmp    1030 <Circle186@plt>

LLVM IR (-O0):
define void @circle(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = load i64, i64* %9
%15 = load i64, i64* %10
%16 = call i32 @Circle186(i64 %11, i64 %12, i64 %13, i64 %14, i64 %15)
ret void
}

LLVM IR (-O2):
define void @circle(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = tail call i32 @Circle186(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4)
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double microTime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000000.0 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<microTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<microTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @microTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load double, double* %5
%7 = call double @llvm.fmuladd.f64(double %4, double 1.000000e+06, double %6)
ret double %7
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @microTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double 1.000000e+06, double %7)
ret double %8
}