xunge/DecIR huggingface dataset:
int strcmp(const char *cs, const char *ct) {
  unsigned char c1, c2;
  while (1) {
    c1 = (unsigned char)*cs++;
    c2 = (unsigned char)*ct++;
    if (c1 != c2)
      return c1 < c2 ? -1 : 1;
    if (!c1)
      break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x1a(%rbp)
movzbl -0x19(%rbp),%eax
movzbl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
je     1163 <strcmp+0x63>
movzbl -0x19(%rbp),%edx
movzbl -0x1a(%rbp),%esi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    117e <strcmp+0x7e>
cmpb   $0x0,-0x19(%rbp)
jne    1172 <strcmp+0x72>
jmp    1177 <strcmp+0x77>
jmp    110c <strcmp+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
cmp    (%rsi,%rax,1),%cl
jne    1124 <strcmp+0x24>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcmp+0x10>
xor    %eax,%eax
ret
setae  %al
movzbl %al,%eax
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %8
8: ; preds = %2, %32
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %4
%11 = load i8, i8* %9
store i8 %11, i8* %6
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
%14 = load i8, i8* %12
store i8 %14, i8* %7
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = load i8, i8* %7
%18 = zext i8 %17 to i32
%19 = icmp ne i32 %16, %18
br i1 %19, label %20, label %28
20: ; preds = %8
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %7
%24 = zext i8 %23 to i32
%25 = icmp slt i32 %22, %24
%26 = zext i1 %25 to i64
%27 = select i1 %25, i32 -1, i32 1
store i32 %27, i32* %3
br label %34
28: ; preds = %8
%29 = load i8, i8* %6
%30 = icmp ne i8 %29, 0
br i1 %30, label %32, label %31
31: ; preds = %28
br label %33
32: ; preds = %28
br label %8
33: ; preds = %31
store i32 0, i32* %3
br label %34
34: ; preds = %33, %20
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %12, %2
%4 = phi i8* [ %1, %2 ], [ %13, %12 ]
%5 = phi i8* [ %0, %2 ], [ %14, %12 ]
%6 = load i8, i8* %5
%7 = load i8, i8* %4
%8 = icmp eq i8 %6, %7
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = icmp ult i8 %6, %7
%11 = select i1 %10, i32 -1, i32 1
br label %16
12: ; preds = %3
%13 = getelementptr inbounds i8, i8* %4, i64 1
%14 = getelementptr inbounds i8, i8* %5, i64 1
%15 = icmp eq i8 %6, 0
br i1 %15, label %16, label %3
16: ; preds = %12, %9
%17 = phi i32 [ %11, %9 ], [ 0, %12 ]
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ _IOFBF;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           size_t);
void setbuffer(FILE *stream, char *buf, size_t size) {
  setvbuf(stream, buf, buf ? _IOFBF : _IONBF, size);
}


x86 assembly (clang, -O0):
<setbuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1150 <setbuffer+0x40>
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
jmp    115c <setbuffer+0x4c>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <setvbuf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbuffer>:
mov    %rdx,%rcx
test   %rsi,%rsi
jne    1126 <setbuffer+0x16>
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <setvbuf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
jmp    1030 <setvbuf@plt>

LLVM IR (-O0):
@_IOFBF = global i32 0
@_IONBF = global i32 0
define void @setbuffer(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load i32, i32* @_IOFBF
br label %15
13: ; preds = %3
%14 = load i32, i32* @_IONBF
br label %15
15: ; preds = %13, %11
%16 = phi i32 [ %12, %11 ], [ %14, %13 ]
%17 = load i64, i64* %6
%18 = call i32 @setvbuf(i32* %7, i8* %8, i32 %16, i64 %17)
ret void
}

LLVM IR (-O2):
@_IOFBF = global i32 0
@_IONBF = global i32 0
define void @setbuffer(i32* nocapture %0, i8* %1, i64 %2) {
%4 = icmp eq i8* %1, null
%5 = load i32, i32* @_IOFBF
%6 = load i32, i32* @_IONBF
%7 = select i1 %4, i32 %6, i32 %5
%8 = tail call i32 @setvbuf(i32* %0, i8* %1, i32 %7, i64 %2)
ret void
}
int main() {
  int a, b;
  a = b + b + b + b + b + b + b + b;
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 undef
}
/* Variables and functions */
char *get_long_arg_from_pointer_malloc_ptr(int /*<<< orphan*/);
int /*<<< orphan*/ get_pointer_to_arg_ptr(char *, int);
char *get_long_arg_malloc_ptr(char *input_ptr, int arg) {
  return get_long_arg_from_pointer_malloc_ptr(
      get_pointer_to_arg_ptr(input_ptr, arg));
}


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

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

LLVM IR (-O0):
define i8* @get_long_arg_malloc_ptr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @get_pointer_to_arg_ptr(i8* %5, i32 %6)
%8 = call i8* @get_long_arg_from_pointer_malloc_ptr(i32 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @get_long_arg_malloc_ptr(i8* %0, i32 %1) {
%3 = tail call i32 @get_pointer_to_arg_ptr(i8* %0, i32 %1)
%4 = tail call i8* @get_long_arg_from_pointer_malloc_ptr(i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ emsRlse();
void errRlse(void) { emsRlse(); }


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

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

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

LLVM IR (-O2):
define void @errRlse() {
%1 = tail call i32 (...) @emsRlse()
ret void
}
void fp_force_eval(double x) {}


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

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

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

LLVM IR (-O2):
define void @fp_force_eval(double %0) {
ret void
}
void jogada() {}


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

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

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

LLVM IR (-O2):
define void @jogada() {
ret void
}
/* Type definitions */
struct RgbPixel {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct RgbPixel *);
void deallocateMemory(struct RgbPixel **data) {
  free(*data);
  *data = NULL;
}


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

x86 assembly (clang, -O2):
<deallocateMemory>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.RgbPixel = type { i32 }
define void @deallocateMemory(%struct.RgbPixel** nocapture %0) {
%2 = load %struct.RgbPixel*, %struct.RgbPixel** %0
%3 = tail call i32 @free(%struct.RgbPixel* %2)
store %struct.RgbPixel* null, %struct.RgbPixel** %0
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int main() {
  unsigned short first = 52130;
  long second = 8942492113;
  char third = 115;
  unsigned int fourth = 4825932;
  char fifth = 97;
  short sixth = -10000;
  long long seventh = -35982859328592389;
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movw   $0xcba2,-0x6(%rbp)
movabs $0x2150399d1,%rax
mov    %rax,-0x10(%rbp)
movb   $0x73,-0x11(%rbp)
movl   $0x49a34c,-0x18(%rbp)
movb   $0x61,-0x19(%rbp)
movw   $0xd8f0,-0x1c(%rbp)
movabs $0xff8029c7b3b765fb,%rax
29 80 ff
mov    %rax,-0x28(%rbp)
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i64
%4 = alloca i8
%5 = alloca i32
%6 = alloca i8
%7 = alloca i16
%8 = alloca i64
store i32 0, i32* %1
store i16 -13406, i16* %2
store i64 8942492113, i64* %3
store i8 115, i8* %4
store i32 4825932, i32* %5
store i8 97, i8* %6
store i16 -10000, i16* %7
store i64 -35982859328592389, i64* %8
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @EXIT_SUCCESS
ret i32 %1
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double acoshl(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<acoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @acoshl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @acoshl(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Type definitions */
struct sudirriber {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroyRemoteWriter();
int /*<<< orphan*/ endRemoteWriter(struct sudirriber *);
void newEndRemoteWriter(struct sudirriber *sub) {
  endRemoteWriter(sub);
  destroyRemoteWriter();
}


x86 assembly (clang, -O0):
<newEndRemoteWriter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <endRemoteWriter@plt>
mov    $0x0,%al
call   1030 <destroyRemoteWriter@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newEndRemoteWriter>:
push   %rax
call   1040 <endRemoteWriter@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <destroyRemoteWriter@plt>

LLVM IR (-O0):
%struct.sudirriber = type { i32 }
define void @newEndRemoteWriter(%struct.sudirriber* %0) {
%2 = alloca %struct.sudirriber*
store %struct.sudirriber* %0, %struct.sudirriber** %2
%3 = load %struct.sudirriber*, %struct.sudirriber** %2
%4 = call i32 @endRemoteWriter(%struct.sudirriber* %3)
%5 = call i32 (...) @destroyRemoteWriter()
ret void
}

LLVM IR (-O2):
%struct.sudirriber = type { i32 }
define void @newEndRemoteWriter(%struct.sudirriber* %0) {
%2 = tail call i32 @endRemoteWriter(%struct.sudirriber* %0)
%3 = tail call i32 (...) @destroyRemoteWriter()
ret void
}
int litbitchar(unsigned char a) {
  register unsigned char b = a + 1;
  if (b & 0x01)
    return (0);
  else if (b & 0x04)
    return (1);
  else if (b & 0x20)
    return (2);
  else
    return (3);
}


x86 assembly (clang, -O0):
<litbitchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x6(%rbp)
movzbl -0x6(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1130 <litbitchar+0x30>
movl   $0x0,-0x4(%rbp)
jmp    116f <litbitchar+0x6f>
movzbl -0x6(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     114c <litbitchar+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    116f <litbitchar+0x6f>
movzbl -0x6(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1168 <litbitchar+0x68>
movl   $0x2,-0x4(%rbp)
jmp    116f <litbitchar+0x6f>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<litbitchar>:
add    $0x1,%dil
xor    %eax,%eax
test   $0x1,%dil
jne    1123 <litbitchar+0x23>
mov    $0x1,%eax
test   $0x4,%dil
jne    1123 <litbitchar+0x23>
xor    %eax,%eax
test   $0x20,%dil
sete   %al
or     $0x2,%eax
ret

LLVM IR (-O0):
define i32 @litbitchar(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = add nsw i32 %6, 1
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %1
store i32 0, i32* %2
br label %27
14: ; preds = %1
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = and i32 %16, 4
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %14
store i32 1, i32* %2
br label %27
20: ; preds = %14
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = and i32 %22, 32
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %20
store i32 2, i32* %2
br label %27
26: ; preds = %20
store i32 3, i32* %2
br label %27
27: ; preds = %26, %25, %19, %13
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @litbitchar(i8 zeroext %0) {
%2 = add i8 %0, 1
%3 = zext i8 %2 to i32
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = and i32 %3, 4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = and i32 %3, 32
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i32 3, i32 2
br label %13
13: ; preds = %9, %6, %1
%14 = phi i32 [ 0, %1 ], [ 1, %6 ], [ %12, %9 ]
ret i32 %14
}
int atomic_compare_and_swap(int *ptr, int oldValue, int newValue) {
  return __sync_val_compare_and_swap(ptr, oldValue, newValue);
}


x86 assembly (clang, -O0):
<atomic_compare_and_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_compare_and_swap>:
mov    %esi,%eax
lock cmpxchg %edx,(%rdi)
ret

LLVM IR (-O0):
define i32 @atomic_compare_and_swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = cmpxchg i32* %7, i32 %8, i32 %9 seq_cst seq_cst
%11 = extractvalue { i32, i1 } %10, 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @atomic_compare_and_swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = cmpxchg i32* %0, i32 %1, i32 %2 seq_cst seq_cst
%5 = extractvalue { i32, i1 } %4, 0
ret i32 %5
}
int test_imm_72int8_reg(signed char val) {
  return ((val) & (0x72 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_72int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 114
%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_72int8_reg(i8 signext %0) {
%2 = and i8 %0, 114
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ anykey();
int /*<<< orphan*/ screen_feature_roff(int);
void feat_lore(int oid) {
  screen_feature_roff(oid);
  anykey();
}


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

x86 assembly (clang, -O2):
<feat_lore>:
push   %rax
call   1040 <screen_feature_roff@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <anykey@plt>

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

LLVM IR (-O2):
define void @feat_lore(i32 %0) {
%2 = tail call i32 @screen_feature_roff(i32 %0)
%3 = tail call i32 (...) @anykey()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displayWinner(int, int, int);
int generateDecision();
int getWinner(int, int);
void gameMangerMain(int playerChoice) {
  int AIChoice = generateDecision();
  int winner = getWinner(playerChoice, AIChoice);
  displayWinner(winner, playerChoice, AIChoice);
}


x86 assembly (clang, -O0):
<gameMangerMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <generateDecision@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <getWinner@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1050 <displayWinner@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gameMangerMain>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <generateDecision@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <getWinner@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <displayWinner@plt>

LLVM IR (-O0):
define void @gameMangerMain(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (...) @generateDecision()
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @getWinner(i32 %6, i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @displayWinner(i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @gameMangerMain(i32 %0) {
%2 = tail call i32 (...) @generateDecision()
%3 = tail call i32 @getWinner(i32 %0, i32 %2)
%4 = tail call i32 @displayWinner(i32 %3, i32 %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ noecho();
int qiDisableEcho(void) {
  noecho();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @qiDisableEcho() {
%1 = call i32 (...) @noecho()
ret i32 0
}

LLVM IR (-O2):
define i32 @qiDisableEcho() {
%1 = tail call i32 (...) @noecho()
ret i32 0
}
void *test_anti_range_69(unsigned long n) {
  extern void *alloc_anti_range_69(unsigned long)
      __attribute__((alloc_size(1)));
  if (0 <= n && n <= 0)
    n = 0 - 1;
  return alloc_anti_range_69(n);
}


x86 assembly (clang, -O0):
<test_anti_range_69>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
ja     113b <test_anti_range_69+0x2b>
cmpq   $0x0,-0x8(%rbp)
ja     113b <test_anti_range_69+0x2b>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_69@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_69>:
cmp    $0x1,%rdi
sbb    %rax,%rax
or     %rax,%rdi
jmp    1030 <alloc_anti_range_69@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_69(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 -1, i64 %0
%4 = tail call i8* @alloc_anti_range_69(i64 %3)
ret i8* %4
}
void ff_hevc_put_hevc_qpel_hv8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv8_10_sse4() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int sort_by_number(const void *a, const void *b) {
  return *(uint32_t *)a - *(uint32_t *)b;
}


x86 assembly (clang, -O0):
<sort_by_number>:
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):
<sort_by_number>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @sort_by_number(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @sort_by_number(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
char *strchr(char *, char);
void iCstrip(char *line) {
  char *c;
  if ((c = strchr(line, '\n')))
    *c = '\0';
  if ((c = strchr(line, '\r')))
    *c = '\0';
}


x86 assembly (clang, -O0):
<iCstrip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     113f <iCstrip+0x2f>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    $0xd,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1162 <iCstrip+0x52>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iCstrip>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1126 <iCstrip+0x16>
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    $0xd,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     113b <iCstrip+0x2b>
movb   $0x0,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @iCstrip(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
%6 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 13)
%7 = icmp eq i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %5
store i8 0, i8* %6
br label %9
9: ; preds = %8, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void calc3_error(int regs[26], int *base, const char *s) {
  ((void)(regs));
  ((void)(base));
  fprintf(stderr, "%s\n", s);
}


x86 assembly (clang, -O0):
<calc3_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc3_error>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @calc3_error(i32* nocapture readnone %0, i32* nocapture readnone %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
int *find_ptr(int *mem, int sz, int val) {
  for (int i = 0; i < sz; i++)
    if (mem[i] == val)
      return &mem[i];
  return 0;
}


x86 assembly (clang, -O0):
<find_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1160 <find_ptr+0x60>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    114d <find_ptr+0x4d>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <find_ptr+0x68>
jmp    1152 <find_ptr+0x52>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <find_ptr+0x15>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_ptr>:
test   %esi,%esi
jle    111e <find_ptr+0x1e>
mov    %rdi,%rax
mov    %esi,%ecx
nopl   0x0(%rax)
cmp    %edx,(%rax)
je     1120 <find_ptr+0x20>
add    $0x4,%rax
add    $0xffffffffffffffff,%rcx
jne    1110 <find_ptr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32* @find_ptr(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %18, label %7
15: ; preds = %7
%16 = and i64 %8, 4294967295
%17 = getelementptr inbounds i32, i32* %0, i64 %16
br label %18
18: ; preds = %12, %3, %15
%19 = phi i32* [ %17, %15 ], [ null, %3 ], [ null, %12 ]
ret i32* %19
}
void Load_Music(const char *directory) {}


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

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

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

LLVM IR (-O2):
define void @Load_Music(i8* nocapture %0) {
ret void
}
int my_proc_info(int i) {}


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

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

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

LLVM IR (-O2):
define i32 @my_proc_info(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ add_word(unsigned short);
unsigned short as_none(unsigned short oc) {
  add_word(oc);
  return 1;
}


x86 assembly (clang, -O0):
<as_none>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <add_word@plt>
mov    $0x1,%ax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @as_none(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @add_word(i16 zeroext %3)
ret i16 1
}

LLVM IR (-O2):
define zeroext i16 @as_none(i16 zeroext %0) {
%2 = tail call i32 @add_word(i16 zeroext %0)
ret i16 1
}
char int_equals(const void *o1, const void *o2) { return o1 == o2; }


x86 assembly (clang, -O0):
<int_equals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_equals>:
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define signext i8 @int_equals(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @int_equals(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i8
ret i8 %4
}
void f(void g(int)) { g(1); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %rdi,%rax
mov    $0x1,%edi
jmp    *%rax

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

LLVM IR (-O2):
define void @f(void (i32)* nocapture %0) {
tail call void %0(i32 1)
ret void
}
void searchpath_destroy(char **searchpath, int length) {
  int i;
  for (i = 0; i < length; i++)
    free(searchpath[i]);
  free(searchpath);
}


x86 assembly (clang, -O0):
<searchpath_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <searchpath_destroy+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <searchpath_destroy+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<searchpath_destroy>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <searchpath_destroy+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <searchpath_destroy+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @searchpath_destroy(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core2_print(char *, char const *);
void U_EMRPOLYPOLYLINE_print(const char *contents) {
  core2_print("U_EMRPOLYPOLYLINE", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYPOLYLINE_print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <core2_print@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"U_EMRPOLYPOLYLINE\00"
define void @U_EMRPOLYPOLYLINE_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core2_print(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"U_EMRPOLYPOLYLINE\00"
define void @U_EMRPOLYPOLYLINE_print(i8* %0) {
%2 = tail call i32 @core2_print(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ refresh();
int main(void) {
  initscr();
  printw("Hello World!\n");
  refresh();
  getchar();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
lea    0xe93(%rip),%rdi
call   1050 <printw@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1070 <endwin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initscr@plt>
lea    0xea1(%rip),%rdi
call   1050 <printw@plt>
xor    %eax,%eax
call   1060 <refresh@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
call   1070 <endwin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initscr()
%3 = call i32 @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @refresh()
%5 = call i32 (...) @getchar()
%6 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @refresh()
%4 = tail call i32 (...) @getchar()
%5 = tail call i32 (...) @endwin()
ret i32 0
}
void port_disable(void) {}


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

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

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

LLVM IR (-O2):
define void @port_disable() {
ret void
}
int test_imm_FEuint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xFE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FEuint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0xfe,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FEuint64_midword_reg>:
test   $0xfe0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FEuint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 254
%6 = icmp ne i64 %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_FEuint64_midword_reg(i64 %0) {
%2 = and i64 %0, 16646144
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void g_list_last() {}


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

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

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

LLVM IR (-O2):
define void @g_list_last() {
ret void
}
const char *db_show_standingdata_report_sql(void) {
  static const char *query = "SELECT"
                             "  organization AS 'Organization',"
                             "  current_year AS 'Current Year',"
                             "  current_period AS 'Current Period',"
                             "  num_periods AS 'Number Periods'"
                             "  FROM standing_data"
                             "  ORDER BY organization";
  return query;
}


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

x86 assembly (clang, -O2):
<db_show_standingdata_report_sql>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@db_show_standingdata_report_sql.query = internal global i8* getelementptr inbounds ([186 x i8], [186 x i8]* @.str, i32 0, i32 0)
@.str = [186 x i8] c"SELECT organization AS 'Organization', current_year AS 'Current Year', current_period AS 'Current Period', num_periods AS 'Number Periods' FROM standing_data ORDER BY organization\00"
define i8* @db_show_standingdata_report_sql() {
%1 = load i8*, i8** @db_show_standingdata_report_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [186 x i8] c"SELECT organization AS 'Organization', current_year AS 'Current Year', current_period AS 'Current Period', num_periods AS 'Number Periods' FROM standing_data ORDER BY organization\00"
define i8* @db_show_standingdata_report_sql() {
ret i8* getelementptr inbounds ([186 x i8], [186 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int htonl(int);
const int isNetworkByteOrder() {
  const int bIsNetworkByteOrder = 1 == htonl(1);
  return bIsNetworkByteOrder;
}


x86 assembly (clang, -O0):
<isNetworkByteOrder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <htonl@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNetworkByteOrder>:
push   %rax
mov    $0x1,%edi
call   1030 <htonl@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isNetworkByteOrder() {
%1 = alloca i32
%2 = call i32 @htonl(i32 1)
%3 = icmp eq i32 1, %2
%4 = zext i1 %3 to i32
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @isNetworkByteOrder() {
%1 = tail call i32 @htonl(i32 1)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pll_setup_gpio();
int /*<<< orphan*/ pll_setup_interconnect();
int /*<<< orphan*/ pll_setup_timers();
int /*<<< orphan*/ pll_setup_uart();
int /*<<< orphan*/ pll_setup_wkup();
void pll_setup(void) {
  pll_setup_interconnect();
  pll_setup_wkup();
  pll_setup_timers();
  pll_setup_gpio();
  pll_setup_uart();
}


x86 assembly (clang, -O0):
<pll_setup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <pll_setup_interconnect@plt>
mov    $0x0,%al
call   1040 <pll_setup_wkup@plt>
mov    $0x0,%al
call   1060 <pll_setup_timers@plt>
mov    $0x0,%al
call   1030 <pll_setup_gpio@plt>
mov    $0x0,%al
call   1070 <pll_setup_uart@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pll_setup>:
push   %rax
xor    %eax,%eax
call   1050 <pll_setup_interconnect@plt>
xor    %eax,%eax
call   1040 <pll_setup_wkup@plt>
xor    %eax,%eax
call   1060 <pll_setup_timers@plt>
xor    %eax,%eax
call   1030 <pll_setup_gpio@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <pll_setup_uart@plt>

LLVM IR (-O0):
define void @pll_setup() {
%1 = call i32 (...) @pll_setup_interconnect()
%2 = call i32 (...) @pll_setup_wkup()
%3 = call i32 (...) @pll_setup_timers()
%4 = call i32 (...) @pll_setup_gpio()
%5 = call i32 (...) @pll_setup_uart()
ret void
}

LLVM IR (-O2):
define void @pll_setup() {
%1 = tail call i32 (...) @pll_setup_interconnect()
%2 = tail call i32 (...) @pll_setup_wkup()
%3 = tail call i32 (...) @pll_setup_timers()
%4 = tail call i32 (...) @pll_setup_gpio()
%5 = tail call i32 (...) @pll_setup_uart()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reverse(char *);
int main(int argc, const char *argv[]) {
  printf("Hello, World!\n");
  char *str = "Hello, World!";
  reverse(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <reverse@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
@.str.1 = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @reverse(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @reverse(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ USARTPutc(char);
void puts(char *message) {
  char *ch = message;
  while (*ch) {
    USARTPutc(*ch);
    ch++;
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <puts+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <USARTPutc@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <puts+0x14>
add    $0x10,%rsp
pop    %rbp
ret

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

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

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