xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int atoi(char *);
char *strrchr(char *, char);
uint8_t parse_subnet(char *addr) {
  char *slash = strrchr(addr, '/');
  uint8_t subnet = 32;
  if (!slash)
    goto cleanup;
  *(slash++) = '\0';
  subnet = atoi(slash);
cleanup:
  return subnet;
}


x86 assembly (clang, -O0):
<parse_subnet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
movl   $0x20,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <parse_subnet+0x35>
jmp    1173 <parse_subnet+0x53>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_subnet>:
push   %rax
mov    $0x2f,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1140 <parse_subnet+0x20>
mov    %rax,%rdi
add    $0x1,%rdi
movb   $0x0,(%rax)
pop    %rax
jmp    1040 <atoi@plt>
mov    $0x20,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @parse_subnet(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
store i8 0, i8* %2
%6 = tail call i32 @atoi(i8* %5)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 32, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char, unsigned char, double);
char *dtostrf(double val, signed char width, unsigned char prec, char *s) {
  sprintf(s, "%*.*f", width, prec, val);
  return s;
}


x86 assembly (clang, -O0):
<dtostrf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %dil,%cl
movsd  %xmm0,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x9(%rbp),%cl
mov    -0xa(%rbp),%al
movsd  -0x8(%rbp),%xmm0
lea    0xebd(%rip),%rsi
movsbl %cl,%edx
movzbl %al,%ecx
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtostrf>:
push   %rbx
mov    %rdx,%rbx
mov    %esi,%ecx
mov    %edi,%edx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%*.*f\00"
define i8* @dtostrf(double %0, i8 signext %1, i8 zeroext %2, i8* %3) {
%5 = alloca double
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8*
store double %0, double* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = load i8, i8* %6
%11 = load i8, i8* %7
%12 = load double, double* %5
%13 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext %10, i8 zeroext %11, double %12)
%14 = load i8*, i8** %8
ret i8* %14
}

LLVM IR (-O2):
@.str = [6 x i8] c"%*.*f\00"
define i8* @dtostrf(double %0, i8 signext %1, i8 zeroext %2, i8* returned writeonly %3) {
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext %1, i8 zeroext %2, double %0)
ret i8* %3
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int a, b;
  a = atoi(argv[1]);
  b = atoi(argv[2]);
  if (a > b) {
    ;
    printf("%d\n", 0);
  } else {
    printf("%d\n", 1);
  }
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1175 <main+0x55>
lea    0xe97(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
jmp    1186 <main+0x66>
lea    0xe84(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
xor    %esi,%esi
cmp    %eax,%ebp
setle  %sil
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %6
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %7
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
br label %23
21: ; preds = %2
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
br label %23
23: ; preds = %21, %19
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = icmp sle i32 %5, %8
%10 = zext i1 %9 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ guiclose_();
void guiclose(void) { guiclose_(); }


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

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

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

LLVM IR (-O2):
define void @guiclose() {
%1 = tail call i32 (...) @guiclose_()
ret void
}
__attribute__((no, noclone)) signed __int128 t112_5sub(signed __int128 x) {
  signed __int128 r;
  if (__builtin_sub_overflow(x, (signed __int128)(0), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t112_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
xor    %eax,%eax
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    114f <t112_5sub+0x3f>
jmp    1156 <t112_5sub+0x46>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define { i64, i64 } @t112_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 %11, i128 0)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t112_5sub(i64 %0, i64 %1) {
%3 = insertvalue { i64, i64 } poison, i64 %0, 0
%4 = insertvalue { i64, i64 } %3, i64 %1, 1
ret { i64, i64 } %4
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ a();
int /*<<< orphan*/ b();
int fork();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
int main() {
  a();
  int p = fork();
  if (!p) {
    printf("id=%d\n", p);
    b();
    _exit(0);
  } else {
    printf("id=%d\n", p);
  }
  wait(NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <a@plt>
mov    $0x0,%al
call   1080 <fork@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    11a7 <main+0x47>
mov    -0x8(%rbp),%esi
lea    0xe6c(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <b@plt>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%esi
lea    0xe4f(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <wait@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <a@plt>
xor    %eax,%eax
call   1080 <fork@plt>
lea    0xe8a(%rip),%rdi
test   %eax,%eax
je     118c <main+0x2c>
mov    %eax,%esi
call   1050 <printf@plt>
xor    %edi,%edi
call   1070 <wait@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %esi,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <b@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"id=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @a()
%4 = call i32 (...) @fork()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 (...) @b()
%11 = call i32 @_exit(i32 0)
unreachable
12: ; preds = %0
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %12
%16 = call i32 @wait(i32* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"id=%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @fork()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0)
%6 = tail call i32 (...) @b()
%7 = tail call i32 @_exit(i32 0)
unreachable
8: ; preds = %0
%9 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2)
%10 = tail call i32 @wait(i32* null)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm256_storeu2_m128i(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/ *,
                                        int /*<<< orphan*/);
void test_mm256_storeu2_m128i(__m128i *A, __m128i *B, __m256i C) {
  _mm256_storeu2_m128i(A, B, C);
}


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

x86 assembly (clang, -O2):
<test_mm256_storeu2_m128i>:
jmp    1030 <_mm256_storeu2_m128i@plt>

LLVM IR (-O0):
define void @test_mm256_storeu2_m128i(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 = call i32 @_mm256_storeu2_m128i(i32* %7, i32* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @test_mm256_storeu2_m128i(i32* %0, i32* %1, i32 %2) {
%4 = tail call i32 @_mm256_storeu2_m128i(i32* %0, i32* %1, i32 %2)
ret void
}
void GfxDrv_EndDrawing() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int getcontext(ucontext_t *ucp) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<getcontext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcontext>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @getcontext(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @getcontext(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
void g_slist_pop_allocator() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_pop_allocator() {
ret void
}
/* Variables and functions */
void free(void *);
void HxFree(void *p) { return free(p); }


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

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

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

LLVM IR (-O2):
define void @HxFree(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
unsigned int read_UInt16Number(char *p) {
  unsigned int rv;
  rv = 256 * (unsigned int)((unsigned char *)p)[0] +
       (unsigned int)((unsigned char *)p)[1];
  return rv;
}


x86 assembly (clang, -O0):
<read_UInt16Number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_UInt16Number>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @read_UInt16Number(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = mul i32 256, %7
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = add i32 %8, %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @read_UInt16Number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
void Log_flushlog(void) {}


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

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

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

LLVM IR (-O2):
define void @Log_flushlog() {
ret void
}
/* Variables and functions */
double errcheck(int /*<<< orphan*/, char *);
int /*<<< orphan*/ log(double);
double Log(double *args) { return errcheck(log(*args), "log"); }


x86 assembly (clang, -O0):
<Log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
lea    0xebe(%rip),%rsi
call   1030 <errcheck@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Log>:
push   %rax
movsd  (%rdi),%xmm0
call   1040 <log@plt>
lea    0xecf(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <errcheck@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"log\00"
define double @Log(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call i32 @log(double %2)
%4 = tail call double @errcheck(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret double %4
}
int create_mode() {}


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

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

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

LLVM IR (-O2):
define i32 @create_mode() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void PrintError(const char *error) { fprintf(stderr, "Error: %s\n", error); }


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

x86 assembly (clang, -O2):
<PrintError>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @PrintError(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int wakeup_source_gic_add_irq(unsigned int irq) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @wakeup_source_gic_add_irq(i32 %0) {
ret i32 0
}
unsigned char f56(unsigned char x, long int y) {
  return (x << (8 - y)) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f56>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x8,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f56>:
mov    $0x8,%cl
sub    %sil,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f56(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = sub nsw i64 8, %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %6, %9
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = load i64, i64* %4
%14 = trunc i64 %13 to i32
%15 = ashr i32 %12, %14
%16 = xor i32 %10, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f56(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 8, %4
%6 = shl i32 %3, %5
%7 = lshr i32 %3, %4
%8 = xor i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Variables and functions */
scalar_t__ isalnum(int);
scalar_t__ isalpha(int);
int symbol_char(int chr, int first) {
  return (first ? isalpha(chr) : isalnum(chr)) || chr == '_';
}


x86 assembly (clang, -O0):
<symbol_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1157 <symbol_char+0x37>
mov    -0x4(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    117b <symbol_char+0x5b>
jmp    1171 <symbol_char+0x51>
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    117b <symbol_char+0x5b>
cmpl   $0x5f,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbol_char>:
push   %rbx
mov    %edi,%ebx
test   %esi,%esi
je     112e <symbol_char+0xe>
call   1040 <isalpha@plt>
jmp    1133 <symbol_char+0x13>
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1142 <symbol_char+0x22>
pop    %rbx
ret
xor    %eax,%eax
cmp    $0x5f,%ebx
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @symbol_char(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i64 @isalpha(i32 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %13
7: ; preds = %2
%8 = tail call i64 @isalnum(i32 %0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7, %4
%11 = icmp eq i32 %0, 95
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %7, %4
%14 = phi i32 [ 1, %7 ], [ 1, %4 ], [ %12, %10 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ e();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, const char *argv[]) {
  printf("The value of e is : %.10Lf\n", e());
  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    $0x0,%al
call   1040 <e@plt>
mov    %eax,%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [28 x i8] c"The value of e is : %.10Lf\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 (...) @e()
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"The value of e is : %.10Lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @e()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int get_iat_number(int el_number, const int el_num[], int el_num_len) {
  int i;
  for (i = 0; i < el_num_len; i++) {
    if (el_num[i] == el_number)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<get_iat_number>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1153 <get_iat_number+0x53>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x8(%rbp),%eax
jne    1140 <get_iat_number+0x40>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <get_iat_number+0x5a>
jmp    1145 <get_iat_number+0x45>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <get_iat_number+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_iat_number>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    111e <get_iat_number+0x1e>
mov    %edx,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmp    %edi,(%rsi,%rcx,4)
je     111f <get_iat_number+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <get_iat_number+0x10>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get_iat_number(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 = %24, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %27
13: ; preds = %9
%14 = load i32*, i32** %6
%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* %5
%20 = icmp eq i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %13
%22 = load i32, i32* %8
store i32 %22, i32* %4
br label %28
23: ; preds = %13
br label %24
24: ; preds = %23
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 1
store i32 %26, i32* %8
br label %9
27: ; preds = %9
store i32 -1, i32* %4
br label %28
28: ; preds = %27, %21
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
define i32 @get_iat_number(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %0
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 %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
int main() {
  int a;
  a = 5;
  int b;
  b = 2;
  return a << b;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 20
}
/* Variables and functions */
scalar_t__ cgload();
int /*<<< orphan*/ cgmod();
int /*<<< orphan*/ cgswap();
int /*<<< orphan*/ gentext();
void genmod(int swapped) {
  gentext();
  if (cgload() || !swapped)
    cgswap();
  cgmod();
}


x86 assembly (clang, -O0):
<genmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1060 <gentext@plt>
mov    $0x0,%al
call   1050 <cgload@plt>
cmp    $0x0,%rax
jne    116d <genmod+0x2d>
cmpl   $0x0,-0x4(%rbp)
jne    1174 <genmod+0x34>
mov    $0x0,%al
call   1040 <cgswap@plt>
mov    $0x0,%al
call   1030 <cgmod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genmod>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1060 <gentext@plt>
xor    %eax,%eax
call   1050 <cgload@plt>
test   %ebx,%ebx
je     115a <genmod+0x1a>
test   %rax,%rax
je     1161 <genmod+0x21>
xor    %eax,%eax
call   1040 <cgswap@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <cgmod@plt>

LLVM IR (-O0):
define void @genmod(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @gentext()
%4 = call i64 (...) @cgload()
%5 = icmp ne i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6, %1
%10 = call i32 (...) @cgswap()
br label %11
11: ; preds = %9, %6
%12 = call i32 (...) @cgmod()
ret void
}

LLVM IR (-O2):
define void @genmod(i32 %0) {
%2 = tail call i32 (...) @gentext()
%3 = tail call i64 (...) @cgload()
%4 = icmp eq i64 %3, 0
%5 = icmp ne i32 %0, 0
%6 = and i1 %5, %4
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 (...) @cgswap()
br label %9
9: ; preds = %1, %7
%10 = tail call i32 (...) @cgmod()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *progname) {
  printf("Usage:\n");
  printf("%s [opt] [files/folders]\n", progname);
  printf("\t -a \t\t to append to last o-copy/o-cut operation.\n");
  printf("\t -h/--help\t to display this info\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [26 x i8] c"%s [opt] [files/folders]\0A\00"
@.str.2 = [51 x i8] c"\09 -a \09\09 to append to last o-copy/o-cut operation.\0A\00"
@.str.3 = [35 x i8] c"\09 -h/--help\09 to display this info\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [26 x i8] c"%s [opt] [files/folders]\0A\00"
@str = [7 x i8] c"Usage:\00"
@str.4 = [50 x i8] c"\09 -a \09\09 to append to last o-copy/o-cut operation.\00"
@str.5 = [34 x i8] c"\09 -h/--help\09 to display this info\00"
define void @usage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
}
double square(double arg) { return arg * arg; }


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

x86 assembly (clang, -O2):
<square>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @square(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @square(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
struct copy_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ copy_cmdline_parser_release(struct copy_args_info *);
void copy_cmdline_parser_free(struct copy_args_info *args_info) {
  copy_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<copy_cmdline_parser_free>:
jmp    1030 <copy_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.copy_args_info = type { i32 }
define void @copy_cmdline_parser_free(%struct.copy_args_info* %0) {
%2 = tail call i32 @copy_cmdline_parser_release(%struct.copy_args_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_RETRACT(int /*<<< orphan*/);
int gen_RETRACT() {
  handle_RETRACT(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gen_RETRACT() {
%1 = call i32 @handle_RETRACT(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_RETRACT() {
%1 = tail call i32 @handle_RETRACT(i32 0)
ret i32 0
}
void bitset_set_all() {}


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

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

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

LLVM IR (-O2):
define void @bitset_set_all() {
ret void
}
void enableReset() {
  unsigned char *marker = (unsigned char *)0x0100;
  *marker = 0;
}


x86 assembly (clang, -O0):
<enableReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<enableReset>:
movb   $0x0,0x100
ret

LLVM IR (-O0):
define void @enableReset() {
%1 = alloca i8*
store i8* inttoptr (i64 256 to i8*), i8** %1
%2 = load i8*, i8** %1
store i8 0, i8* %2
ret void
}

LLVM IR (-O2):
define void @enableReset() {
store i8 0, i8* inttoptr (i64 256 to i8*)
ret void
}
foo(char *s) {}


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

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

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

LLVM IR (-O2):
define i32 @foo(i8* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int /*<<< orphan*/ EVP_sha1();
int /*<<< orphan*/ X509_sign(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/);
int /*<<< orphan*/ jlog(int, char *);
void pki_sign_certificate(EVP_PKEY *keyring, X509 *certificate) {
  jlog(0x01, "pki_sign_certificate\n");
  X509_sign(certificate, keyring, EVP_sha1());
}


x86 assembly (clang, -O0):
<pki_sign_certificate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
lea    0xeb4(%rip),%rsi
call   1040 <jlog@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <EVP_sha1@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1050 <X509_sign@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pki_sign_certificate>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xebf(%rip),%rsi
mov    $0x1,%edi
call   1040 <jlog@plt>
xor    %eax,%eax
call   1030 <EVP_sha1@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <X509_sign@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"pki_sign_certificate\0A\00"
define void @pki_sign_certificate(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call i32 @jlog(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = load i32*, i32** %4
%7 = load i32*, i32** %3
%8 = call i32 (...) @EVP_sha1()
%9 = call i32 @X509_sign(i32* %6, i32* %7, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"pki_sign_certificate\0A\00"
define void @pki_sign_certificate(i32* %0, i32* %1) {
%3 = tail call i32 @jlog(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @EVP_sha1()
%5 = tail call i32 @X509_sign(i32* %1, i32* %0, i32 %4)
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int clock_settime(int /*<<< orphan*/, struct timespec *);
int set_time(struct timespec *time) {
  return clock_settime(CLOCK_REALTIME, time);
}


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

x86 assembly (clang, -O2):
<set_time>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <clock_settime@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @set_time(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load i32, i32* @CLOCK_REALTIME
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i32 @clock_settime(i32 %3, %struct.timespec* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @set_time(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_REALTIME
%3 = tail call i32 @clock_settime(i32 %2, %struct.timespec* %0)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _ladd(int *, int *);
int /*<<< orphan*/ _lrshift(int *);
void _rlrshift(uint32_t value[]) {
  uint32_t temp[2];
  temp[0] = value[0] & 1;
  temp[1] = 0;
  _lrshift(value);
  _ladd(value, temp);
}


x86 assembly (clang, -O0):
<_rlrshift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x1,%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_lrshift@plt>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <_ladd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rlrshift>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%eax
and    $0x1,%eax
mov    %eax,0x8(%rsp)
movl   $0x0,0xc(%rsp)
call   1040 <_lrshift@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <_ladd@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @_rlrshift(i32* %0) {
%2 = alloca i32*
%3 = alloca [2 x i32]
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = and i32 %6, 1
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %7, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 0, i32* %9
%10 = load i32*, i32** %2
%11 = call i32 @_lrshift(i32* %10)
%12 = load i32*, i32** %2
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%14 = call i32 @_ladd(i32* %12, i32* %13)
ret void
}

LLVM IR (-O2):
define void @_rlrshift(i32* %0) {
%2 = alloca [2 x i32]
%3 = bitcast [2 x i32]* %2 to i8*
%4 = load i32, i32* %0
%5 = and i32 %4, 1
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
store i32 %5, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
store i32 0, i32* %7
%8 = tail call i32 @_lrshift(i32* %0)
%9 = call i32 @_ladd(i32* %0, i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcasecmp(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
void copy_bool(char *str, void *val) {
  if (!strcmp(str, "1") || !strcasecmp(str, "yes") || !strcasecmp(str, "on")) {
    *((int *)val) = 1;
  }
  *((int *)val) = 0;
}


x86 assembly (clang, -O0):
<copy_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     117b <copy_bool+0x5b>
mov    -0x8(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
je     117b <copy_bool+0x5b>
mov    -0x8(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1185 <copy_bool+0x65>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_bool>:
movl   $0x0,(%rsi)
ret

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [4 x i8] c"yes\00"
@.str.2 = [3 x i8] c"on\00"
define void @copy_bool(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 = call i32 @strcmp(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i32 @strcasecmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = call i32 @strcasecmp(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %12, %8, %2
%17 = load i8*, i8** %4
%18 = bitcast i8* %17 to i32*
store i32 1, i32* %18
br label %19
19: ; preds = %16, %12
%20 = load i8*, i8** %4
%21 = bitcast i8* %20 to i32*
store i32 0, i32* %21
ret void
}

LLVM IR (-O2):
define void @copy_bool(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %1 to i32*
store i32 0, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_heapify();
int /*<<< orphan*/ test_running_median();
int /*<<< orphan*/ test_uheap_api();
int main(void) {
  test_uheap_api();
  test_heapify();
  test_running_median();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_uheap_api@plt>
mov    $0x0,%al
call   1040 <test_heapify@plt>
mov    $0x0,%al
call   1050 <test_running_median@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_uheap_api()
%3 = call i32 (...) @test_heapify()
%4 = call i32 (...) @test_running_median()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_uheap_api()
%2 = tail call i32 (...) @test_heapify()
%3 = tail call i32 (...) @test_running_median()
ret i32 0
}
int add(int a, int b) {
  int c = a + b;
  return c;
}


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ outerr(int /*<<< orphan*/, char *, char *);
char *skipspaces(char *);
int /*<<< orphan*/ strlen(char *);
int eoltest(char *s) {
  s = skipspaces(s);
  if (*s == 0)
    return (1);
  outerr(strlen(s), "extra data at end of command: %s\n", s);
  return (0);
}


x86 assembly (clang, -O0):
<eoltest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <skipspaces@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1165 <eoltest+0x35>
movl   $0x1,-0x4(%rbp)
jmp    1187 <eoltest+0x57>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rdx
lea    0xe85(%rip),%rsi
call   1050 <outerr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eoltest>:
push   %rbx
call   1040 <skipspaces@plt>
cmpb   $0x0,(%rax)
je     115b <eoltest+0x2b>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
lea    0xeb3(%rip),%rsi
mov    %eax,%edi
mov    %rbx,%rdx
call   1050 <outerr@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"extra data at end of command: %s\0A\00"
define i32 @eoltest(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i8* @skipspaces(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %16
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = call i32 @strlen(i8* %12)
%14 = load i8*, i8** %3
%15 = call i32 @outerr(i32 %13, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %14)
store i32 0, i32* %2
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@.str = [34 x i8] c"extra data at end of command: %s\0A\00"
define i32 @eoltest(i8* %0) {
%2 = tail call i8* @skipspaces(i8* %0)
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @strlen(i8* %2)
%7 = tail call i32 @outerr(i32 %6, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ 0, %5 ], [ 1, %1 ]
ret i32 %9
}
lt(float a, float b) { return a < b; }


x86 assembly (clang, -O0):
<lt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lt>:
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @lt(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @lt(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}