xunge/DecIR huggingface dataset:
/* Variables and functions */
int getpgid(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("pgid %d\n", getpgid(0));
  printf("pgid %d\n", getpgid(12));
  printf("pgid %d\n", getpgid(2170));
  perror("getpgid");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1050 <getpgid@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0xc,%edi
call   1050 <getpgid@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    $0x87a,%edi
call   1050 <getpgid@plt>
mov    %eax,%esi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7e(%rip),%rdi
call   1040 <perror@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1050 <getpgid@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xc,%edi
call   1050 <getpgid@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x87a,%edi
call   1050 <getpgid@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
call   1040 <perror@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"pgid %d\0A\00"
@.str.1 = [8 x i8] c"getpgid\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @getpgid(i32 0)
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @getpgid(i32 12)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @getpgid(i32 2170)
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"pgid %d\0A\00"
@.str.1 = [8 x i8] c"getpgid\00"
define i32 @main() {
%1 = tail call i32 @getpgid(i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @getpgid(i32 12)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @getpgid(i32 2170)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int __str_startswith(int /*<<< orphan*/, char *);
int __selector(const struct dirent *restrict b) {
  return __str_startswith(b->d_name, "hsperfdata_");
}


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

x86 assembly (clang, -O2):
<__selector>:
mov    (%rdi),%edi
lea    0xee7(%rip),%rsi
jmp    1030 <__str_startswith@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [12 x i8] c"hsperfdata_\00"
define i32 @__selector(%struct.dirent* noalias %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @__str_startswith(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [12 x i8] c"hsperfdata_\00"
define i32 @__selector(%struct.dirent* noalias nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @__str_startswith(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
int ISNANd(double x) { return x != x; }


x86 assembly (clang, -O0):
<ISNANd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISNANd>:
xor    %eax,%eax
ucomisd %xmm0,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @ISNANd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fcmp une double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ISNANd(double %0) {
%2 = fcmp uno double %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ nextafter(double, double);
float nextafterf(float x, float y) {
  return (float)nextafter((double)x, (double)y);
}


x86 assembly (clang, -O0):
<nextafterf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <nextafter@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextafterf>:
push   %rax
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
call   1030 <nextafter@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @nextafterf(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 = load float, float* %4
%8 = fpext float %7 to double
%9 = call i64 @nextafter(double %6, double %8)
%10 = sitofp i64 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @nextafterf(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = tail call i64 @nextafter(double %3, double %4)
%6 = sitofp i64 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main(void) {
  int feet, fathoms;
  fathoms = 2;
  feet = 6 * fathoms;
  printf("There are %d feet in %d fathoms!\n", feet, fathoms);
  printf("Yes, I said %d feet!\n", 6 * fathoms);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
imul   $0x6,-0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
imul   $0x6,-0xc(%rbp),%esi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"There are %d feet in %d fathoms!\0A\00"
@.str.1 = [22 x i8] c"Yes, I said %d feet!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = mul nsw i32 6, %4
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %3
%10 = mul nsw i32 6, %9
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"There are %d feet in %d fathoms!\0A\00"
@.str.1 = [22 x i8] c"Yes, I said %d feet!\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 12, i32 2)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *malloc(size_t);
void *c_malloc(size_t size) {
  void *result = malloc(size);
  assert(result != NULL);
  return result;
}


x86 assembly (clang, -O0):
<c_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @c_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @c_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ cprint(int, int /*<<< orphan*/, char *);
void poll_fsb_failsafe(void) {
  cprint(1 + 5, 0,
         "Chipset/IMC : ***FAIL SAFE***FAIL SAFE***FAIL SAFE***FAIL "
         "SAFE***FAIL SAFE***");
  cprint(1 + 6, 0,
         "*** Memtest86+ is running in fail safe mode. Same reliability, less "
         "details ***");
  return;
}


x86 assembly (clang, -O0):
<poll_fsb_failsafe>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
xor    %esi,%esi
lea    0xede(%rip),%rdx
call   1030 <cprint@plt>
mov    $0x7,%edi
xor    %esi,%esi
lea    0xf19(%rip),%rdx
call   1030 <cprint@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<poll_fsb_failsafe>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x6,%edi
xor    %esi,%esi
call   1030 <cprint@plt>
lea    0xf23(%rip),%rdx
mov    $0x7,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <cprint@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"Chipset/IMC : ***FAIL SAFE***FAIL SAFE***FAIL SAFE***FAIL SAFE***FAIL SAFE***\00"
@.str.1 = [80 x i8] c"*** Memtest86+ is running in fail safe mode. Same reliability, less details ***\00"
define void @poll_fsb_failsafe() {
%1 = call i32 @cprint(i32 6, i32 0, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @cprint(i32 7, i32 0, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [78 x i8] c"Chipset/IMC : ***FAIL SAFE***FAIL SAFE***FAIL SAFE***FAIL SAFE***FAIL SAFE***\00"
@.str.1 = [80 x i8] c"*** Memtest86+ is running in fail safe mode. Same reliability, less details ***\00"
define void @poll_fsb_failsafe() {
%1 = tail call i32 @cprint(i32 6, i32 0, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @cprint(i32 7, i32 0, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned char eeread(int);
int findunoccupied(int addr) {
  while (addr < 2047) {
    if (eeread(addr) == ((unsigned char)255))
      return addr;
    addr++;
  }
  return ((int)-1);
}


x86 assembly (clang, -O0):
<findunoccupied>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x7ff,-0x8(%rbp)
jge    1157 <findunoccupied+0x47>
mov    -0x8(%rbp),%edi
call   1030 <eeread@plt>
movzbl %al,%eax
cmp    $0xff,%eax
jne    1149 <findunoccupied+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115e <findunoccupied+0x4e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111b <findunoccupied+0xb>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findunoccupied>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffff,%ebx
cmp    $0x7fe,%edi
jg     114a <findunoccupied+0x3a>
mov    %edi,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
call   1030 <eeread@plt>
cmp    $0xff,%al
je     1148 <findunoccupied+0x38>
add    $0x1,%ebp
cmp    $0x7ff,%ebp
jne    1130 <findunoccupied+0x20>
jmp    114a <findunoccupied+0x3a>
mov    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @findunoccupied(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2047
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = call zeroext i8 @eeread(i32 %8)
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 255
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %18
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
store i32 -1, i32* %2
br label %18
18: ; preds = %17, %12
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @findunoccupied(i32 %0) {
%2 = icmp slt i32 %0, 2047
br i1 %2, label %3, label %10
3: ; preds = %1, %7
%4 = phi i32 [ %8, %7 ], [ %0, %1 ]
%5 = tail call zeroext i8 @eeread(i32 %4)
%6 = icmp eq i8 %5, -1
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = add i32 %4, 1
%9 = icmp eq i32 %8, 2047
br i1 %9, label %10, label %3
10: ; preds = %3, %7, %1
%11 = phi i32 [ -1, %1 ], [ -1, %7 ], [ %4, %3 ]
ret i32 %11
}
int is_hex(char c) {
  if (((c >= '0') && (c <= '9')) || ((c >= 'a') && (c <= 'f')) ||
      ((c >= 'A') && (c <= 'F')))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<is_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <is_hex+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    1158 <is_hex+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     113e <is_hex+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jle    1158 <is_hex+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1164 <is_hex+0x64>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     1164 <is_hex+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <is_hex+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_hex(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %27, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 102
br i1 %18, label %27, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 65
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 70
br i1 %26, label %27, label %28
27: ; preds = %23, %15, %7
store i32 1, i32* %2
br label %29
28: ; preds = %23, %19
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_hex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
char *basename(char *);
int /*<<< orphan*/ free(char *);
char *strdup(char const *);
char *_q_filename(const char *filepath) {
  char *path = strdup(filepath);
  char *bname = basename(path);
  char *filename = strdup(bname);
  free(path);
  return filename;
}


x86 assembly (clang, -O0):
<_q_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_q_filename>:
push   %r14
push   %rbx
push   %rax
call   1050 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <basename@plt>
mov    %rax,%rdi
call   1050 <strdup@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @_q_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strdup(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i8* @basename(i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = call i8* @strdup(i8* %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @_q_filename(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i8* @basename(i8* %2)
%4 = tail call i8* @strdup(i8* %3)
%5 = tail call i32 @free(i8* %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ ds2dvr(int, int);
void ds2dvr_(int *vrid, int *force) { ds2dvr(*vrid, *force); }


x86 assembly (clang, -O0):
<ds2dvr_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <ds2dvr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds2dvr_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <ds2dvr@plt>

LLVM IR (-O0):
define void @ds2dvr_(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 = call i32 @ds2dvr(i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @ds2dvr_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @ds2dvr(i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int numberFromString(char *);
int /*<<< orphan*/ write(int, char *, int);
int parseAndCheckPort(char *port) {
  int port_res = numberFromString(port);
  if (port_res < 49152 || port_res > 65535) {
    write(2, "The port must be between 49152 and 65535!\r\n", 43);
    return -1;
  }
  return port_res;
}


x86 assembly (clang, -O0):
<parseAndCheckPort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <numberFromString@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xc000,-0x14(%rbp)
jl     1152 <parseAndCheckPort+0x32>
cmpl   $0xffff,-0x14(%rbp)
jle    1174 <parseAndCheckPort+0x54>
mov    $0x2,%edi
lea    0xea2(%rip),%rsi
mov    $0x2b,%edx
call   1030 <write@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <parseAndCheckPort+0x5a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseAndCheckPort>:
push   %rax
call   1040 <numberFromString@plt>
mov    %eax,%ecx
add    $0xffff0000,%ecx
cmp    $0xffffbfff,%ecx
ja     1151 <parseAndCheckPort+0x31>
lea    0xec3(%rip),%rsi
mov    $0x2,%edi
mov    $0x2b,%edx
call   1030 <write@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"The port must be between 49152 and 65535!\0D\0A\00"
define i32 @parseAndCheckPort(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @numberFromString(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 49152
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 65535
br i1 %11, label %12, label %14
12: ; preds = %9, %1
%13 = call i32 @write(i32 2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 43)
store i32 -1, i32* %2
br label %16
14: ; preds = %9
%15 = load i32, i32* %4
store i32 %15, i32* %2
br label %16
16: ; preds = %14, %12
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@.str = [44 x i8] c"The port must be between 49152 and 65535!\0D\0A\00"
define i32 @parseAndCheckPort(i8* %0) {
%2 = tail call i32 @numberFromString(i8* %0)
%3 = add i32 %2, -65536
%4 = icmp ult i32 %3, -16384
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 43)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ %2, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ writeCharacter(char);
void endLine(void) { writeCharacter('\n'); }


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

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

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

LLVM IR (-O2):
define void @endLine() {
%1 = tail call i32 @writeCharacter(i8 signext 10)
ret void
}
unsigned long gidz_general(int k, int j, int i, unsigned ey, unsigned ex) {
  return ex * ey * k + ex * j + i;
}


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

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

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

LLVM IR (-O2):
define i64 @gidz_general(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = mul i32 %3, %0
%7 = add i32 %6, %1
%8 = mul i32 %7, %4
%9 = add i32 %8, %2
%10 = zext i32 %9 to i64
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ mintaka_index_generate();
void mintaka_index_generate_() { mintaka_index_generate(); }


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

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

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

LLVM IR (-O2):
define void @mintaka_index_generate_() {
%1 = tail call i32 (...) @mintaka_index_generate()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ width_inc;
};
typedef TYPE_1__ XIconSize;

/* Variables and functions */
int get_XIconSize_width_inc(void *_p) {
  return (int)((XIconSize *)_p)->width_inc;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XIconSize_width_inc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XIconSize_width_inc(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int date_get_day();
int is_day_of_moon(void) { return date_get_day() % 2 == 1; }


x86 assembly (clang, -O0):
<is_day_of_moon>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <date_get_day@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_day_of_moon>:
push   %rax
xor    %eax,%eax
call   1030 <date_get_day@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_day_of_moon() {
%1 = call i32 (...) @date_get_day()
%2 = srem i32 %1, 2
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @is_day_of_moon() {
%1 = tail call i32 (...) @date_get_day()
%2 = srem i32 %1, 2
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_IFCHR;
__attribute__((__weak__)) int _stat(const char *filepath
                                    __attribute__((unused)),
                                    struct stat *st __attribute__((unused))) {
  st->st_mode = S_IFCHR;
  return 0;
}


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

x86 assembly (clang, -O2):
<_stat>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define weak i32 @_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @S_IFCHR
%6 = load %struct.stat*, %struct.stat** %4
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
store i32 %5, i32* %7
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define weak i32 @_stat(i8* %0, %struct.stat* %1) {
%3 = load i32, i32* @S_IFCHR
%4 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
store i32 %3, i32* %4
ret i32 0
}
int main() {
  int a = 5;
  const int b = a + 2;
  a = 6;
  a = b;
  const int *aa = &a;
  a = *aa;
  int *const aaa = &a;
  aa = aaa;
  *aaa = b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
movl   $0x6,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int is_all(cp)
char *cp;
{ return (strcmp_tospace(cp, "all") == 0); }


x86 assembly (clang, -O0):
<is_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <strcmp_tospace@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_all>:
push   %rax
lea    0xee8(%rip),%rsi
xor    %eax,%eax
call   1030 <strcmp_tospace@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"all\00"
define i32 @is_all(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @strcmp_tospace to i32 (i8*, i8*, ...)*)(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"all\00"
define i32 @is_all(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @strcmp_tospace to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void f() {
  void *__u;
  __u = (__extension__(void *) __u + 4);
}


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

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i8*
%2 = load i8*, i8** %1
%3 = getelementptr i8, i8* %2, i64 4
store i8* %3, i8** %1
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
void _managed_free(void *memory) {}


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

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

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

LLVM IR (-O2):
define void @_managed_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SET_DOUT_TO(int /*<<< orphan*/);
void SET_DOUT_LOW(void) { SET_DOUT_TO(0); }


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

x86 assembly (clang, -O2):
<SET_DOUT_LOW>:
xor    %edi,%edi
jmp    1030 <SET_DOUT_TO@plt>

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

LLVM IR (-O2):
define void @SET_DOUT_LOW() {
%1 = tail call i32 @SET_DOUT_TO(i32 0)
ret void
}
int symToInt(char ch) {
  if (ch < 'A')
    return ch - '1' + 1;
  else
    return ch - 'A' + 10;
}


x86 assembly (clang, -O0):
<symToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jge    1129 <symToInt+0x29>
movsbl -0x5(%rbp),%eax
sub    $0x31,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <symToInt+0x36>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symToInt>:
lea    -0x37(%rdi),%ecx
lea    -0x30(%rdi),%eax
cmp    $0x41,%dil
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @symToInt(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 65
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 49
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %17
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 65
%16 = add nsw i32 %15, 10
store i32 %16, i32* %2
br label %17
17: ; preds = %12, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @symToInt(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp slt i8 %0, 65
%4 = select i1 %3, i32 -48, i32 -55
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int volatile, int, int);
void main() {
  int i = 10;
  int j = i;
  int k = i;
  printf("i = %d,j = %d,k = %d\n", i, j, k);
  volatile int m = 12;
  int n = m;
  int o = m;
  printf("m = %d,n = %d,o = %d\n", m, n, o);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
movl   $0xc,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1030 <printf@plt>
movl   $0xc,0x4(%rsp)
mov    0x4(%rsp),%edx
mov    0x4(%rsp),%ecx
mov    0x4(%rsp),%esi
lea    0xecf(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"i = %d,j = %d,k = %d\0A\00"
@.str.1 = [22 x i8] c"m = %d,n = %d,o = %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 10, i32* %1
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %1
store i32 %8, i32* %3
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
store volatile i32 12, i32* %4
%13 = load volatile i32, i32* %4
store i32 %13, i32* %5
%14 = load volatile i32, i32* %4
store i32 %14, i32* %6
%15 = load volatile i32, i32* %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"i = %d,j = %d,k = %d\0A\00"
@.str.1 = [22 x i8] c"m = %d,n = %d,o = %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 10, i32 10, i32 10)
%3 = bitcast i32* %1 to i8*
store volatile i32 12, i32* %1
%4 = load volatile i32, i32* %1
%5 = load volatile i32, i32* %1
%6 = load volatile i32, i32* %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %4, i32 %5)
ret void
}
int test_imm_E4uint16_mem(unsigned short *val) {
  return ((*val) & (-0xE4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E4uint16_mem>:
movzwl (%rdi),%eax
test   $0xff1c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E4uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -228
%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_E4uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -228
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int execute_vhangup() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_vhangup() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  printf("%d %d \n", ++a, b--);
  printf("%d %d \n", a, b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
add    $0x1,%esi
mov    %esi,0xc(%rsp)
mov    0x8(%rsp),%edx
lea    -0x1(%rdx),%eax
mov    %eax,0x8(%rsp)
lea    0xeae(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

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


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

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

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

LLVM IR (-O2):
define void @d2i_PKCS7_bio() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ east_fill(unsigned long);
void east_fill_test(void **state) {
  assert_int_equal(east_fill(1ul), 0x00000000000000FFul);
}


x86 assembly (clang, -O0):
<east_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <east_fill@plt>
mov    %eax,%edi
mov    $0xff,%esi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<east_fill_test>:
push   %rax
mov    $0x1,%edi
call   1030 <east_fill@plt>
mov    %eax,%edi
mov    $0xff,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @east_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @east_fill(i64 1)
%4 = call i32 @assert_int_equal(i32 %3, i32 255)
ret void
}

LLVM IR (-O2):
define void @east_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @east_fill(i64 1)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 255)
ret void
}
int test_imm_D1uint8_mem(unsigned char *val) {
  return ((*val) & (0xD1 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D1uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 209
%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_D1uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -47
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __DSB();
int /*<<< orphan*/ __ISB();
int /*<<< orphan*/ __set_TLBIALL(int /*<<< orphan*/);
void MMU_InvalidateTLB(void) {
  __set_TLBIALL(0);
  __DSB();
  __ISB();
}


x86 assembly (clang, -O0):
<MMU_InvalidateTLB>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <__set_TLBIALL@plt>
mov    $0x0,%al
call   1040 <__DSB@plt>
mov    $0x0,%al
call   1030 <__ISB@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMU_InvalidateTLB>:
push   %rax
xor    %edi,%edi
call   1050 <__set_TLBIALL@plt>
xor    %eax,%eax
call   1040 <__DSB@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__ISB@plt>

LLVM IR (-O0):
define void @MMU_InvalidateTLB() {
%1 = call i32 @__set_TLBIALL(i32 0)
%2 = call i32 (...) @__DSB()
%3 = call i32 (...) @__ISB()
ret void
}

LLVM IR (-O2):
define void @MMU_InvalidateTLB() {
%1 = tail call i32 @__set_TLBIALL(i32 0)
%2 = tail call i32 (...) @__DSB()
%3 = tail call i32 (...) @__ISB()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
unsigned int foo(char *, unsigned int, int);
int main() {
  char c[16];
  if (foo(c, ~1U, 4) != (~0U / 5))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0xfffffffe,%esi
mov    $0x4,%edx
call   1040 <foo@plt>
cmp    $0x33333333,%eax
je     1164 <main+0x34>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %rsp,%rdi
mov    $0xfffffffe,%esi
mov    $0x4,%edx
call   1040 <foo@plt>
cmp    $0x33333333,%eax
jne    1154 <main+0x24>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @foo(i8* %3, i32 -2, i32 4)
%5 = icmp ne i32 %4, 858993459
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = call i32 @foo(i8* %2, i32 -2, i32 4)
%4 = icmp eq i32 %3, 858993459
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct tap_dec_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tap_dec_t *);
void tapdec_exit(struct tap_dec_t *tap) { free(tap); }


x86 assembly (clang, -O0):
<tapdec_exit>:
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):
<tapdec_exit>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.tap_dec_t = type { i32 }
define void @tapdec_exit(%struct.tap_dec_t* nocapture %0) {
%2 = tail call i32 @free(%struct.tap_dec_t* %0)
ret void
}
int test_and_clear_bit(int nr, volatile void *addr) {
  int oldbit;
  asm volatile(""
               "btrl %2,%1\n\tsbbl %0,%0"
               : "=r"(oldbit), "=m"((*(volatile long *)addr))
               : "Ir"(nr), "m"((*(volatile long *)addr))
               : "memory");
  return oldbit;
}


x86 assembly (clang, -O0):
<test_and_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rdx
btr    %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_and_clear_bit>:
btr    %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test_and_clear_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i64*
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
%11 = call i32 asm sideeffect "btrl $2,$1\0A\09sbbl $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %7, i32 %8, i64* elementtype(i64) %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_and_clear_bit(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i64*
%4 = tail call i32 asm sideeffect "btrl $2,$1\0A\09sbbl $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %3, i32 %0, i64* elementtype(i64) %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("ltr_extractor --extract | --create | --update [--spec file] file1 "
         "[file2 ...]\n");
}


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

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

LLVM IR (-O0):
@.str = [79 x i8] c"ltr_extractor --extract | --create | --update [--spec file] file1 [file2 ...]\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [78 x i8] c"ltr_extractor --extract | --create | --update [--spec file] file1 [file2 ...]\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str, i64 0, i64 0))
ret void
}
int c080(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c080() {
ret i32 0
}
char *getMonth() {}


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

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

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

LLVM IR (-O2):
define noalias i8* @getMonth() {
ret i8* undef
}