xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int increment_in_array() {
  float arr[3] = {10.1, 20.1, 30.1};
  float *px;
  px = &arr[0];
  printf("*px = %f\n", *px);
  *px = *px + 1;
  printf("*px = %f\n", *px);
}


x86 assembly (clang, -O0):
<increment_in_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xee3(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movss  0xeac(%rip),%xmm0
addss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment_in_array>:
push   %rbx
lea    0xef0(%rip),%rbx
movss  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xed4(%rip),%xmm0
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@__const.increment_in_array.arr = [3 x float] [float 0x4024333340000000, float 0x40341999A0000000, float 0x403E1999A0000000]
@.str = [10 x i8] c"*px = %f\0A\00"
define i32 @increment_in_array() {
%1 = alloca i32
%2 = alloca [3 x float]
%3 = alloca float*
%4 = bitcast [3 x float]* %2 to i8*
%5 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
store float* %5, float** %3
%6 = load float*, float** %3
%7 = load float, float* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %7)
%9 = load float*, float** %3
%10 = load float, float* %9
%11 = fadd float %10, 1.000000e+00
%12 = load float*, float** %3
store float %11, float* %12
%13 = load float*, float** %3
%14 = load float, float* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %14)
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [10 x i8] c"*px = %f\0A\00"
define i32 @increment_in_array() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float 0x4024333340000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float 0x4026333340000000)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ expanderWrite(int, char);
int /*<<< orphan*/ pulseEnable(int, char);
void write4bits(int file, char value) {
  expanderWrite(file, value);
  pulseEnable(file, value);
}


x86 assembly (clang, -O0):
<write4bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%esi
call   1040 <expanderWrite@plt>
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%esi
call   1030 <pulseEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write4bits>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <expanderWrite@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <pulseEnable@plt>

LLVM IR (-O0):
define void @write4bits(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i8, i8* %4
%7 = call i32 @expanderWrite(i32 %5, i8 signext %6)
%8 = load i32, i32* %3
%9 = load i8, i8* %4
%10 = call i32 @pulseEnable(i32 %8, i8 signext %9)
ret void
}

LLVM IR (-O2):
define void @write4bits(i32 %0, i8 signext %1) {
%3 = tail call i32 @expanderWrite(i32 %0, i8 signext %1)
%4 = tail call i32 @pulseEnable(i32 %0, i8 signext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err_quit(char *);
int socket(int, int, int);
int Socket(int family, int type, int protocol) {
  int sockfd;
  if ((sockfd = socket(family, type, protocol)) == -1)
    err_quit("socket()");
  return sockfd;
}


x86 assembly (clang, -O0):
<Socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <socket@plt>
mov    %eax,-0x10(%rbp)
cmp    $0xffffffff,%eax
jne    1157 <Socket+0x37>
lea    0xeae(%rip),%rdi
call   1030 <err_quit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rbx
call   1040 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1139 <Socket+0x19>
lea    0xecc(%rip),%rdi
call   1030 <err_quit@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"socket()\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err_quit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
void HMR3IsUXActive(void) {}


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

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

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

LLVM IR (-O2):
define void @HMR3IsUXActive() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int read(char *name, char *permission) {
  int buf;
  FILE *file;
  file = fopen(name, permission);
  fread(&buf, sizeof(buf), 1, file);
  fclose(file);
  return buf;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
push   %rbx
sub    $0x10,%rsp
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @read(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32* @fopen(i8* %7, i8* %8)
store i32* %9, i32** %6
%10 = load i32*, i32** %6
%11 = call i32 @fread(i32* %5, i32 4, i32 1, i32* %10)
%12 = load i32*, i32** %6
%13 = call i32 @fclose(i32* %12)
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @read(i8* nocapture %0, i8* nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32* @fopen(i8* %0, i8* %1)
%6 = call i32 @fread(i32* %3, i32 4, i32 1, i32* %5)
%7 = tail call i32 @fclose(i32* %5)
%8 = load i32, i32* %3
ret i32 %8
}
/* Variables and functions */
scalar_t__ iswhite(char);
void skipwhite(char **s) {
  while (iswhite(**s))
    (*s)++;
}


x86 assembly (clang, -O0):
<skipwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <iswhite@plt>
cmp    $0x0,%rax
je     1148 <skipwhite+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <skipwhite+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipwhite>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <iswhite@plt>
test   %rax,%rax
je     113a <skipwhite+0x2a>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <skipwhite+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @skipwhite(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i64 @iswhite(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i64 @iswhite(i8 signext %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: ldd filename...\n", stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Usage: ldd filename...\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [24 x i8] c"Usage: ldd filename...\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
int test_imm_F4uint32_mem(unsigned int *val) {
  return ((*val) & (0xF4 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F4uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 244
%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_F4uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 244
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void mulvv(float *result, const float *s1, const float *s2) {
  result[0] = s1[0] * s2[0];
  result[1] = s1[1] * s2[1];
  result[2] = s1[2] * s2[2];
}


x86 assembly (clang, -O0):
<mulvv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mulvv>:
movss  (%rsi),%xmm0
mulss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
mulss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
mulss  0x8(%rdx),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @mulvv(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fmul float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fmul float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %5
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fmul float %27, %30
%32 = load float*, float** %4
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
ret void
}

LLVM IR (-O2):
define void @mulvv(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fmul float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fmul float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = fmul float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displayLCDCenteredString(int /*<<< orphan*/, char *);
void autonDisplay(char input) {
  switch (input) {
  case 'R':
    displayLCDCenteredString(0, "RED");
    break;
  case 'B':
    displayLCDCenteredString(0, "BLUE");
    break;
  default:
    displayLCDCenteredString(0, "ERROR");
    break;
  }
}


x86 assembly (clang, -O0):
<autonDisplay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x42,%eax
je     1157 <autonDisplay+0x47>
jmp    1133 <autonDisplay+0x23>
mov    -0x8(%rbp),%eax
sub    $0x52,%eax
jne    116a <autonDisplay+0x5a>
jmp    1144 <autonDisplay+0x34>
xor    %edi,%edi
lea    0xeb3(%rip),%rsi
call   1030 <displayLCDCenteredString@plt>
jmp    1178 <autonDisplay+0x68>
xor    %edi,%edi
lea    0xea4(%rip),%rsi
call   1030 <displayLCDCenteredString@plt>
jmp    1178 <autonDisplay+0x68>
xor    %edi,%edi
lea    0xe96(%rip),%rsi
call   1030 <displayLCDCenteredString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autonDisplay>:
cmp    $0x42,%dil
lea    0xee9(%rip),%rax
lea    0xee7(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x52,%dil
lea    0xecf(%rip),%rsi
cmovne %rcx,%rsi
xor    %edi,%edi
jmp    1030 <displayLCDCenteredString@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"RED\00"
@.str.1 = [5 x i8] c"BLUE\00"
@.str.2 = [6 x i8] c"ERROR\00"
define void @autonDisplay(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %9 [
i32 82, label %5
i32 66, label %7
]
5: ; preds = %1
%6 = call i32 @displayLCDCenteredString(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %1
%8 = call i32 @displayLCDCenteredString(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %1
%10 = call i32 @displayLCDCenteredString(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7, %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"RED\00"
@.str.1 = [5 x i8] c"BLUE\00"
@.str.2 = [6 x i8] c"ERROR\00"
define void @autonDisplay(i8 signext %0) {
%2 = icmp eq i8 %0, 66
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i8 %0, 82
%5 = select i1 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3
%6 = tail call i32 @displayLCDCenteredString(i32 0, i8* %5)
ret void
}
/* Variables and functions */
char *malloc(int);
char *memchr(char *, char, unsigned int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sink(char *);
void nowarn_memchr_uint_memset_cst(const void *s, unsigned n) {
  char *p = malloc(4);
  sink(p);
  p = memchr(p, '1', n);
  memset(p, 0, 4);
}


x86 assembly (clang, -O0):
<nowarn_memchr_uint_memset_cst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <sink@plt>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x31,%esi
call   1040 <memchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nowarn_memchr_uint_memset_cst>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <sink@plt>
mov    %rbx,%rdi
mov    $0x31,%esi
mov    %ebp,%edx
call   1040 <memchr@plt>
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x4,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @nowarn_memchr_uint_memset_cst(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i8* @malloc(i32 4)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = call i32 @sink(i8* %7)
%9 = load i8*, i8** %5
%10 = load i32, i32* %4
%11 = call i8* @memchr(i8* %9, i8 signext 49, i32 %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = call i32 @memset(i8* %12, i32 0, i32 4)
ret void
}

LLVM IR (-O2):
define void @nowarn_memchr_uint_memset_cst(i8* nocapture readnone %0, i32 %1) {
%3 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
%4 = tail call i32 @sink(i8* %3)
%5 = tail call i8* @memchr(i8* %3, i8 signext 49, i32 %1)
%6 = tail call i32 @memset(i8* %5, i32 0, i32 4)
ret void
}
void gtk_state_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_state_type_get_type() {
ret void
}
long _syscall1(long cnum, long a1) {
  register long ret __asm__("rax");
  register long r0 __asm__("rax") = cnum;
  register long r1 __asm__("rdi") = a1;
  __asm__ __volatile__("syscall"
                       : "=r"(ret)
                       : "r"(r0), "r"(r1)
                       : "rcx", "r11", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<_syscall1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rdi
syscall
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall1>:
mov    %rdi,%rax
mov    %rsi,%rdi
syscall
ret

LLVM IR (-O0):
define i64 @_syscall1(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
store i64 %8, i64* %6
%9 = load i64, i64* %4
store i64 %9, i64* %7
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = call i64 asm sideeffect "syscall", "={rax},{rax},{rdi},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %10, i64 %11)
store i64 %12, i64* %5
%13 = load i64, i64* %5
ret i64 %13
}

LLVM IR (-O2):
define i64 @_syscall1(i64 %0, i64 %1) {
%3 = tail call i64 asm sideeffect "syscall", "={rax},{rax},{rdi},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1)
ret i64 %3
}
unsigned long sp(void) { asm("mov %rsp, %rax"); }


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

x86 assembly (clang, -O2):
<sp>:
mov    %rsp,%rax
ret

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

LLVM IR (-O2):
define i64 @sp() {
tail call void asm sideeffect "mov %rsp, %rax", "~{dirflag},~{fpsr},~{flags}"()
ret i64 undef
}
int ft_iswhispa(int c) {
  if (c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_iswhispa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     1143 <ft_iswhispa+0x43>
cmpl   $0x9,-0x8(%rbp)
je     1143 <ft_iswhispa+0x43>
cmpl   $0xa,-0x8(%rbp)
je     1143 <ft_iswhispa+0x43>
cmpl   $0xb,-0x8(%rbp)
je     1143 <ft_iswhispa+0x43>
cmpl   $0xc,-0x8(%rbp)
je     1143 <ft_iswhispa+0x43>
cmpl   $0xd,-0x8(%rbp)
jne    114f <ft_iswhispa+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <ft_iswhispa+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_iswhispa>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%ecx
jae    110e <ft_iswhispa+0xe>
ret
cmp    $0x20,%edi
je     110d <ft_iswhispa+0xd>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_iswhispa(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 12, label %3
i32 11, label %3
i32 10, label %3
i32 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ help(char const *, int);
void usage(const char *name) { help(name, 1); }


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

x86 assembly (clang, -O2):
<usage>:
mov    $0x1,%esi
jmp    1030 <help@plt>

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

LLVM IR (-O2):
define void @usage(i8* %0) {
%2 = tail call i32 @help(i8* %0, i32 1)
ret void
}
int CotyleNbNoeud(void) { return 2000; }


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

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

LLVM IR (-O0):
define i32 @CotyleNbNoeud() {
ret i32 2000
}

LLVM IR (-O2):
define i32 @CotyleNbNoeud() {
ret i32 2000
}
/* Variables and functions */
int /*<<< orphan*/ exit_(int);
void lu_exit(int code) { exit_(code); }


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

x86 assembly (clang, -O2):
<lu_exit>:
jmp    1030 <exit_@plt>

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

LLVM IR (-O2):
define void @lu_exit(i32 %0) {
%2 = tail call i32 @exit_(i32 %0)
ret void
}
/* Variables and functions */
int draw_block4x4_rgtc1_shared(unsigned char const *, unsigned int *,
                               int /*<<< orphan*/, int);
int /*<<< orphan*/ memset(unsigned int *, int /*<<< orphan*/, int);
int draw_block4x4_rgtc1(const unsigned char *bitstring,
                        unsigned int *image_buffer, int flags) {
  memset(image_buffer, 0, 64);
  return draw_block4x4_rgtc1_shared(bitstring, image_buffer, 0, flags);
}


x86 assembly (clang, -O0):
<draw_block4x4_rgtc1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
xor    %edx,%edx
call   1040 <draw_block4x4_rgtc1_shared@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_block4x4_rgtc1>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <draw_block4x4_rgtc1_shared@plt>

LLVM IR (-O0):
define i32 @draw_block4x4_rgtc1(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %5
%8 = call i32 @memset(i32* %7, i32 0, i32 64)
%9 = load i8*, i8** %4
%10 = load i32*, i32** %5
%11 = load i32, i32* %6
%12 = call i32 @draw_block4x4_rgtc1_shared(i8* %9, i32* %10, i32 0, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @draw_block4x4_rgtc1(i8* %0, i32* %1, i32 %2) {
%4 = tail call i32 @memset(i32* %1, i32 0, i32 64)
%5 = tail call i32 @draw_block4x4_rgtc1_shared(i8* %0, i32* %1, i32 0, i32 %2)
ret i32 %5
}
int slength(char *string) {
  int e;
  for (e = 0; string[e]; ++e)
    ;
  return e;
}


x86 assembly (clang, -O0):
<slength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1134 <slength+0x34>
jmp    1126 <slength+0x26>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <slength+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @slength(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ naturalN(int);
int main() {
  naturalN(8);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @naturalN(i32 8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @naturalN(i32 8)
ret i32 0
}
int isequal_int(const int *a, const int *b) { return *a - *b; }


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

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

LLVM IR (-O0):
define i32 @isequal_int(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @isequal_int(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
ret i32 %5
}
int cbCalcCurrency(s)
char *s;
{
  s = s;
  return 9;
}


x86 assembly (clang, -O0):
<cbCalcCurrency>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x9,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cbCalcCurrency(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
store i8* %3, i8** %2
ret i32 9
}

LLVM IR (-O2):
define i32 @cbCalcCurrency(i8* nocapture readnone %0) {
ret i32 9
}
/* Variables and functions */
int /*<<< orphan*/ KALMANFILTER_convert(float, float, float, float, float,
                                        float, float);
extern int KALMANFILTER_update(float t, float p, float q, float r, float ax,
                               float ay, float az) {
  KALMANFILTER_convert(t, p, q, r, ax, ay, az);
  return 1;
}


x86 assembly (clang, -O0):
<KALMANFILTER_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  %xmm6,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
movss  -0x14(%rbp),%xmm4
movss  -0x18(%rbp),%xmm5
movss  -0x1c(%rbp),%xmm6
call   1030 <KALMANFILTER_convert@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @KALMANFILTER_update(float %0, float %1, float %2, float %3, float %4, float %5, float %6) {
%8 = tail call i32 @KALMANFILTER_convert(float %0, float %1, float %2, float %3, float %4, float %5, float %6)
ret i32 1
}
/* Type definitions */
typedef int type;
typedef int depth;

/* Variables and functions */
int cvIplDepth(int type) {
  int depth = ((type) & ((1 << 3) - 1));
  return ((((sizeof(size_t) << 28) | 0x8442211) >>
           ((depth) & ((1 << 3) - 1)) * 4) &
          15) *
             8 |
         (depth == 1 || depth == 3 || depth == 4 ? 0x80000000 : 0);
}


x86 assembly (clang, -O0):
<cvIplDepth>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7,%eax
shl    $0x2,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x88442211,%eax
shr    %cl,%rax
and    $0xf,%rax
shl    $0x3,%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%al
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1159 <cvIplDepth+0x59>
mov    $0x1,%al
cmpl   $0x3,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1159 <cvIplDepth+0x59>
cmpl   $0x4,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x9(%rbp),%sil
xor    %ecx,%ecx
mov    $0x80000000,%edx
test   $0x1,%sil
cmovne %edx,%ecx
mov    %ecx,%ecx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvIplDepth>:
mov    %edi,%ecx
and    $0x7,%ecx
and    $0x5,%edi
cmp    $0x1,%edi
sete   %al
cmp    $0x4,%ecx
sete   %dl
or     %al,%dl
shl    $0x2,%ecx
mov    $0x88442211,%eax
shr    %cl,%eax
movzbl %dl,%ecx
shl    $0x1f,%ecx
and    $0xf,%eax
lea    (%rcx,%rax,8),%eax
ret

LLVM IR (-O0):
define i32 @cvIplDepth(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 7
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, 7
%8 = mul nsw i32 %7, 4
%9 = zext i32 %8 to i64
%10 = lshr i64 2286166545, %9
%11 = and i64 %10, 15
%12 = mul i64 %11, 8
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 1
br i1 %14, label %21, label %15
15: ; preds = %1
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 3
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 4
br label %21
21: ; preds = %18, %15, %1
%22 = phi i1 [ true, %15 ], [ true, %1 ], [ %20, %18 ]
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 -2147483648, i32 0
%25 = zext i32 %24 to i64
%26 = or i64 %12, %25
%27 = trunc i64 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @cvIplDepth(i32 %0) {
%2 = and i32 %0, 7
%3 = and i32 %0, 5
%4 = icmp eq i32 %3, 1
%5 = icmp eq i32 %2, 4
%6 = or i1 %4, %5
%7 = select i1 %6, i32 -2147483648, i32 0
%8 = shl nuw nsw i32 %2, 2
%9 = lshr i32 -2008800751, %8
%10 = shl i32 %9, 3
%11 = and i32 %10, 120
%12 = or i32 %11, %7
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void wksxmpp_b64free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @wksxmpp_b64free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void displayList(int *list, int num) {
  int i = 0;
  for (i = 0; i < num; i++)
    printf("%d", list[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<displayList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <displayList+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <displayList+0x1d>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayList>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <displayList+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <displayList+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @displayList(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
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
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 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @displayList(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
char EncUnitFloat(double);
EncUnitVector(double v[3], char *c) {
  c[0] = EncUnitFloat(v[0]);
  c[1] = EncUnitFloat(v[1]);
  c[2] = EncUnitFloat(v[2]);
}


x86 assembly (clang, -O0):
<EncUnitVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EncUnitFloat@plt>
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
call   1030 <EncUnitFloat@plt>
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
call   1030 <EncUnitFloat@plt>
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EncUnitVector>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
call   1030 <EncUnitFloat@plt>
mov    %al,(%r14)
movsd  0x8(%rbx),%xmm0
call   1030 <EncUnitFloat@plt>
mov    %al,0x1(%r14)
movsd  0x10(%rbx),%xmm0
call   1030 <EncUnitFloat@plt>
mov    %al,0x2(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @EncUnitVector(double* %0, i8* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i8*
store double* %0, double** %4
store i8* %1, i8** %5
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = call signext i8 @EncUnitFloat(double %8)
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = call signext i8 @EncUnitFloat(double %14)
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load double*, double** %4
%19 = getelementptr inbounds double, double* %18, i64 2
%20 = load double, double* %19
%21 = call signext i8 @EncUnitFloat(double %20)
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i64 2
store i8 %21, i8* %23
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @EncUnitVector(double* nocapture %0, i8* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call signext i8 @EncUnitFloat(double %3)
store i8 %4, i8* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = tail call signext i8 @EncUnitFloat(double %6)
%8 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %7, i8* %8
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = tail call signext i8 @EncUnitFloat(double %10)
%12 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %11, i8* %12
ret i32 undef
}
/* Type definitions */
struct cmd_arg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ showAtmSettings();
void cmdShowAtmVcTbl(int cmdType, struct cmd_arg *pCmdArg) {
  showAtmSettings();
}


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

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

LLVM IR (-O0):
%struct.cmd_arg = type { i32 }
define void @cmdShowAtmVcTbl(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
%5 = call i32 (...) @showAtmSettings()
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type { i32 }
define void @cmdShowAtmVcTbl(i32 %0, %struct.cmd_arg* nocapture readnone %1) {
%3 = tail call i32 (...) @showAtmSettings()
ret void
}
/* Variables and functions */
float atof(char *);
float g_fltv(char *p) { return atof(p); }


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

x86 assembly (clang, -O2):
<g_fltv>:
jmp    1030 <atof@plt>

LLVM IR (-O0):
define float @g_fltv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call float @atof(i8* %3)
ret float %4
}

LLVM IR (-O2):
define float @g_fltv(i8* nocapture %0) {
%2 = tail call float @atof(i8* %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ SPC_LTrim(char *);
char *SPC_RTrim(int /*<<< orphan*/);
char *SPC_Trim(char *line) { return SPC_RTrim(SPC_LTrim(line)); }


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

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

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

LLVM IR (-O2):
define i8* @SPC_Trim(i8* %0) {
%2 = tail call i32 @SPC_LTrim(i8* %0)
%3 = tail call i8* @SPC_RTrim(i32 %2)
ret i8* %3
}
void test_crealf(_Complex float f) {
  if (crealf(f) != crealf(f))
    link_failure_crealf();
}


x86 assembly (clang, -O0):
<test_crealf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movlpd %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    1137 <test_crealf+0x27>
jp     1137 <test_crealf+0x27>
jmp    113e <test_crealf+0x2e>
mov    $0x0,%al
call   1030 <link_failure_crealf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_crealf>:
ucomiss %xmm0,%xmm0
jp     1116 <test_crealf+0x6>
ret
xor    %eax,%eax
jmp    1030 <link_failure_crealf@plt>

LLVM IR (-O0):
define void @test_crealf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %3
%4 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%5 = load float, float* %4
%6 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
%7 = load float, float* %6
%8 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%9 = load float, float* %8
%10 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
%11 = load float, float* %10
%12 = fcmp une float %5, %9
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = call i32 (...) @link_failure_crealf()
br label %15
15: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
define void @test_crealf(<2 x float> %0) {
%2 = extractelement <2 x float> %0, i64 0
%3 = fcmp uno float %2, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @link_failure_crealf()
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t l2cap_event_connection_parameter_update_request_get_interval_min(
    const uint8_t *event) {
  return little_endian_read_16(event, 4);
}


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

x86 assembly (clang, -O2):
<l2cap_event_connection_parameter_update_request_get_interval_min>:
mov    $0x4,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @l2cap_event_connection_parameter_update_request_get_interval_min(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 4)
ret i32 %2
}