xunge/DecIR huggingface dataset:
void glTexEnvf(int a, int b, int c) {}


x86 assembly (clang, -O0):
<glTexEnvf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @glTexEnvf(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
char *strchr(char *, char);
char *value(char *p) { return ((p = strchr(p, '=')) ? ++p : NULL); }


x86 assembly (clang, -O0):
<value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3d,%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     114d <value+0x3d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
jmp    1158 <value+0x48>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1158 <value+0x48>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<value>:
push   %rax
mov    $0x3d,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @value(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strchr(i8* %3, i8 signext 61)
store i8* %4, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %2
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
%11 = phi i8* [ %8, %6 ], [ null, %9 ]
ret i8* %11
}

LLVM IR (-O2):
define i8* @value(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 61)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
int fun841() { return 841; }


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

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

LLVM IR (-O0):
define i32 @fun841() {
ret i32 841
}

LLVM IR (-O2):
define i32 @fun841() {
ret i32 841
}
void rop3_243_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = ~S;
  stk1 = T | stk2;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_243_0_0>:
not    %sil
or     %dl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_243_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = xor i32 %10, -1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %8
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
%18 = trunc i32 %17 to i8
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = load i8*, i8** %4
store i8 %19, i8* %20
ret void
}

LLVM IR (-O2):
define void @rop3_243_0_0(i8* nocapture writeonly %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = or i8 %4, %2
store i8 %5, i8* %0
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *calloc(size_t nmemb, size_t size) {
  void *buf;
  buf = malloc(nmemb * size);
  if (buf != 0)
    memset(buf, 0, nmemb * size);
  return buf;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1161 <calloc+0x41>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
imul   -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1148 <calloc+0x28>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = mul i64 %6, %7
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = mul i64 %14, %15
%17 = call i32 @memset(i8* %13, i32 0, i64 %16)
br label %18
18: ; preds = %12, %2
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("\033[0;31m Hello what is your name? \n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [35 x i8] c"\1B[0;31m Hello what is your name? \0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [34 x i8] c"\1B[0;31m Hello what is your name? \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void SPI_RP_EnableRxInt(void) {}


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

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

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

LLVM IR (-O2):
define void @SPI_RP_EnableRxInt() {
ret void
}
int test(void) {
  double value, maxValue = -(__extension__((union {
                               unsigned __l __attribute__((__mode__(__DI__)));
                               double __d;
                             }){__l : 0x7ff0000000000000ULL})
                                 .__d);
  int idx, maxIdx = 1;
  for (idx = 1; idx < 22; idx++) {
    if (value > maxValue) {
      maxValue = value;
      maxIdx = idx;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7ff0000000000000,%rax
mov    %rax,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x16,-0x1c(%rbp)
jge    117e <test+0x7e>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    116b <test+0x6b>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1170 <test+0x70>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1141 <test+0x41>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i64 }
define i32 @test() {
%1 = alloca double
%2 = alloca double
%3 = alloca %union.anon
%4 = alloca i32
%5 = alloca i32
%6 = bitcast %union.anon* %3 to i64*
store i64 9218868437227405312, i64* %6
%7 = bitcast %union.anon* %3 to double*
%8 = load double, double* %7
%9 = fneg double %8
store double %9, double* %2
store i32 1, i32* %5
store i32 1, i32* %4
br label %10
10: ; preds = %21, %0
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 22
br i1 %12, label %13, label %24
13: ; preds = %10
%14 = load double, double* %1
%15 = load double, double* %2
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %20
17: ; preds = %13
%18 = load double, double* %1
store double %18, double* %2
%19 = load i32, i32* %4
store i32 %19, i32* %5
br label %20
20: ; preds = %17, %13
br label %21
21: ; preds = %20
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %10
24: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
define i32 @test() {
ret i32 0
}
/* Variables and functions */
int strnlen(char *, int);
void deleteShield(char *str) {
  for (int i = 0; i < strnlen(str, 256) - 1; i++)
    str[i] = str[i + 1];
}


x86 assembly (clang, -O0):
<deleteShield>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x100,%esi
call   1030 <strnlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1170 <deleteShield+0x60>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <deleteShield+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteShield>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x100,%esi
call   1030 <strnlen@plt>
cmp    $0x2,%eax
jl     1159 <deleteShield+0x49>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
lea    0x1(%rax),%rbx
movzbl 0x1(%r14,%rax,1),%ecx
mov    %cl,(%r14,%rax,1)
mov    %r14,%rdi
mov    $0x100,%esi
call   1030 <strnlen@plt>
add    $0xffffffff,%eax
movslq %eax,%rcx
mov    %rbx,%rax
cmp    %rcx,%rbx
jl     1130 <deleteShield+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @deleteShield(i8* %0) {
%2 = tail call i32 @strnlen(i8* %0, i32 256)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %5, label %4
4: ; preds = %5, %1
ret void
5: ; preds = %1, %5
%6 = phi i64 [ %7, %5 ], [ 0, %1 ]
%7 = add nuw nsw i64 %6, 1
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %9, i8* %10
%11 = tail call i32 @strnlen(i8* %0, i32 256)
%12 = add nsw i32 %11, -1
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %7, %13
br i1 %14, label %5, label %4
}
/* Variables and functions */
int atoi(int /*<<< orphan*/);
int /*<<< orphan*/ get_argument_str(char *);
int get_argument_int(char *str) { return (atoi(get_argument_str(str))); }


x86 assembly (clang, -O0):
<get_argument_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_argument_str@plt>
mov    %eax,%edi
call   1040 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_argument_int>:
push   %rax
call   1030 <get_argument_str@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <atoi@plt>

LLVM IR (-O0):
define i32 @get_argument_int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @get_argument_str(i8* %3)
%5 = call i32 @atoi(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_argument_int(i8* %0) {
%2 = tail call i32 @get_argument_str(i8* %0)
%3 = tail call i32 @atoi(i32 %2)
ret i32 %3
}
float _affine_gap_5_1(const int idx_start, const int idx_end) {
  if (idx_start >= idx_end)
    return ((float)0);
  else
    return (((float)5) + ((idx_end - 1) - idx_start));
}


x86 assembly (clang, -O0):
<_affine_gap_5_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1123 <_affine_gap_5_1+0x23>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1141 <_affine_gap_5_1+0x41>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
sub    -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm1
movss  0xec8(%rip),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_affine_gap_5_1>:
cmp    %esi,%edi
jl     1108 <_affine_gap_5_1+0x8>
xorps  %xmm0,%xmm0
ret
not    %edi
add    %esi,%edi
cvtsi2ss %edi,%xmm0
addss  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @_affine_gap_5_1(i32 %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp sge i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store float 0.000000e+00, float* %3
br label %17
10: ; preds = %2
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = sitofp i32 %14 to float
%16 = fadd float 5.000000e+00, %15
store float %16, float* %3
br label %17
17: ; preds = %10, %9
%18 = load float, float* %3
ret float %18
}

LLVM IR (-O2):
define float @_affine_gap_5_1(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = xor i32 %0, -1
%5 = add i32 %4, %1
%6 = sitofp i32 %5 to float
%7 = fadd float %6, 5.000000e+00
%8 = select i1 %3, float %7, float 0.000000e+00
ret float %8
}
_Bool audio_close(void *handle) {
  stopRecording();
  return 1;
}


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

x86 assembly (clang, -O2):
<audio_close>:
push   %rax
xor    %eax,%eax
call   1030 <stopRecording@plt>
mov    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i1 @audio_close(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @stopRecording()
ret i1 true
}

LLVM IR (-O2):
define zeroext i1 @audio_close(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @stopRecording()
ret i1 true
}
unsigned char explicit_signed_int_to_unsigned_char(signed int src) {
  return (unsigned char)src;
}


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

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

LLVM IR (-O0):
define zeroext i8 @explicit_signed_int_to_unsigned_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @explicit_signed_int_to_unsigned_char(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
int fun696() { return 696; }


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

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

LLVM IR (-O0):
define i32 @fun696() {
ret i32 696
}

LLVM IR (-O2):
define i32 @fun696() {
ret i32 696
}
/* Variables and functions */
void *safe_strdup(char const *);
void *safe_strdup_or_null(const char *s) {
  if (s == NULL)
    return NULL;
  return safe_strdup(s);
}


x86 assembly (clang, -O0):
<safe_strdup_or_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <safe_strdup_or_null+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1141 <safe_strdup_or_null+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <safe_strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strdup_or_null>:
test   %rdi,%rdi
je     111a <safe_strdup_or_null+0xa>
jmp    1030 <safe_strdup@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @safe_strdup_or_null(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @safe_strdup(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  for (int i = 32; i < 127; i++)
    printf("%3d = %c\n", i, i);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jge    1152 <main+0x42>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x20,%ebx
lea    0xed0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x7f,%ebx
jne    1130 <main+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%3d = %c\0A\00"
define i32 @main() {
br label %3
1: ; preds = %3
%2 = tail call i32 @putchar(i32 10)
ret i32 0
3: ; preds = %0, %3
%4 = phi i32 [ 32, %0 ], [ %6, %3 ]
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 127
br i1 %7, label %1, label %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t gffi_get_int_32_swapped(int8_t *location, int offset) {
  int8_t buf[4];
  buf[3] = location[offset];
  buf[2] = location[offset + 1];
  buf[1] = location[offset + 2];
  buf[0] = location[offset + 3];
  return *(int32_t *)buf;
}


x86 assembly (clang, -O0):
<gffi_get_int_32_swapped>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gffi_get_int_32_swapped>:
movslq %esi,%rax
mov    0xc(%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @gffi_get_int_32_swapped(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [4 x i32]
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = load i32, i32* %9
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 3
store i32 %10, i32* %11
%12 = load i32*, i32** %3
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %12, i64 %15
%17 = load i32, i32* %16
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 2
store i32 %17, i32* %18
%19 = load i32*, i32** %3
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 2
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %19, i64 %22
%24 = load i32, i32* %23
%25 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 1
store i32 %24, i32* %25
%26 = load i32*, i32** %3
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %26, i64 %29
%31 = load i32, i32* %30
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
store i32 %31, i32* %32
%33 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%34 = load i32, i32* %33
ret i32 %34
}

LLVM IR (-O2):
define i32 @gffi_get_int_32_swapped(i32* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 3
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
double min(double new, double old) {
  if (new < old) {
    return new;
  }
  return old;
}


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

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

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

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void z_freec(char *c_str) {
  free(c_str);
  c_str = NULL;
}


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

x86 assembly (clang, -O2):
<z_freec>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @z_freec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
store i8* null, i8** %2
ret void
}

LLVM IR (-O2):
define void @z_freec(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
short h_dim(short *, short *);
short intr_wrap_172(short p1, short p2) { return h_dim(&p1, &p2); }


x86 assembly (clang, -O0):
<intr_wrap_172>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
lea    -0x2(%rbp),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <h_dim@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_172>:
push   %rax
mov    %di,0x6(%rsp)
mov    %si,0x4(%rsp)
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1030 <h_dim@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_172(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @h_dim(i16* %3, i16* %4)
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @intr_wrap_172(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @h_dim(i16* %3, i16* %4)
ret i16 %5
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
clock_t __times(struct tms *buffer) {
  if (buffer == NULL) {
    __set_errno(EINVAL);
    return (clock_t)-1;
  }
  __set_errno(ENOSYS);
  return (clock_t)-1;
}


x86 assembly (clang, -O0):
<__times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1141 <__times+0x31>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <__times+0x46>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__times>:
push   %rax
test   %rdi,%rdi
jne    111f <__times+0xf>
mov    0x2ebb(%rip),%rax
jmp    1126 <__times+0x16>
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
@EINVAL = global i32 0
@ENOSYS = global i32 0
define i32 @__times(%struct.tms* %0) {
%2 = alloca i32
%3 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %3
%4 = load %struct.tms*, %struct.tms** %3
%5 = icmp eq %struct.tms* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EINVAL
%8 = call i32 @__set_errno(i32 %7)
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* @ENOSYS
%11 = call i32 @__set_errno(i32 %10)
store i32 -1, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.tms = type { i32 }
@EINVAL = global i32 0
@ENOSYS = global i32 0
define i32 @__times(%struct.tms* readnone %0) {
%2 = icmp eq %struct.tms* %0, null
%3 = load i32, i32* @EINVAL
%4 = load i32, i32* @ENOSYS
%5 = select i1 %2, i32 %3, i32 %4
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int kr02_mergebits(int);
int kr02_whitening(int);
uint64_t ApplyIndexFunc(uint64_t start_index, int bits) {
  uint64_t w = kr02_whitening(start_index);
  start_index = kr02_mergebits((w << bits) | start_index);
  return start_index;
}


x86 assembly (clang, -O0):
<ApplyIndexFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <kr02_whitening@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%ecx
shl    %cl,%edi
or     -0x4(%rbp),%edi
call   1030 <kr02_mergebits@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ApplyIndexFunc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <kr02_whitening@plt>
mov    %ebx,%ecx
shl    %cl,%eax
or     %eax,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <kr02_mergebits@plt>

LLVM IR (-O0):
define i32 @ApplyIndexFunc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @kr02_whitening(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = shl i32 %8, %9
%11 = load i32, i32* %3
%12 = or i32 %10, %11
%13 = call i32 @kr02_mergebits(i32 %12)
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @ApplyIndexFunc(i32 %0, i32 %1) {
%3 = tail call i32 @kr02_whitening(i32 %0)
%4 = shl i32 %3, %1
%5 = or i32 %4, %0
%6 = tail call i32 @kr02_mergebits(i32 %5)
ret i32 %6
}
/* Variables and functions */
int io_inportb(int);
int /*<<< orphan*/ io_outportb(int, int);
void io_cursor_enable(unsigned char start, unsigned char end) {
  io_outportb(0x3D4, 0x0A);
  io_outportb(0x3D5, (io_inportb(0x3D5) & 0xC0) | start);
  io_outportb(0x3D4, 0x0B);
  io_outportb(0x3D5, (io_inportb(0x3D5) & 0xE0) | end);
}


x86 assembly (clang, -O0):
<io_cursor_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x3d4,%edi
mov    $0xa,%esi
call   1040 <io_outportb@plt>
mov    $0x3d5,%edi
call   1030 <io_inportb@plt>
mov    %eax,%esi
and    $0xc0,%esi
movzbl -0x1(%rbp),%eax
or     %eax,%esi
mov    $0x3d5,%edi
call   1040 <io_outportb@plt>
mov    $0x3d4,%edi
mov    $0xb,%esi
call   1040 <io_outportb@plt>
mov    $0x3d5,%edi
call   1030 <io_inportb@plt>
mov    %eax,%esi
and    $0xe0,%esi
movzbl -0x2(%rbp),%eax
or     %eax,%esi
mov    $0x3d5,%edi
call   1040 <io_outportb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_cursor_enable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x3d4,%edi
mov    $0xa,%esi
call   1040 <io_outportb@plt>
mov    $0x3d5,%edi
call   1030 <io_inportb@plt>
and    $0xc0,%eax
or     %eax,%ebp
mov    $0x3d5,%edi
mov    %ebp,%esi
call   1040 <io_outportb@plt>
mov    $0x3d4,%edi
mov    $0xb,%esi
call   1040 <io_outportb@plt>
mov    $0x3d5,%edi
call   1030 <io_inportb@plt>
and    $0xe0,%eax
or     %eax,%ebx
mov    $0x3d5,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <io_outportb@plt>

LLVM IR (-O0):
define void @io_cursor_enable(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 @io_outportb(i32 980, i32 10)
%6 = call i32 @io_inportb(i32 981)
%7 = and i32 %6, 192
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = or i32 %7, %9
%11 = call i32 @io_outportb(i32 981, i32 %10)
%12 = call i32 @io_outportb(i32 980, i32 11)
%13 = call i32 @io_inportb(i32 981)
%14 = and i32 %13, 224
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
%18 = call i32 @io_outportb(i32 981, i32 %17)
ret void
}

LLVM IR (-O2):
define void @io_cursor_enable(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @io_outportb(i32 980, i32 10)
%4 = tail call i32 @io_inportb(i32 981)
%5 = and i32 %4, 192
%6 = zext i8 %0 to i32
%7 = or i32 %5, %6
%8 = tail call i32 @io_outportb(i32 981, i32 %7)
%9 = tail call i32 @io_outportb(i32 980, i32 11)
%10 = tail call i32 @io_inportb(i32 981)
%11 = and i32 %10, 224
%12 = zext i8 %1 to i32
%13 = or i32 %11, %12
%14 = tail call i32 @io_outportb(i32 981, i32 %13)
ret void
}
void __attribute__((no)) foo3(int *a) {
  int i;
  for (i = 0; i < 100; i++) {
    a[i] = 0;
    a[i + 1] = -1;
    a[i + 3] = -2;
  }
}


x86 assembly (clang, -O0):
<foo3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    115e <foo3+0x5e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movl   $0xfffffffe,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <foo3+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo3>:
mov    $0x4,%eax
movaps 0xef4(%rip),%xmm0
nopl   0x0(%rax)
movups %xmm0,-0x10(%rdi,%rax,4)
movl   $0xfffffffe,(%rdi,%rax,4)
add    $0x2,%rax
cmp    $0x68,%rax
jne    1110 <foo3+0x10>
ret

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

LLVM IR (-O2):
define void @foo3(i32* nocapture writeonly %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %10, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
store i32 0, i32* %4
%5 = or i64 %3, 1
%6 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 -1, i32* %6
%7 = add nuw nsw i64 %3, 3
%8 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 -2, i32* %8
%9 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 0, i32* %9
%10 = add nuw nsw i64 %3, 2
%11 = getelementptr inbounds i32, i32* %0, i64 %10
store i32 -1, i32* %11
%12 = add nuw i64 %3, 4
%13 = getelementptr inbounds i32, i32* %0, i64 %12
store i32 -2, i32* %13
%14 = icmp eq i64 %10, 100
br i1 %14, label %15, label %2
15: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IsCommandSeparator(char);
scalar_t__ NotEoln(char);
int NotDwEoln(char c) { return NotEoln(c) && !IsCommandSeparator(c); }


x86 assembly (clang, -O0):
<NotDwEoln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <NotEoln@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
je     115d <NotDwEoln+0x3d>
movsbl -0x1(%rbp),%edi
call   1030 <IsCommandSeparator@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NotDwEoln>:
push   %rbx
mov    %edi,%ebx
call   1040 <NotEoln@plt>
test   %rax,%rax
je     1140 <NotDwEoln+0x20>
movsbl %bl,%edi
call   1030 <IsCommandSeparator@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @NotDwEoln(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @NotEoln(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32 @IsCommandSeparator(i8 signext %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @NotDwEoln(i8 signext %0) {
%2 = tail call i64 @NotEoln(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @IsCommandSeparator(i8 signext %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ SetScl(int);
int /*<<< orphan*/ SetSda(int);
void StopCond(void) {
  SetSda(0);
  SetScl(1);
  SetSda(1);
}


x86 assembly (clang, -O0):
<StopCond>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <SetSda@plt>
mov    $0x1,%edi
call   1040 <SetScl@plt>
mov    $0x1,%edi
call   1030 <SetSda@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StopCond>:
push   %rax
xor    %edi,%edi
call   1030 <SetSda@plt>
mov    $0x1,%edi
call   1040 <SetScl@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <SetSda@plt>

LLVM IR (-O0):
define void @StopCond() {
%1 = call i32 @SetSda(i32 0)
%2 = call i32 @SetScl(i32 1)
%3 = call i32 @SetSda(i32 1)
ret void
}

LLVM IR (-O2):
define void @StopCond() {
%1 = tail call i32 @SetSda(i32 0)
%2 = tail call i32 @SetScl(i32 1)
%3 = tail call i32 @SetSda(i32 1)
ret void
}
/* Type definitions */
struct edge {
  int dummy;
};

/* Variables and functions */
int edge_cmp(struct edge const *, struct edge const *);
int edge_cmp_v(const void *a, const void *b) {
  return edge_cmp((const struct edge *)a, (const struct edge *)b);
}


x86 assembly (clang, -O0):
<edge_cmp_v>:
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 <edge_cmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<edge_cmp_v>:
jmp    1030 <edge_cmp@plt>

LLVM IR (-O0):
%struct.edge = type { i32 }
define i32 @edge_cmp_v(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.edge*
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to %struct.edge*
%9 = call i32 @edge_cmp(%struct.edge* %6, %struct.edge* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.edge = type { i32 }
define i32 @edge_cmp_v(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to %struct.edge*
%4 = bitcast i8* %1 to %struct.edge*
%5 = tail call i32 @edge_cmp(%struct.edge* %3, %struct.edge* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ lapic_set(int, int);
int /*<<< orphan*/ sched_tick(int /*<<< orphan*/);
void sched_yield(void) {
  lapic_set(0x0080, 128);
  sched_tick(0);
}


x86 assembly (clang, -O0):
<sched_yield>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%esi
mov    %esi,%edi
call   1030 <lapic_set@plt>
xor    %edi,%edi
call   1040 <sched_tick@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sched_yield>:
push   %rax
mov    $0x80,%edi
mov    $0x80,%esi
call   1030 <lapic_set@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <sched_tick@plt>

LLVM IR (-O0):
define void @sched_yield() {
%1 = call i32 @lapic_set(i32 128, i32 128)
%2 = call i32 @sched_tick(i32 0)
ret void
}

LLVM IR (-O2):
define void @sched_yield() {
%1 = tail call i32 @lapic_set(i32 128, i32 128)
%2 = tail call i32 @sched_tick(i32 0)
ret void
}
void f12(register int i, ...) {
  __builtin_va_list ap;
  __builtin_va_start(ap, i);
  __builtin_va_end(ap);
}


x86 assembly (clang, -O0):
<f12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
test   %al,%al
je     1136 <f12+0x36>
movaps %xmm0,-0xa0(%rbp)
movaps %xmm1,-0x90(%rbp)
movaps %xmm2,-0x80(%rbp)
movaps %xmm3,-0x70(%rbp)
movaps %xmm4,-0x60(%rbp)
movaps %xmm5,-0x50(%rbp)
movaps %xmm6,-0x40(%rbp)
movaps %xmm7,-0x30(%rbp)
mov    %r9,-0xa8(%rbp)
mov    %r8,-0xb0(%rbp)
mov    %rcx,-0xb8(%rbp)
mov    %rdx,-0xc0(%rbp)
mov    %rsi,-0xc8(%rbp)
mov    %edi,-0x4(%rbp)
lea    -0xd0(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x30,-0x1c(%rbp)
movl   $0x8,-0x20(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define void @f12(i32 %0, ...) {
%2 = alloca i32
%3 = alloca [1 x %struct.__va_list_tag]
store i32 %0, i32* %2
%4 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%5 = bitcast %struct.__va_list_tag* %4 to i8*
%6 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%7 = bitcast %struct.__va_list_tag* %6 to i8*
ret void
}

LLVM IR (-O2):
define void @f12(i32 %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void read_data(int *A, int n) {
  int i;
  for (i = 0; i < n; ++i)
    scanf("%d", A + i);
}


x86 assembly (clang, -O0):
<read_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <read_data+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <read_data+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_data>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <read_data+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <read_data+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @read_data(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 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %14)
br label %16
16: ; preds = %10
%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):
@.str = [3 x i8] c"%d\00"
define void @read_data(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void error(char *error_code) {
  perror(error_code);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct strbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strbuf_add(struct strbuf *, char const *,
                              int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void strbuf_addstr(struct strbuf *sb, const char *s) {
  strbuf_add(sb, s, strlen(s));
}


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

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

LLVM IR (-O0):
%struct.strbuf = type { i32 }
define void @strbuf_addstr(%struct.strbuf* %0, i8* %1) {
%3 = alloca %struct.strbuf*
%4 = alloca i8*
store %struct.strbuf* %0, %struct.strbuf** %3
store i8* %1, i8** %4
%5 = load %struct.strbuf*, %struct.strbuf** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @strbuf_add(%struct.strbuf* %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.strbuf = type { i32 }
define void @strbuf_addstr(%struct.strbuf* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strbuf_add(%struct.strbuf* %0, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Dorado9211WriteReg(int, int);
void Dorado_Power_Down(void) {
  Dorado9211WriteReg(0x00000400 + 0x08, 0x0);
  return;
}


x86 assembly (clang, -O0):
<Dorado_Power_Down>:
push   %rbp
mov    %rsp,%rbp
mov    $0x408,%edi
xor    %esi,%esi
call   1030 <Dorado9211WriteReg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dorado_Power_Down>:
mov    $0x408,%edi
xor    %esi,%esi
jmp    1030 <Dorado9211WriteReg@plt>

LLVM IR (-O0):
define void @Dorado_Power_Down() {
%1 = call i32 @Dorado9211WriteReg(i32 1032, i32 0)
ret void
}

LLVM IR (-O2):
define void @Dorado_Power_Down() {
%1 = tail call i32 @Dorado9211WriteReg(i32 1032, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ write_error();
void write_divider(void) {
  if (fputs("---\n", stdout) == EOF) {
    write_error();
  }
}


x86 assembly (clang, -O0):
<write_divider>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%rax
jne    1150 <write_divider+0x30>
mov    $0x0,%al
call   1040 <write_error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_divider>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
jne    114a <write_divider+0x2a>
xor    %eax,%eax
pop    %rcx
jmp    1040 <write_error@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"---\0A\00"
@stdout = global i32 0
@EOF = global i64 0
define void @write_divider() {
%1 = load i32, i32* @stdout
%2 = call i64 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i64, i64* @EOF
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @write_error()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"---\0A\00"
@stdout = global i32 0
@EOF = global i64 0
define void @write_divider() {
%1 = load i32, i32* @stdout
%2 = tail call i64 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i64, i64* @EOF
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 (...) @write_error()
br label %7
7: ; preds = %5, %0
ret void
}
void ff_hevc_put_hevc_bi_qpel_hv12_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv12_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void new_line(void) { putchar('\n'); }


x86 assembly (clang, -O0):
<new_line>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_line>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @new_line() {
%1 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @new_line() {
%1 = tail call i32 @putchar(i8 signext 10)
ret void
}