xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ RegReadA(int, unsigned char *);
void StmvFinClAf(void) {
  unsigned char UcRegDat;
  RegReadA(0x01E1, &UcRegDat);
  while (UcRegDat & 0x01) {
    RegReadA(0x01E1, &UcRegDat);
  }
}


x86 assembly (clang, -O0):
<StmvFinClAf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1e1,%edi
lea    -0x1(%rbp),%rsi
call   1030 <RegReadA@plt>
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1149 <StmvFinClAf+0x39>
mov    $0x1e1,%edi
lea    -0x1(%rbp),%rsi
call   1030 <RegReadA@plt>
jmp    1126 <StmvFinClAf+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StmvFinClAf>:
push   %rbx
sub    $0x10,%rsp
lea    0xf(%rsp),%rsi
mov    $0x1e1,%edi
call   1030 <RegReadA@plt>
testb  $0x1,0xf(%rsp)
je     1144 <StmvFinClAf+0x34>
lea    0xf(%rsp),%rbx
mov    $0x1e1,%edi
mov    %rbx,%rsi
call   1030 <RegReadA@plt>
testb  $0x1,0xf(%rsp)
jne    1130 <StmvFinClAf+0x20>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @StmvFinClAf() {
%1 = alloca i8
%2 = call i32 @RegReadA(i32 481, i8* %1)
br label %3
3: ; preds = %8, %0
%4 = load i8, i8* %1
%5 = zext i8 %4 to i32
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 @RegReadA(i32 481, i8* %1)
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @StmvFinClAf() {
%1 = alloca i8
%2 = call i32 @RegReadA(i32 481, i8* %1)
%3 = load i8, i8* %1
%4 = and i8 %3, 1
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %0, %6
%7 = call i32 @RegReadA(i32 481, i8* %1)
%8 = load i8, i8* %1
%9 = and i8 %8, 1
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %0
ret void
}
/* Type definitions */
struct ipv6_opt_hdr {
  int hdrlen;
};

/* Variables and functions */
int ipv6_optlen(struct ipv6_opt_hdr *opthdr) {
  return (opthdr->hdrlen + 1) << 3;
}


x86 assembly (clang, -O0):
<ipv6_optlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
shl    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_optlen>:
mov    (%rdi),%eax
lea    0x8(,%rax,8),%eax
ret

LLVM IR (-O0):
%struct.ipv6_opt_hdr = type { i32 }
define i32 @ipv6_optlen(%struct.ipv6_opt_hdr* %0) {
%2 = alloca %struct.ipv6_opt_hdr*
store %struct.ipv6_opt_hdr* %0, %struct.ipv6_opt_hdr** %2
%3 = load %struct.ipv6_opt_hdr*, %struct.ipv6_opt_hdr** %2
%4 = getelementptr inbounds %struct.ipv6_opt_hdr, %struct.ipv6_opt_hdr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
%7 = shl i32 %6, 3
ret i32 %7
}

LLVM IR (-O2):
%struct.ipv6_opt_hdr = type { i32 }
define i32 @ipv6_optlen(%struct.ipv6_opt_hdr* nocapture %0) {
%2 = getelementptr inbounds %struct.ipv6_opt_hdr, %struct.ipv6_opt_hdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = shl i32 %3, 3
%5 = add i32 %4, 8
ret i32 %5
}
/* Variables and functions */
scalar_t__ CallBack3(int, void *, void *, void *);
int StoreNumericDataUsingVarName(const char *varName, double realPart,
                                 double imagPart) {
  return (int)CallBack3(191, (void *)varName, (void *)&realPart,
                        (void *)&imagPart);
}


x86 assembly (clang, -O0):
<StoreNumericDataUsingVarName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rcx
mov    $0xbf,%edi
call   1030 <CallBack3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StoreNumericDataUsingVarName>:
sub    $0x18,%rsp
mov    %rdi,%rsi
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    $0xbf,%edi
call   1030 <CallBack3@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @StoreNumericDataUsingVarName(i8* %0, double %1, double %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %4
store double %1, double* %5
store double %2, double* %6
%7 = load i8*, i8** %4
%8 = bitcast double* %5 to i8*
%9 = bitcast double* %6 to i8*
%10 = call i64 @CallBack3(i32 191, i8* %7, i8* %8, i8* %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @StoreNumericDataUsingVarName(i8* %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
store double %1, double* %4
store double %2, double* %5
%6 = bitcast double* %4 to i8*
%7 = bitcast double* %5 to i8*
%8 = call i64 @CallBack3(i32 191, i8* %0, i8* %6, i8* %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}
int test_imm_2Aint8_mem(signed char *val) {
  return ((*val) & (0x2A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Aint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x2a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Aint8_mem>:
testb  $0x2a,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Aint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 42
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ getsplitline(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char line[1000000];
  while (getsplitline(line) > 0) {
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4250,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xf4250(%rbp),%rdi
call   1040 <getsplitline@plt>
cmp    $0x0,%rax
jle    1167 <main+0x47>
lea    -0xf4250(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0xf4250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xf4248,%rsp
mov    %rsp,%rdi
call   1040 <getsplitline@plt>
test   %rax,%rax
jle    1168 <main+0x48>
lea    0xec2(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <getsplitline@plt>
test   %rax,%rax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0xf4248,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000000 x i8]
%4 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 0
%5 = call i64 @getsplitline(i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2, %7
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%9 = call i64 @getsplitline(i8* %4)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, char *);
void pr_CC(FILE *fp, bool CC) {
  fprintf(fp, "CC=%d:Cross-link capability:%s\n", CC,
          CC ? "Supported by transpoder" : "Not supported by transponder");
}


x86 assembly (clang, -O0):
<pr_CC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0xc(%rbp),%esi
lea    0xf08(%rip),%rcx
lea    0xee9(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%rcx
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_CC>:
mov    %esi,%edx
test   %esi,%esi
lea    0xf1d(%rip),%rax
lea    0xefe(%rip),%rcx
cmove  %rax,%rcx
lea    0xed3(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"CC=%d:Cross-link capability:%s\0A\00"
@.str.1 = [24 x i8] c"Supported by transpoder\00"
@.str.2 = [29 x i8] c"Not supported by transponder\00"
define void @pr_CC(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0)
%11 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"CC=%d:Cross-link capability:%s\0A\00"
@.str.1 = [24 x i8] c"Supported by transpoder\00"
@.str.2 = [29 x i8] c"Not supported by transponder\00"
define void @pr_CC(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %4)
ret void
}
/* Variables and functions */
scalar_t__ arc4random();
double doWhiteNoise() {
  float fNoise = 0.0;
  fNoise = (float)arc4random();
  fNoise = 2.0 * (fNoise / 4294967295) - 1.0;
  return fNoise;
}


x86 assembly (clang, -O0):
<doWhiteNoise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <arc4random@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeca(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm0
movsd  0xeae(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doWhiteNoise>:
push   %rax
xor    %eax,%eax
call   1030 <arc4random@plt>
cvtsi2ss %rax,%xmm0
mulss  0xedb(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm0
addsd  0xed3(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @doWhiteNoise() {
%1 = alloca float
store float 0.000000e+00, float* %1
%2 = call i64 (...) @arc4random()
%3 = sitofp i64 %2 to float
store float %3, float* %1
%4 = load float, float* %1
%5 = fdiv float %4, 0x41F0000000000000
%6 = fpext float %5 to double
%7 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %6, double -1.000000e+00)
%8 = fptrunc double %7 to float
store float %8, float* %1
%9 = load float, float* %1
%10 = fpext float %9 to double
ret double %10
}

LLVM IR (-O2):
define double @doWhiteNoise() {
%1 = tail call i64 (...) @arc4random()
%2 = sitofp i64 %1 to float
%3 = fmul float %2, 0x3DF0000000000000
%4 = fpext float %3 to double
%5 = tail call double @llvm.fmuladd.f64(double %4, double 2.000000e+00, double -1.000000e+00)
%6 = fptrunc double %5 to float
%7 = fpext float %6 to double
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 5;
  printf("%d", i++);
  printf("%d", i--);
  printf("%d", ++i);
  printf("%d", --i);
  printf("%d", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x4(%rbp)
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
add    $0xffffffff,%esi
mov    %esi,-0x4(%rbp)
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%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 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
int getTTyMode(int fd, const char *mode) { return -1; }


x86 assembly (clang, -O0):
<getTTyMode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @getTTyMode(i32 %0, i8* nocapture readnone %1) {
ret i32 -1
}
void gprs_module_enable(void) { ; }


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

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

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

LLVM IR (-O2):
define void @gprs_module_enable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CreatePic(unsigned char *);
int /*<<< orphan*/ DestroyPic();
void GPU_showScreenPic(unsigned char *pMem) {
  DestroyPic();
  if (pMem == 0)
    return;
  CreatePic(pMem);
}


x86 assembly (clang, -O0):
<GPU_showScreenPic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <DestroyPic@plt>
cmpq   $0x0,-0x8(%rbp)
jne    1143 <GPU_showScreenPic+0x23>
jmp    114c <GPU_showScreenPic+0x2c>
mov    -0x8(%rbp),%rdi
call   1030 <CreatePic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPU_showScreenPic>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <DestroyPic@plt>
test   %rbx,%rbx
je     1139 <GPU_showScreenPic+0x19>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <CreatePic@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @GPU_showScreenPic(i8* %0) {
%2 = tail call i32 (...) @DestroyPic()
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @CreatePic(i8* %0)
br label %6
6: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcd_send_data(char);
void lcd_print(char *message) {
  while (*message) {
    lcd_send_data(*message);
    message++;
  }
}


x86 assembly (clang, -O0):
<lcd_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <lcd_print+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <lcd_send_data@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <lcd_print+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_print>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <lcd_print+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <lcd_send_data@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <lcd_print+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @lcd_print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @lcd_send_data(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
int decompressor_impl_buffer_copy_nominally_releasepage(
    struct microfs_sb_info *sbi, void *data, struct page *page) {
  (void)sbi;
  (void)data;
  (void)page;
  return 0;
}


x86 assembly (clang, -O0):
<decompressor_impl_buffer_copy_nominally_releasepage>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.microfs_sb_info = type opaque
%struct.page = type opaque
define i32 @decompressor_impl_buffer_copy_nominally_releasepage(%struct.microfs_sb_info* %0, i8* %1, %struct.page* %2) {
%4 = alloca %struct.microfs_sb_info*
%5 = alloca i8*
%6 = alloca %struct.page*
store %struct.microfs_sb_info* %0, %struct.microfs_sb_info** %4
store i8* %1, i8** %5
store %struct.page* %2, %struct.page** %6
%7 = load %struct.microfs_sb_info*, %struct.microfs_sb_info** %4
%8 = load i8*, i8** %5
%9 = load %struct.page*, %struct.page** %6
ret i32 0
}

LLVM IR (-O2):
%struct.microfs_sb_info = type opaque
%struct.page = type opaque
define i32 @decompressor_impl_buffer_copy_nominally_releasepage(%struct.microfs_sb_info* nocapture readnone %0, i8* nocapture readnone %1, %struct.page* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
float pow(double, float);
float parabola(float x, float k) { return pow(4.0 * x * (1.0 - x), k); }


x86 assembly (clang, -O0):
<parabola>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xeb8(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parabola>:
cvtss2sd %xmm0,%xmm2
movsd  0xee4(%rip),%xmm3
mulsd  %xmm2,%xmm3
movsd  0xee0(%rip),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
jmp    1030 <pow@plt>

LLVM IR (-O0):
define float @parabola(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fmul double 4.000000e+00, %6
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fsub double 1.000000e+00, %9
%11 = fmul double %7, %10
%12 = load float, float* %4
%13 = call float @pow(double %11, float %12)
ret float %13
}

LLVM IR (-O2):
define float @parabola(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fmul double %3, 4.000000e+00
%5 = fsub double 1.000000e+00, %3
%6 = fmul double %4, %5
%7 = tail call float @pow(double %6, float %1)
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ ENTER();
int /*<<< orphan*/ EXIT_RET();
int /*<<< orphan*/ huu();
int foo() {
  ENTER();
  huu();
  EXIT_RET();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <ENTER@plt>
mov    $0x0,%al
call   1030 <huu@plt>
mov    $0x0,%al
call   1040 <EXIT_RET@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1050 <ENTER@plt>
xor    %eax,%eax
call   1030 <huu@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <EXIT_RET@plt>

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = call i32 (...) @ENTER()
%3 = call i32 (...) @huu()
%4 = call i32 (...) @EXIT_RET()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @ENTER()
%2 = tail call i32 (...) @huu()
%3 = tail call i32 (...) @EXIT_RET()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ app_retarget_output();
int appStartupResp(int pid) { app_retarget_output(); }


x86 assembly (clang, -O0):
<appStartupResp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <app_retarget_output@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @appStartupResp(i32 %0) {
%2 = tail call i32 (...) @app_retarget_output()
ret i32 undef
}
int test_imm_13uint8_reg(unsigned char val) {
  return ((val) & (-0x13 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_13uint8_reg>:
test   $0xed,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_13uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -19
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
adrx0reg1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if ((((unsigned char *)10000000)[x0]) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrx0reg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movzbl (%rax,%rcx,1),%eax
movzbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     1143 <adrx0reg1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <adrx0reg1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0reg1>:
movslq %edx,%rax
movzbl 0x989680(%rax),%ecx
movzbl %sil,%edx
xor    %eax,%eax
cmp    %ecx,%edx
setae  %al
ret

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

LLVM IR (-O2):
define i32 @adrx0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* inttoptr (i64 10000000 to i8*), i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = and i32 %1, 255
%12 = icmp uge i32 %11, %10
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
scalar_t__ isdigit(char);
scalar_t__ isletter(char);
int isidentc(char c) { return isletter(c) || isdigit(c) || c == '_'; }


x86 assembly (clang, -O0):
<isidentc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isletter@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1171 <isidentc+0x51>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1171 <isidentc+0x51>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %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):
<isidentc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <isletter@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    114b <isidentc+0x2b>
movsbl %bpl,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
jne    114b <isidentc+0x2b>
xor    %ebx,%ebx
cmp    $0x5f,%bpl
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isidentc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isletter(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isdigit(i8 signext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 95
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isidentc(i8 signext %0) {
%2 = tail call i64 @isletter(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 @isdigit(i8 signext %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = icmp eq i8 %0, 95
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %4, %1
%11 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %9, %7 ]
ret i32 %11
}
void print_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @print_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bbm_word_read(void *, int, unsigned short *);
int /*<<< orphan*/ printk(char *, unsigned short);
int fc8080_probe(void *handle) {
  unsigned short ver;
  bbm_word_read(handle, 0x0018, &ver);
  printk("fc8080_probe 0x%x\n", ver);
  return (ver == 0x8080) ? 0 : 1;
}


x86 assembly (clang, -O0):
<fc8080_probe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x18,%esi
lea    -0xa(%rbp),%rdx
call   1040 <bbm_word_read@plt>
lea    0xebb(%rip),%rdi
movzwl -0xa(%rbp),%esi
call   1030 <printk@plt>
movzwl -0xa(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x8080,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8080_probe>:
push   %rax
lea    0x6(%rsp),%rdx
mov    $0x18,%esi
call   1040 <bbm_word_read@plt>
movzwl 0x6(%rsp),%esi
lea    0xec4(%rip),%rdi
call   1030 <printk@plt>
movzwl 0x6(%rsp),%ecx
xor    %eax,%eax
cmp    $0x8080,%ecx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"fc8080_probe 0x%x\0A\00"
define i32 @fc8080_probe(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @bbm_word_read(i8* %4, i32 24, i16* %3)
%6 = load i16, i16* %3
%7 = call i32 @printk(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i16 zeroext %6)
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = icmp eq i32 %9, 32896
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 0, i32 1
ret i32 %12
}

LLVM IR (-O2):
@.str = [19 x i8] c"fc8080_probe 0x%x\0A\00"
define i32 @fc8080_probe(i8* %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
%4 = call i32 @bbm_word_read(i8* %0, i32 24, i16* %2)
%5 = load i16, i16* %2
%6 = call i32 @printk(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i16 zeroext %5)
%7 = load i16, i16* %2
%8 = icmp ne i16 %7, -32640
%9 = zext i1 %8 to i32
ret i32 %9
}
int unknown2() {
  int x;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @unknown2() {
ret i32 undef
}
void numa_set_bind_policy(int strict) {}


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

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

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

LLVM IR (-O2):
define void @numa_set_bind_policy(i32 %0) {
ret void
}
int s_len(char *pattern) {
  register char *p = (char *)pattern;
  while (*p)
    p++;
  return ((int)((p - (char *)pattern)));
}


x86 assembly (clang, -O0):
<s_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     112e <s_len+0x2e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <s_len+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_len>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <s_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @s_len(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _clean_nfsmev(void *input) {
  if (input)
    free(input);
}


x86 assembly (clang, -O0):
<_clean_nfsmev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <_clean_nfsmev+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @_clean_nfsmev(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void ff_hevc_put_hevc_bi_w_epel_hv32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv32_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int main(void) {
  while (1)
    fork();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <fork@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <fork@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @fork()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @fork()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ Glib_Line(int, int, int, int, unsigned short);
void Glib_FilledRectangle(int x1, int y1, int x2, int y2,
                          unsigned short color) {
  int i;
  for (i = y1; i <= y2; i++)
    Glib_Line(x1, i, x2, i, color);
}


x86 assembly (clang, -O0):
<Glib_FilledRectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8w,%ax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1162 <Glib_FilledRectangle+0x52>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%ecx
movzwl -0x12(%rbp),%r8d
call   1030 <Glib_Line@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1132 <Glib_FilledRectangle+0x22>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Glib_FilledRectangle>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    %ecx,%esi
jg     114a <Glib_FilledRectangle+0x3a>
mov    %ecx,%r12d
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%r15d
add    $0x1,%r12d
movzwl %r8w,%ebx
nop
mov    %r15d,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
call   1030 <Glib_Line@plt>
add    $0x1,%ebp
cmp    %ebp,%r12d
jne    1130 <Glib_FilledRectangle+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @Glib_FilledRectangle(i32 %0, i32 %1, i32 %2, i32 %3, i16 zeroext %4) {
%6 = icmp sgt i32 %1, %3
br i1 %6, label %12, label %7
7: ; preds = %5, %7
%8 = phi i32 [ %10, %7 ], [ %1, %5 ]
%9 = tail call i32 @Glib_Line(i32 %0, i32 %8, i32 %2, i32 %8, i16 zeroext %4)
%10 = add i32 %8, 1
%11 = icmp eq i32 %8, %3
br i1 %11, label %12, label %7
12: ; preds = %7, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ writeS1rec(int /*<<< orphan*/ *, unsigned int, int);
void writeS1range(FILE *objfile, unsigned hexaddr, int hexcount) {
  while (hexcount > 16) {
    writeS1rec(objfile, hexaddr, 16);
    hexaddr += 16;
    hexcount -= 16;
  }
  writeS1rec(objfile, hexaddr, hexcount);
}


x86 assembly (clang, -O0):
<writeS1range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jle    1154 <writeS1range+0x44>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x10,%edx
call   1030 <writeS1rec@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
mov    %eax,-0x10(%rbp)
jmp    1122 <writeS1range+0x12>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <writeS1rec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeS1range>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%r14
cmp    $0x11,%edx
jl     1151 <writeS1range+0x41>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x10,%edx
call   1030 <writeS1rec@plt>
add    $0x10,%ebx
lea    -0x10(%r15),%edx
cmp    $0x20,%r15d
mov    %edx,%r15d
ja     1130 <writeS1range+0x20>
jmp    1154 <writeS1range+0x44>
mov    %r15d,%edx
mov    %r14,%rdi
mov    %ebx,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <writeS1rec@plt>

LLVM IR (-O0):
define void @writeS1range(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
br label %7
7: ; preds = %10, %3
%8 = load i32, i32* %6
%9 = icmp sgt i32 %8, 16
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = call i32 @writeS1rec(i32* %11, i32 %12, i32 16)
%14 = load i32, i32* %5
%15 = add i32 %14, 16
store i32 %15, i32* %5
%16 = load i32, i32* %6
%17 = sub nsw i32 %16, 16
store i32 %17, i32* %6
br label %7
18: ; preds = %7
%19 = load i32*, i32** %4
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = call i32 @writeS1rec(i32* %19, i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
define void @writeS1range(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 16
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ %2, %3 ]
%7 = phi i32 [ %9, %5 ], [ %1, %3 ]
%8 = tail call i32 @writeS1rec(i32* %0, i32 %7, i32 16)
%9 = add i32 %7, 16
%10 = add nsw i32 %6, -16
%11 = icmp ugt i32 %6, 32
br i1 %11, label %5, label %12
12: ; preds = %5, %3
%13 = phi i32 [ %1, %3 ], [ %9, %5 ]
%14 = phi i32 [ %2, %3 ], [ %10, %5 ]
%15 = tail call i32 @writeS1rec(i32* %0, i32 %13, i32 %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_net_info(unsigned int *, unsigned int *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  unsigned int monitor_net_in = 0;
  unsigned int monitor_net_out = 0;
  while (1) {
    get_net_info(&monitor_net_in, &monitor_net_out);
    ;
    sleep(20);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <get_net_info@plt>
mov    $0x14,%edi
call   1040 <sleep@plt>
jmp    1144 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%r14
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_net_info@plt>
mov    $0x14,%edi
call   1040 <sleep@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %2, %8
%9 = call i32 @get_net_info(i32* %6, i32* %7)
%10 = call i32 @sleep(i32 20)
br label %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
br label %7
7: ; preds = %7, %2
%8 = call i32 @get_net_info(i32* %3, i32* %4)
%9 = call i32 @sleep(i32 20)
br label %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void recurse(int level) {
  char arry[1024];
  printf("%d\n", level);
  recurse(level + 1);
}


x86 assembly (clang, -O0):
<recurse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <recurse@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurse>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
jmp    1120 <recurse+0x10>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @recurse(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = add nsw i32 %3, 1
br label %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;
typedef int /*<<< orphan*/ u_int16_t;
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_family;
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_port;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int __ipv4_udp_socket(struct sockaddr_in *);
int ipv4_udp_socket_nbo(u_int32_t addr, u_int16_t port) {
  struct sockaddr_in saddr;
  saddr.sin_port = port;
  saddr.sin_addr.s_addr = addr;
  saddr.sin_family = AF_INET;
  return __ipv4_udp_socket(&saddr);
}


x86 assembly (clang, -O0):
<ipv4_udp_socket_nbo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <__ipv4_udp_socket@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_udp_socket_nbo>:
sub    $0x18,%rsp
mov    %esi,0x10(%rsp)
mov    %edi,0xc(%rsp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <__ipv4_udp_socket@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
@AF_INET = global i32 0
define i32 @ipv4_udp_socket_nbo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr_in
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 2
store i32 %6, i32* %7
%8 = load i32, i32* %3
%9 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 1
%10 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 0
store i32 %8, i32* %10
%11 = load i32, i32* @AF_INET
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 0
store i32 %11, i32* %12
%13 = call i32 @__ipv4_udp_socket(%struct.sockaddr_in* %5)
ret i32 %13
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
@AF_INET = global i32 0
define i32 @ipv4_udp_socket_nbo(i32 %0, i32 %1) {
%3 = alloca %struct.sockaddr_in
%4 = bitcast %struct.sockaddr_in* %3 to i8*
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1, i32 0
store i32 %0, i32* %6
%7 = load i32, i32* @AF_INET
%8 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i32 %7, i32* %8
%9 = call i32 @__ipv4_udp_socket(%struct.sockaddr_in* %3)
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ gamma_x(int /*<<< orphan*/ *);
int /*<<< orphan*/ memxor(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
int /*<<< orphan*/ theta(int /*<<< orphan*/ *);
void khazad_round(uint8_t *a, const uint8_t *k) {
  gamma_x(a);
  theta(a);
  memxor(a, k, 8);
}


x86 assembly (clang, -O0):
<khazad_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <gamma_x@plt>
mov    -0x8(%rbp),%rdi
call   1040 <theta@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memxor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<khazad_round>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <gamma_x@plt>
mov    %rbx,%rdi
call   1040 <theta@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memxor@plt>

LLVM IR (-O0):
define void @khazad_round(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = call i32 @gamma_x(i32* %5)
%7 = load i32*, i32** %3
%8 = call i32 @theta(i32* %7)
%9 = load i32*, i32** %3
%10 = load i32*, i32** %4
%11 = call i32 @memxor(i32* %9, i32* %10, i32 8)
ret void
}

LLVM IR (-O2):
define void @khazad_round(i32* %0, i32* %1) {
%3 = tail call i32 @gamma_x(i32* %0)
%4 = tail call i32 @theta(i32* %0)
%5 = tail call i32 @memxor(i32* %0, i32* %1, i32 8)
ret void
}
/* Type definitions */
struct drm_file {
  int dummy;
};
struct drm_device {
  int dummy;
};

/* Variables and functions */
int g2d_open(struct drm_device *drm_dev, struct drm_file *file) { return 0; }


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

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

LLVM IR (-O0):
%struct.drm_device = type { i32 }
%struct.drm_file = type { i32 }
define i32 @g2d_open(%struct.drm_device* %0, %struct.drm_file* %1) {
%3 = alloca %struct.drm_device*
%4 = alloca %struct.drm_file*
store %struct.drm_device* %0, %struct.drm_device** %3
store %struct.drm_file* %1, %struct.drm_file** %4
ret i32 0
}

LLVM IR (-O2):
%struct.drm_device = type { i32 }
%struct.drm_file = type { i32 }
define i32 @g2d_open(%struct.drm_device* nocapture readnone %0, %struct.drm_file* nocapture readnone %1) {
ret i32 0
}