xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, int *);
int convertCharToInt(char *value) {
  int ret;
  sscanf(value, "%i", &ret);
  return ret;
}


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

x86 assembly (clang, -O2):
<convertCharToInt>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define i32 @convertCharToInt(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @convertCharToInt(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
int ld_blg_rc2(long double a1) { return !(__builtin_islessgreater(a1, 100)); }


x86 assembly (clang, -O0):
<ld_blg_rc2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fucomip %st(1),%st
fstp   %st(0)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blg_rc2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
sete   %al
ret

LLVM IR (-O0):
define i32 @ld_blg_rc2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp one x86_fp80 %3, 0xK4005C800000000000000
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_blg_rc2(x86_fp80 %0) {
%2 = fcmp ueq x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
char EOF;
char getchar();
int /*<<< orphan*/ putchar(char);
int main() {
  char ch;
  while ((ch = getchar()) != EOF) {
    if (ch != '\n') {
      ch -= 7;
    }
    putchar(ch);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
mov    0x2ea5(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1173 <main+0x53>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1165 <main+0x45>
movsbl -0x5(%rbp),%eax
sub    $0x7,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb7(%rip),%rbx
cmp    (%rbx),%al
je     115e <main+0x3e>
mov    $0xa,%ebp
nopw   0x0(%rax,%rax,1)
lea    -0x7(%rax),%ecx
cmp    $0xa,%al
movzbl %cl,%eax
cmove  %ebp,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%al
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i8 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %18, %0
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = sext i8 %4 to i32
%6 = load i8, i8* @EOF
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %5, %7
br i1 %8, label %9, label %21
9: ; preds = %3
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 10
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = sub nsw i32 %15, 7
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %18
18: ; preds = %13, %9
%19 = load i8, i8* %2
%20 = call i32 @putchar(i8 signext %19)
br label %3
21: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i8 0
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i8, i8* @EOF
%3 = icmp eq i8 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i8 [ %10, %4 ], [ %1, %0 ]
%6 = icmp eq i8 %5, 10
%7 = add i8 %5, -7
%8 = select i1 %6, i8 10, i8 %7
%9 = tail call i32 @putchar(i8 signext %8)
%10 = tail call signext i8 (...) @getchar()
%11 = load i8, i8* @EOF
%12 = icmp eq i8 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
ret i32 0
}
void short_wait() {
  int w;
  for (w = 0; w < 100; w++) {
    w++;
    w--;
  }
}


x86 assembly (clang, -O0):
<short_wait>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1135 <short_wait+0x35>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <short_wait+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @short_wait() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -1
store i32 %9, i32* %1
br label %10
10: ; preds = %5
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %2
13: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @short_wait() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_LAZY;
char *dlerror();
void *dlopen(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  void *handle = dlopen("dlltest.dylib", RTLD_LAZY);
  if (handle == NULL) {
    printf("error: %s\n", dlerror());
  } else {
    printf("success\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1050 <dlopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1180 <main+0x50>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    118e <main+0x5e>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
lea    0xeaf(%rip),%rdi
call   1060 <dlopen@plt>
test   %rax,%rax
je     1169 <main+0x29>
lea    0xeb7(%rip),%rdi
call   1040 <puts@plt>
jmp    1181 <main+0x41>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xe97(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"dlltest.dylib\00"
@RTLD_LAZY = global i32 0
@.str.1 = [11 x i8] c"error: %s\0A\00"
@.str.2 = [9 x i8] c"success\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = load i32, i32* @RTLD_LAZY
%4 = call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i8* (...) @dlerror()
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %12
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"dlltest.dylib\00"
@RTLD_LAZY = global i32 0
@.str.1 = [11 x i8] c"error: %s\0A\00"
@str = [8 x i8] c"success\00"
define i32 @main() {
%1 = load i32, i32* @RTLD_LAZY
%2 = tail call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i8* (...) @dlerror()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %5)
br label %9
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret i32 0
}
void XcmsRGBiToCIEXYZ() {}


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

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

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

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

/* Variables and functions */
int EDEADLK;
int /*<<< orphan*/ assert(int);
int pthread_mutex_lock(int /*<<< orphan*/ *);
int d_pthread_mutex_lock(pthread_mutex_t *mutex) {
  int err = pthread_mutex_lock(mutex);
  assert(err != EDEADLK);
  assert(err == 0);
  return 0;
}


x86 assembly (clang, -O0):
<d_pthread_mutex_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_mutex_lock@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ea6(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_pthread_mutex_lock>:
push   %rbx
call   1040 <pthread_mutex_lock@plt>
mov    %eax,%ebx
mov    0x2eb9(%rip),%rax
xor    %edi,%edi
cmp    (%rax),%ebx
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %ebx,%ebx
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EDEADLK = global i32 0
define i32 @d_pthread_mutex_lock(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @pthread_mutex_lock(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* @EDEADLK
%8 = icmp ne i32 %6, %7
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret i32 0
}

LLVM IR (-O2):
@EDEADLK = global i32 0
define i32 @d_pthread_mutex_lock(i32* %0) {
%2 = tail call i32 @pthread_mutex_lock(i32* %0)
%3 = load i32, i32* @EDEADLK
%4 = icmp ne i32 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp eq i32 %2, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main() {
  fclose(stdin);
  return 0;
}


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

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

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdin
%3 = call i32 @fclose(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @fclose(i32 %1)
ret i32 0
}
void usage(void) {}


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

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

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

LLVM IR (-O2):
define void @usage() {
ret void
}
int swiftpm_clibc_anchor() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @swiftpm_clibc_anchor() {
ret i32 0
}
/* Type definitions */
struct mtf_stream {
  int dummy;
};

/* Variables and functions */
unsigned int mtf_header_uint32(struct mtf_stream *, int);
unsigned long long mtf_header_offset(struct mtf_stream *s, int pos) {
  unsigned int u2[2];
  u2[0] = mtf_header_uint32(s, pos);
  u2[1] = mtf_header_uint32(s, pos + 4);
  return (unsigned long long)(((unsigned long long)u2[0]) |
                              (((unsigned long long)u2[1]) << 32));
}


x86 assembly (clang, -O0):
<mtf_header_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <mtf_header_uint32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x4,%esi
call   1030 <mtf_header_uint32@plt>
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtf_header_offset>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
call   1030 <mtf_header_uint32@plt>
mov    %eax,%ebp
add    $0x4,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <mtf_header_uint32@plt>
mov    %ebp,%ecx
shl    $0x20,%rax
or     %rcx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.mtf_stream = type { i32 }
define i64 @mtf_header_offset(%struct.mtf_stream* %0, i32 %1) {
%3 = alloca %struct.mtf_stream*
%4 = alloca i32
%5 = alloca [2 x i32]
store %struct.mtf_stream* %0, %struct.mtf_stream** %3
store i32 %1, i32* %4
%6 = load %struct.mtf_stream*, %struct.mtf_stream** %3
%7 = load i32, i32* %4
%8 = call i32 @mtf_header_uint32(%struct.mtf_stream* %6, i32 %7)
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %8, i32* %9
%10 = load %struct.mtf_stream*, %struct.mtf_stream** %3
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 4
%13 = call i32 @mtf_header_uint32(%struct.mtf_stream* %10, i32 %12)
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %13, i32* %14
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%16 = load i32, i32* %15
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%19 = load i32, i32* %18
%20 = zext i32 %19 to i64
%21 = shl i64 %20, 32
%22 = or i64 %17, %21
ret i64 %22
}

LLVM IR (-O2):
%struct.mtf_stream = type { i32 }
define i64 @mtf_header_offset(%struct.mtf_stream* %0, i32 %1) {
%3 = tail call i32 @mtf_header_uint32(%struct.mtf_stream* %0, i32 %1)
%4 = add nsw i32 %1, 4
%5 = tail call i32 @mtf_header_uint32(%struct.mtf_stream* %0, i32 %4)
%6 = zext i32 %3 to i64
%7 = zext i32 %5 to i64
%8 = shl nuw i64 %7, 32
%9 = or i64 %8, %6
ret i64 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int u_char;

/* Variables and functions */
uint32_t my_ntohl(uint32_t x) {
  u_char *s = (u_char *)&x;
  return (uint32_t)(s[3] << 24 | s[2] << 16 | s[1] << 8 | s[0]);
}


x86 assembly (clang, -O0):
<my_ntohl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
or     (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @my_ntohl(i32 %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ e_tya();
void e_tya_accu() { e_tya(); }


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

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

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

LLVM IR (-O2):
define void @e_tya_accu() {
%1 = tail call i32 (...) @e_tya()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void runAutostart(void) {
  system("cd ~/.dwm; ./autostart_blocking.sh");
  system("cd ~/.dwm; ./autostart.sh &");
}


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

x86 assembly (clang, -O2):
<runAutostart>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xeff(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"cd ~/.dwm; ./autostart_blocking.sh\00"
@.str.1 = [28 x i8] c"cd ~/.dwm; ./autostart.sh &\00"
define void @runAutostart() {
%1 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"cd ~/.dwm; ./autostart_blocking.sh\00"
@.str.1 = [28 x i8] c"cd ~/.dwm; ./autostart.sh &\00"
define void @runAutostart() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_frame(int, unsigned char const *, int, unsigned char);
int rx_thread_write_frame(int channel, const unsigned char *input, int length,
                          unsigned char type) {
  write_frame(channel, input, length, type);
  return length;
}


x86 assembly (clang, -O0):
<rx_thread_write_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movzbl -0x15(%rbp),%ecx
call   1030 <write_frame@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rx_thread_write_frame>:
push   %rbx
mov    %edx,%ebx
call   1030 <write_frame@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rx_thread_write_frame(i32 %0, i8* %1, i32 %2, i8 zeroext %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8, i8* %8
%13 = call i32 @write_frame(i32 %9, i8* %10, i32 %11, i8 zeroext %12)
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @rx_thread_write_frame(i32 %0, i8* %1, i32 returned %2, i8 zeroext %3) {
%5 = tail call i32 @write_frame(i32 %0, i8* %1, i32 %2, i8 zeroext %3)
ret i32 %2
}
void exit_idle(void) {}


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

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

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

LLVM IR (-O2):
define void @exit_idle() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x + y > 0) {
    x = x - 1;
    y = -2 * y;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x0,%eax
jle    115a <main+0x4a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
imul   $0xfffffffe,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %11, %0
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %2
%14 = load i32, i32* %3
%15 = mul nsw i32 -2, %14
store i32 %15, i32* %3
br label %6
16: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void ff_hevc_put_hevc_epel_hv48_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv48_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eventLoopInterrupt();
void eventLoop() {
head:
  eventLoopInterrupt();
  goto head;
}


x86 assembly (clang, -O0):
<eventLoop>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <eventLoop+0x9>
mov    $0x0,%al
call   1030 <eventLoopInterrupt@plt>
jmp    1119 <eventLoop+0x9>

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

LLVM IR (-O0):
define void @eventLoop() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @eventLoopInterrupt()
br label %1
}

LLVM IR (-O2):
define void @eventLoop() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @eventLoopInterrupt()
br label %1
}
int okn_tsm_sca(struct okn_tsm *t, struct okn_vec3f *v) { return 1; }


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

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

LLVM IR (-O0):
%struct.okn_tsm = type opaque
%struct.okn_vec3f = type opaque
define i32 @okn_tsm_sca(%struct.okn_tsm* %0, %struct.okn_vec3f* %1) {
%3 = alloca %struct.okn_tsm*
%4 = alloca %struct.okn_vec3f*
store %struct.okn_tsm* %0, %struct.okn_tsm** %3
store %struct.okn_vec3f* %1, %struct.okn_vec3f** %4
ret i32 1
}

LLVM IR (-O2):
%struct.okn_tsm = type opaque
%struct.okn_vec3f = type opaque
define i32 @okn_tsm_sca(%struct.okn_tsm* nocapture readnone %0, %struct.okn_vec3f* nocapture readnone %1) {
ret i32 1
}
unsigned int generic_hweight8(unsigned int w) {
  unsigned int res = (w & 0x55) + ((w >> 1) & 0x55);
  res = (res & 0x33) + ((res >> 2) & 0x33);
  return (res & 0x0F) + ((res >> 4) & 0x0F);
}


x86 assembly (clang, -O0):
<generic_hweight8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x33,%eax
mov    -0x8(%rbp),%ecx
shr    $0x2,%ecx
and    $0x33,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    -0x8(%rbp),%ecx
shr    $0x4,%ecx
and    $0xf,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generic_hweight8>:
mov    %edi,%eax
and    $0x55,%eax
shr    %edi
and    $0x55,%edi
add    %edi,%eax
mov    %eax,%ecx
and    $0x33,%ecx
shr    $0x2,%eax
and    $0xfffffff3,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0x7,%ecx
shr    $0x4,%eax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @generic_hweight8(i32 %0) {
%2 = and i32 %0, 85
%3 = lshr i32 %0, 1
%4 = and i32 %3, 85
%5 = add nuw nsw i32 %4, %2
%6 = and i32 %5, 51
%7 = lshr i32 %5, 2
%8 = and i32 %7, 51
%9 = add nuw nsw i32 %8, %6
%10 = and i32 %9, 7
%11 = lshr i32 %9, 4
%12 = add nuw nsw i32 %10, %11
ret i32 %12
}
/* Variables and functions */
size_t firstKeyHS(size_t value, size_t capacity) {
  return (capacity - 1) & (value >> 2);
}


x86 assembly (clang, -O0):
<firstKeyHS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    -0x8(%rbp),%rcx
shr    $0x2,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<firstKeyHS>:
lea    -0x1(%rsi),%rax
shr    $0x2,%rdi
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @firstKeyHS(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = sub i64 %5, 1
%7 = load i64, i64* %3
%8 = lshr i64 %7, 2
%9 = and i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @firstKeyHS(i64 %0, i64 %1) {
%3 = add i64 %1, 4611686018427387903
%4 = lshr i64 %0, 2
%5 = and i64 %3, %4
ret i64 %5
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
unsigned c2u(uint8_t c) { return (c >= 'a') ? (c - 'a' + 10) : (c - '0'); }


x86 assembly (clang, -O0):
<c2u>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <c2u+0x29>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <c2u+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c2u>:
lea    -0x30(%rdi),%ecx
lea    -0x57(%rdi),%eax
cmp    $0x61,%dil
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @c2u(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 97
%10 = add nsw i32 %9, 10
br label %15
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
br label %15
15: ; preds = %11, %6
%16 = phi i32 [ %10, %6 ], [ %14, %11 ]
ret i32 %16
}

LLVM IR (-O2):
define i32 @c2u(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp sgt i8 %0, 96
%4 = select i1 %3, i32 -87, i32 -48
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Type definitions */
struct animal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void animal_ops_eat(struct animal *animal) { printf("animal::eat()\n"); }


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

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

LLVM IR (-O0):
%struct.animal = type { i32 }
@.str = [15 x i8] c"animal::eat()\0A\00"
define void @animal_ops_eat(%struct.animal* %0) {
%2 = alloca %struct.animal*
store %struct.animal* %0, %struct.animal** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.animal = type { i32 }
@str = [14 x i8] c"animal::eat()\00"
define void @animal_ops_eat(%struct.animal* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ postO(struct TreeNode *, int *, int **);
int *postorderTraversal(struct TreeNode *root, int *returnSize) {
  int **returnArr = (int **)malloc(sizeof(int *));
  *returnArr = (int *)malloc(sizeof(int));
  *returnSize = 0;
  postO(root, returnSize, returnArr);
  return *returnArr;
}


x86 assembly (clang, -O0):
<postorderTraversal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <postO@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<postorderTraversal>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
movl   $0x0,(%r15)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <postO@plt>
mov    (%rbx),%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32* @postorderTraversal(%struct.TreeNode* %0, i32* %1) {
%3 = alloca %struct.TreeNode*
%4 = alloca i32*
%5 = alloca i32**
store %struct.TreeNode* %0, %struct.TreeNode** %3
store i32* %1, i32** %4
%6 = call i64 @malloc(i32 8)
%7 = inttoptr i64 %6 to i32**
store i32** %7, i32*** %5
%8 = call i64 @malloc(i32 4)
%9 = inttoptr i64 %8 to i32*
%10 = load i32**, i32*** %5
store i32* %9, i32** %10
%11 = load i32*, i32** %4
store i32 0, i32* %11
%12 = load %struct.TreeNode*, %struct.TreeNode** %3
%13 = load i32*, i32** %4
%14 = load i32**, i32*** %5
%15 = call i32 @postO(%struct.TreeNode* %12, i32* %13, i32** %14)
%16 = load i32**, i32*** %5
%17 = load i32*, i32** %16
ret i32* %17
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32* @postorderTraversal(%struct.TreeNode* %0, i32* %1) {
%3 = tail call i64 @malloc(i32 8)
%4 = inttoptr i64 %3 to i32**
%5 = tail call i64 @malloc(i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %4
store i32 0, i32* %1
%7 = tail call i32 @postO(%struct.TreeNode* %0, i32* %1, i32** %4)
%8 = load i32*, i32** %4
ret i32* %8
}
/* Variables and functions */
int /*<<< orphan*/ __cxx_global_var_init();
void _GLOBAL__I_a(void) {
  __cxx_global_var_init();
  return;
}


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

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

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

LLVM IR (-O2):
define void @_GLOBAL__I_a() {
%1 = tail call i32 (...) @__cxx_global_var_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_signal_done() {
  printf("NOT IMPLEMENTED:"
         "pa_signal_done"
         "\n");
}


x86 assembly (clang, -O0):
<pa_signal_done>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"NOT IMPLEMENTED:pa_signal_done\0A\00"
define i32 @pa_signal_done() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_signal_done\00"
define i32 @pa_signal_done() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Delete(void *l) {
  void *realptr = ((unsigned int *)l) - 1;
  free(realptr);
}


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

x86 assembly (clang, -O2):
<Delete>:
add    $0xfffffffffffffffc,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @Delete(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = getelementptr inbounds i32, i32* %5, i64 -1
%7 = bitcast i32* %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
define void @Delete(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -4
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int hashlib_current_fd(int fd) {
  static int cfd = (-1);
  if (fd == (-2)) {
    cfd = (-1);
    return (-2);
  }
  if (fd == (-1))
    assert(cfd != (-1));
  else
    cfd = fd;
  return cfd;
}


x86 assembly (clang, -O0):
<hashlib_current_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xfffffffe,-0x8(%rbp)
jne    113b <hashlib_current_fd+0x2b>
movl   $0xffffffff,0x2ef9(%rip)
ff ff ff
movl   $0xfffffffe,-0x4(%rbp)
jmp    1170 <hashlib_current_fd+0x60>
cmpl   $0xffffffff,-0x8(%rbp)
jne    115e <hashlib_current_fd+0x4e>
cmpl   $0xffffffff,0x2edc(%rip)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1167 <hashlib_current_fd+0x57>
mov    -0x8(%rbp),%eax
mov    %eax,0x2ec1(%rip)
mov    0x2ebb(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashlib_current_fd>:
push   %rax
cmp    $0xffffffff,%edi
je     112e <hashlib_current_fd+0x1e>
mov    %edi,%eax
cmp    $0xfffffffe,%edi
jne    1148 <hashlib_current_fd+0x38>
movl   $0xffffffff,0x2f01(%rip)
ff ff ff
mov    $0xfffffffe,%eax
pop    %rcx
ret
xor    %edi,%edi
cmpl   $0xffffffff,0x2ef1(%rip)
setne  %dil
call   1030 <assert@plt>
mov    0x2ee2(%rip),%eax
pop    %rcx
ret
mov    %eax,0x2eda(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@hashlib_current_fd.cfd = internal global i32 -1
define i32 @hashlib_current_fd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, -2
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* @hashlib_current_fd.cfd
store i32 -2, i32* %2
br label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* @hashlib_current_fd.cfd
%12 = icmp ne i32 %11, -1
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
br label %17
15: ; preds = %7
%16 = load i32, i32* %3
store i32 %16, i32* @hashlib_current_fd.cfd
br label %17
17: ; preds = %15, %10
%18 = load i32, i32* @hashlib_current_fd.cfd
store i32 %18, i32* %2
br label %19
19: ; preds = %17, %6
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@hashlib_current_fd.cfd = internal unnamed_addr global i32 -1
define i32 @hashlib_current_fd(i32 %0) {
switch i32 %0, label %9 [
i32 -2, label %2
i32 -1, label %3
]
2: ; preds = %1
store i32 -1, i32* @hashlib_current_fd.cfd
br label %10
3: ; preds = %1
%4 = load i32, i32* @hashlib_current_fd.cfd
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = load i32, i32* @hashlib_current_fd.cfd
br label %10
9: ; preds = %1
store i32 %0, i32* @hashlib_current_fd.cfd
br label %10
10: ; preds = %3, %9, %2
%11 = phi i32 [ -2, %2 ], [ %0, %9 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char *, char *);
void cap_tree(char *eol) {
  if (0 == strcmp(eol, ""))
    printf("\n");
}


x86 assembly (clang, -O0):
<cap_tree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1156 <cap_tree+0x36>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cap_tree>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1134 <cap_tree+0x14>
pop    %rax
ret
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"\0A\00"
define void @cap_tree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 0, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @cap_tree(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @putchar(i32 10)
br label %6
6: ; preds = %4, %1
ret void
}
void endpwent(void) {}


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

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

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

LLVM IR (-O2):
define void @endpwent() {
ret void
}
/* Variables and functions */
int afct(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("afct(2,10) =  %d\n", afct(2, 10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
mov    $0xa,%esi
call   1040 <afct@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0xa,%esi
call   1040 <afct@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"afct(2,10) = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @afct(i32 2, i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
size_t rgb332_sz(unsigned width, unsigned height) { return width * height; }


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

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

LLVM IR (-O0):
define i64 @rgb332_sz(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul i32 %5, %6
%8 = zext i32 %7 to i64
ret i64 %8
}

LLVM IR (-O2):
define i64 @rgb332_sz(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
%4 = zext i32 %3 to i64
ret i64 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void EPIDividerSet(uint32_t ui32Base, uint32_t ui32Divider) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000004))) = ui32Divider;
}


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

x86 assembly (clang, -O2):
<EPIDividerSet>:
mov    %rsi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @EPIDividerSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 4
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @EPIDividerSet(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 4
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
void pt_title_case(char *output, const char *input) { strcpy(output, input); }


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

x86 assembly (clang, -O2):
<pt_title_case>:
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @pt_title_case(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 = call i32 @strcpy(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @pt_title_case(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ ft_putwstr_fd(int /*<<< orphan*/ const *,
                                 int /*<<< orphan*/);
void ft_putwstr(wchar_t const *str) { ft_putwstr_fd(str, STDOUT_FILENO); }


x86 assembly (clang, -O0):
<ft_putwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
call   1030 <ft_putwstr_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putwstr>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ft_putwstr_fd@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @ft_putwstr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @STDOUT_FILENO
%5 = call i32 @ft_putwstr_fd(i32* %3, i32 %4)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @ft_putwstr(i32* %0) {
%2 = load i32, i32* @STDOUT_FILENO
%3 = tail call i32 @ft_putwstr_fd(i32* %0, i32 %2)
ret void
}
/* Type definitions */
struct clock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clock_destroy(struct clock *);
int /*<<< orphan*/ free(struct clock *);
void clock_delete(struct clock *__restrict c) {
  clock_destroy(c);
  free(c);
}


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

x86 assembly (clang, -O2):
<clock_delete>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clock_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.clock = type { i32 }
define void @clock_delete(%struct.clock* noalias %0) {
%2 = tail call i32 @clock_destroy(%struct.clock* %0)
%3 = tail call i32 @free(%struct.clock* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ report_error(char *);
void usage() {
  report_error("usage: %n "
               "[-acCdDef[num]gGhH<hashname>i<init>Ijk<keys>K<keyname>lnN<name>"
               "oprs<size>S<switches>tTv].\n(type %n -h for help)\n");
}


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

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

LLVM IR (-O0):
@.str = [123 x i8] c"usage: %n [-acCdDef[num]gGhH<hashname>i<init>Ijk<keys>K<keyname>lnN<name>oprs<size>S<switches>tTv].\0A(type %n -h for help)\0A\00"
define void @usage() {
%1 = call i32 @report_error(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [123 x i8] c"usage: %n [-acCdDef[num]gGhH<hashname>i<init>Ijk<keys>K<keyname>lnN<name>oprs<size>S<switches>tTv].\0A(type %n -h for help)\0A\00"
define void @usage() {
%1 = tail call i32 @report_error(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret void
}
int isprefix(char const *tip, char const *iceberg) {
  while (*tip) {
    if (*tip != *iceberg)
      return 0;
    tip++;
    iceberg++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isprefix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <isprefix+0x58>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     113b <isprefix+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    115f <isprefix+0x5f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <isprefix+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprefix>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1122 <isprefix+0x22>
xor    %edx,%edx
nopl   (%rax)
cmp    (%rsi,%rdx,1),%cl
jne    1123 <isprefix+0x23>
movzbl 0x1(%rdi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <isprefix+0x10>
ret
xor    %eax,%eax
ret

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

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


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

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

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

LLVM IR (-O2):
define i32 @f1() {
ret i32 undef
}