xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cm_angle(int, int);
void camera_turn_left() { cm_angle(1533 - 100 / 256, 1533 - 100 % 256); }


x86 assembly (clang, -O0):
<camera_turn_left>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5fd,%edi
mov    $0x599,%esi
call   1030 <cm_angle@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<camera_turn_left>:
mov    $0x5fd,%edi
mov    $0x599,%esi
jmp    1030 <cm_angle@plt>

LLVM IR (-O0):
define void @camera_turn_left() {
%1 = call i32 @cm_angle(i32 1533, i32 1433)
ret void
}

LLVM IR (-O2):
define void @camera_turn_left() {
%1 = tail call i32 @cm_angle(i32 1533, i32 1433)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void StringSet(char *w, char *dest, int n) {
  strcpy(dest, "");
  for (int i = 0; i < n; ++i) {
    strcat(dest, w);
  }
}


x86 assembly (clang, -O0):
<StringSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1171 <StringSet+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114a <StringSet+0x2a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringSet>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xecc(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
test   %ebx,%ebx
jle    1150 <StringSet+0x30>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <strcat@plt>
add    $0xffffffff,%ebx
jne    1140 <StringSet+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @StringSet(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = icmp sgt i32 %2, 0
br i1 %5, label %7, label %6
6: ; preds = %7, %3
ret void
7: ; preds = %3, %7
%8 = phi i32 [ %10, %7 ], [ 0, %3 ]
%9 = tail call i32 @strcat(i8* %1, i8* %0)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %2
br i1 %11, label %6, label %7
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_REQINFO;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_REQINFO_it;
OCSP_REQINFO *OCSP_REQINFO_new(void) {
  return (OCSP_REQINFO *)ASN1_item_new(&OCSP_REQINFO_it);
}


x86 assembly (clang, -O0):
<OCSP_REQINFO_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OCSP_REQINFO_new>:
mov    0x2ed9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@OCSP_REQINFO_it = global i32 0
define i32* @OCSP_REQINFO_new() {
%1 = call i64 @ASN1_item_new(i32* @OCSP_REQINFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@OCSP_REQINFO_it = global i32 0
define i32* @OCSP_REQINFO_new() {
%1 = tail call i64 @ASN1_item_new(i32* @OCSP_REQINFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/, unsigned long, unsigned long const *);
int setublimit(uid_t uid, unsigned long resource, const unsigned long *rlim) {
  return syscall(502, uid, resource, rlim);
}


x86 assembly (clang, -O0):
<setublimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1f6,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setublimit>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1f6,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @setublimit(i32 %0, i64 %1, i64* %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64*
store i32 %0, i32* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i32, i32* %4
%8 = load i64, i64* %5
%9 = load i64*, i64** %6
%10 = call i32 @syscall(i32 502, i32 %7, i64 %8, i64* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @setublimit(i32 %0, i64 %1, i64* %2) {
%4 = tail call i32 @syscall(i32 502, i32 %0, i64 %1, i64* %2)
ret i32 %4
}
test00(const char *s1) { return __builtin_strlen(s1); }


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

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

LLVM IR (-O0):
define i32 @test00(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @test00(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
double randull();
double randf(void) { return 5.42101086242752217E-20 * randull(); }


x86 assembly (clang, -O0):
<randf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <randull@plt>
movaps %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<randf>:
push   %rax
xor    %eax,%eax
call   1030 <randull@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @randf() {
%1 = call double (...) @randull()
%2 = fmul double 0x3BF0000000000000, %1
ret double %2
}

LLVM IR (-O2):
define double @randf() {
%1 = tail call double (...) @randull()
%2 = fmul double %1, 0x3BF0000000000000
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void print_usage_info_and_exit(const char *progname, int code) {
  printf("Usage info:\n"
         "\t%s <application to start>\n"
         "\t\t[-out <stderr|path to file>] [-err <stdin|path to file>]\n"
         "\t\t[arg0 [arg1 ...]]\n\n",
         progname);
  exit(code);
}


x86 assembly (clang, -O0):
<print_usage_info_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage_info_and_exit>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [120 x i8] c"Usage info:\0A\09%s <application to start>\0A\09\09[-out <stderr|path to file>] [-err <stdin|path to file>]\0A\09\09[arg0 [arg1 ...]]\0A\0A\00"
define void @print_usage_info_and_exit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [120 x i8] c"Usage info:\0A\09%s <application to start>\0A\09\09[-out <stderr|path to file>] [-err <stdin|path to file>]\0A\09\09[arg0 [arg1 ...]]\0A\0A\00"
define void @print_usage_info_and_exit(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
long sysconf(int /*<<< orphan*/);
long getPageSize() { return sysconf(_SC_PAGESIZE); }


x86 assembly (clang, -O0):
<getPageSize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPageSize>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
define i64 @getPageSize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = call i64 @sysconf(i32 %1)
ret i64 %2
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
define i64 @getPageSize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i64 @sysconf(i32 %1)
ret i64 %2
}
/* Variables and functions */
unsigned int ones32(unsigned int);
unsigned int wl_min_lzc(unsigned int x) {
  x |= (x >> 1);
  x |= (x >> 2);
  x |= (x >> 4);
  x |= (x >> 8);
  x |= (x >> 16);
  return (ones32(x));
}


x86 assembly (clang, -O0):
<wl_min_lzc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ones32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_min_lzc>:
mov    %edi,%eax
shr    %eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x8,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x10,%eax
or     %eax,%edi
jmp    1030 <ones32@plt>

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

LLVM IR (-O2):
define i32 @wl_min_lzc(i32 %0) {
%2 = lshr i32 %0, 1
%3 = or i32 %2, %0
%4 = lshr i32 %3, 2
%5 = or i32 %4, %3
%6 = lshr i32 %5, 4
%7 = or i32 %6, %5
%8 = lshr i32 %7, 8
%9 = or i32 %8, %7
%10 = lshr i32 %9, 16
%11 = or i32 %10, %9
%12 = tail call i32 @ones32(i32 %11)
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void xputc(void *p, char c) { putchar(c); }


x86 assembly (clang, -O0):
<xputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xputc>:
mov    %esi,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @xputc(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = call i32 @putchar(i8 signext %5)
ret void
}

LLVM IR (-O2):
define void @xputc(i8* nocapture readnone %0, i8 signext %1) {
%3 = tail call i32 @putchar(i8 signext %1)
ret void
}
/* Variables and functions */
char *getenv(char *);
char *malloc(scalar_t__);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *targetDir(char *env, char *path) {
  char *dir;
  char *dirEnv;
  dirEnv = getenv(env);
  dir = malloc(strlen(dirEnv) + strlen(path) + 1);
  strcpy(dir, dirEnv);
  strcat(dir, path);
  return dir;
}


x86 assembly (clang, -O0):
<targetDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x28(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<targetDir>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <getenv@plt>
mov    %rax,%r12
mov    %rax,%rdi
call   1050 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @targetDir(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i8* @getenv(i8* %7)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = call i64 @strlen(i8* %9)
%11 = load i8*, i8** %4
%12 = call i64 @strlen(i8* %11)
%13 = add nsw i64 %10, %12
%14 = add nsw i64 %13, 1
%15 = call i8* @malloc(i64 %14)
store i8* %15, i8** %5
%16 = load i8*, i8** %5
%17 = load i8*, i8** %6
%18 = call i32 @strcpy(i8* %16, i8* %17)
%19 = load i8*, i8** %5
%20 = load i8*, i8** %4
%21 = call i32 @strcat(i8* %19, i8* %20)
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
define i8* @targetDir(i8* nocapture %0, i8* %1) {
%3 = tail call i8* @getenv(i8* %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %3)
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = add i64 %4, 1
%7 = add i64 %6, %5
%8 = tail call i8* @malloc(i64 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* %3)
%10 = tail call i32 @strcat(i8* %8, i8* %1)
ret i8* %8
}
void ff_hevc_put_hevc_bi_w_epel_hv16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv16_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RETURN_IF_FALSE(int /*<<< orphan*/);
int /*<<< orphan*/ assert_exit(char *);
int /*<<< orphan*/ config_tokenizer_verbose_p();
int /*<<< orphan*/ log_print(char *, char *);
void tkz_lang_c_buffer_print(char *buf) {
  assert_exit(buf);
  RETURN_IF_FALSE(config_tokenizer_verbose_p());
  log_print("[TKZ] matching '%s'\n", buf);
}


x86 assembly (clang, -O0):
<tkz_lang_c_buffer_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <assert_exit@plt>
mov    $0x0,%al
call   1030 <config_tokenizer_verbose_p@plt>
mov    %eax,%edi
call   1050 <RETURN_IF_FALSE@plt>
mov    -0x8(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1040 <log_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tkz_lang_c_buffer_print>:
push   %rbx
mov    %rdi,%rbx
call   1060 <assert_exit@plt>
xor    %eax,%eax
call   1030 <config_tokenizer_verbose_p@plt>
mov    %eax,%edi
call   1050 <RETURN_IF_FALSE@plt>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <log_print@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"[TKZ] matching '%s'\0A\00"
define void @tkz_lang_c_buffer_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert_exit(i8* %3)
%5 = call i32 (...) @config_tokenizer_verbose_p()
%6 = call i32 @RETURN_IF_FALSE(i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @log_print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"[TKZ] matching '%s'\0A\00"
define void @tkz_lang_c_buffer_print(i8* %0) {
%2 = tail call i32 @assert_exit(i8* %0)
%3 = tail call i32 (...) @config_tokenizer_verbose_p()
%4 = tail call i32 @RETURN_IF_FALSE(i32 %3)
%5 = tail call i32 @log_print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
char *write_buffer(char *buf, char *data, uint32_t data_len) {
  memcpy(buf, data, data_len);
  return buf + data_len;
}


x86 assembly (clang, -O0):
<write_buffer>:
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 <memcpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_buffer>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rdi,%r14
call   1030 <memcpy@plt>
movslq %ebx,%rax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @write_buffer(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
ret i8* %14
}

LLVM IR (-O2):
define i8* @write_buffer(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %6
}
int atoi(const char *s) {
  int n;
  n = 0;
  while ('0' <= *s && *s <= '9')
    n = n * 10 + *s++ - '0';
  return n;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0xd(%rbp)
jg     1138 <atoi+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1148 <atoi+0x48>
jmp    116b <atoi+0x6b>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atoi+0x20>
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %13, %5 ], [ 0, %1 ]
%8 = phi i8* [ %11, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = add i32 %10, -48
%13 = add i32 %12, %9
%14 = load i8, i8* %11
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %13, %5 ]
ret i32 %18
}
int tls13_client_finished_recv(struct tls13_ctx *ctx) { return 1; }


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

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

LLVM IR (-O0):
%struct.tls13_ctx = type opaque
define i32 @tls13_client_finished_recv(%struct.tls13_ctx* %0) {
%2 = alloca %struct.tls13_ctx*
store %struct.tls13_ctx* %0, %struct.tls13_ctx** %2
ret i32 1
}

LLVM IR (-O2):
%struct.tls13_ctx = type opaque
define i32 @tls13_client_finished_recv(%struct.tls13_ctx* nocapture readnone %0) {
ret i32 1
}
int sizeofint(const int size) {
  unsigned int num = 1;
  int num_of_bits = 0;
  while (size >= num && num_of_bits < 32) {
    num_of_bits++;
    num <<= 1;
  }
  return num_of_bits;
}


x86 assembly (clang, -O0):
<sizeofint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
jb     1130 <sizeofint+0x30>
cmpl   $0x20,-0xc(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <sizeofint+0x40>
jmp    1157 <sizeofint+0x57>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <sizeofint+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizeofint>:
test   %edi,%edi
je     1121 <sizeofint+0x21>
mov    $0x1,%ecx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
lea    0x1(%rdx),%eax
add    %ecx,%ecx
cmp    %edi,%ecx
ja     1120 <sizeofint+0x20>
cmp    $0x1f,%edx
mov    %eax,%edx
jb     1110 <sizeofint+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @sizeofint(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp uge i32 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 32
br label %12
12: ; preds = %9, %5
%13 = phi i1 [ false, %5 ], [ %11, %9 ]
br i1 %13, label %14, label %19
14: ; preds = %12
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
%17 = load i32, i32* %3
%18 = shl i32 %17, 1
store i32 %18, i32* %3
br label %5
19: ; preds = %12
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @sizeofint(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 1, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = shl i32 %5, 1
%8 = icmp ule i32 %7, %0
%9 = icmp ult i32 %4, 31
%10 = select i1 %8, i1 %9, i1 false
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
void st_fds_set(fd_set *fds, int fd, int *maxfd) {
  FD_SET(fd, fds);
  if (*maxfd < fd) {
    *maxfd = fd;
  }
}


x86 assembly (clang, -O0):
<st_fds_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <FD_SET@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
jge    1147 <st_fds_set+0x37>
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_fds_set>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%rsi
mov    %ebp,%edi
call   1030 <FD_SET@plt>
cmp    %ebp,(%rbx)
jge    1128 <st_fds_set+0x18>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @st_fds_set(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* %5
%8 = load i32*, i32** %4
%9 = call i32 @FD_SET(i32 %7, i32* %8)
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i32, i32* %5
%16 = load i32*, i32** %6
store i32 %15, i32* %16
br label %17
17: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
define void @st_fds_set(i32* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32 @FD_SET(i32 %1, i32* %0)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, %1
br i1 %6, label %7, label %8
7: ; preds = %3
store i32 %1, i32* %2
br label %8
8: ; preds = %7, %3
ret void
}
int do_rand(unsigned long *ctx) {
  long hi, lo, x;
  hi = *ctx / 127773;
  lo = *ctx % 127773;
  x = 16807 * lo - 2836 * hi;
  if (x < 0)
    x += 0x7fffffff;
  *ctx = x;
  return (x - 1);
}


x86 assembly (clang, -O0):
<do_rand>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    $0x1f31d,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    $0x1f31d,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x18(%rbp)
imul   $0x41a7,-0x18(%rbp),%rax
imul   $0xb14,-0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jge    1162 <do_rand+0x62>
mov    -0x20(%rbp),%rax
add    $0x7fffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_rand>:
mov    (%rdi),%rcx
movabs $0x41a705af1fe3fb79,%rdx
05 a7 41
mov    %rcx,%rax
mul    %rdx
shr    $0xf,%rdx
imul   $0x1f31d,%rdx,%rax
sub    %rax,%rcx
imul   $0x41a7,%rcx,%rcx
imul   $0xfffffffffffff4ec,%rdx,%rdx
lea    (%rdx,%rcx,1),%rax
add    $0x7fffffff,%rax
add    %rcx,%rdx
cmovns %rdx,%rax
mov    %rax,(%rdi)
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @do_rand(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %2
%6 = load i64*, i64** %2
%7 = load i64, i64* %6
%8 = udiv i64 %7, 127773
store i64 %8, i64* %3
%9 = load i64*, i64** %2
%10 = load i64, i64* %9
%11 = urem i64 %10, 127773
store i64 %11, i64* %4
%12 = load i64, i64* %4
%13 = mul nsw i64 16807, %12
%14 = load i64, i64* %3
%15 = mul nsw i64 2836, %14
%16 = sub nsw i64 %13, %15
store i64 %16, i64* %5
%17 = load i64, i64* %5
%18 = icmp slt i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %1
%20 = load i64, i64* %5
%21 = add nsw i64 %20, 2147483647
store i64 %21, i64* %5
br label %22
22: ; preds = %19, %1
%23 = load i64, i64* %5
%24 = load i64*, i64** %2
store i64 %23, i64* %24
%25 = load i64, i64* %5
%26 = sub nsw i64 %25, 1
%27 = trunc i64 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @do_rand(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = udiv i64 %2, 127773
%4 = urem i64 %2, 127773
%5 = mul nuw nsw i64 %4, 16807
%6 = mul nsw i64 %3, -2836
%7 = add nsw i64 %6, %5
%8 = icmp slt i64 %7, 0
%9 = add nsw i64 %7, 2147483647
%10 = select i1 %8, i64 %9, i64 %7
store i64 %10, i64* %0
%11 = trunc i64 %10 to i32
%12 = add i32 %11, -1
ret i32 %12
}
void ff_hevc_put_hevc_epel_h32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h32_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getLine(char *, int);
int /*<<< orphan*/ sscanf(char *, char *, double *);
double getDouble() {
  char str[14];
  double result;
  getLine(str, 14);
  sscanf(str, "%lf", &result);
  return result;
}


x86 assembly (clang, -O0):
<getDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0xe(%rbp),%rdi
mov    $0xe,%esi
call   1040 <getLine@plt>
lea    -0xe(%rbp),%rdi
lea    0xebf(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <sscanf@plt>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDouble>:
push   %rbx
sub    $0x20,%rsp
lea    0x12(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xe,%esi
call   1040 <getLine@plt>
lea    0xec2(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <sscanf@plt>
movsd  0x8(%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @getDouble() {
%1 = alloca [14 x i8]
%2 = alloca double
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = bitcast double* %2 to i8*
%5 = call i32 @getLine(i8* %3, i32 14)
%6 = call i32 @sscanf(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%7 = load double, double* %2
ret double %7
}
/* Variables and functions */
int fileno(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, unsigned char);
int read(int, unsigned char *, int);
int /*<<< orphan*/ stdin;
int bin2hex(void) {
  int stdin_fd = fileno(stdin);
  int n_read;
  unsigned char c;
  while ((n_read = read(stdin_fd, &c, 1)) > 0) {
    printf("%.2x", c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<bin2hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1050 <fileno@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    117b <bin2hex+0x4b>
lea    0xe93(%rip),%rdi
movzbl -0x9(%rbp),%esi
call   1030 <printf@plt>
jmp    1149 <bin2hex+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin2hex>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1050 <fileno@plt>
mov    %eax,%ebx
lea    0xf(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1190 <bin2hex+0x60>
lea    0xe9b(%rip),%r14
lea    0xf(%rsp),%r15
nopw   0x0(%rax,%rax,1)
movzbl 0xf(%rsp),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
mov    %r15,%rsi
mov    $0x1,%edx
call   1040 <read@plt>
test   %eax,%eax
jg     1170 <bin2hex+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [5 x i8] c"%.2x\00"
define i32 @bin2hex() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = load i32, i32* @stdin
%5 = call i32 @fileno(i32 %4)
store i32 %5, i32* %1
br label %6
6: ; preds = %10, %0
%7 = load i32, i32* %1
%8 = call i32 @read(i32 %7, i8* %3, i32 1)
store i32 %8, i32* %2
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i8, i8* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %11)
br label %6
13: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [5 x i8] c"%.2x\00"
define i32 @bin2hex() {
%1 = alloca i8
%2 = load i32, i32* @stdin
%3 = tail call i32 @fileno(i32 %2)
%4 = call i32 @read(i32 %3, i8* %1, i32 1)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %0, %6
%7 = load i8, i8* %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %7)
%9 = call i32 @read(i32 %3, i8* %1, i32 1)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %6, label %11
11: ; preds = %6, %0
ret i32 0
}
void fdmi_dtype_op_NON_int(void *a, void *b) { (*(int *)a = (*(int *)a)); }


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

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

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

LLVM IR (-O2):
define void @fdmi_dtype_op_NON_int(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void INT_Excep_FCU_FRDYI(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_FCU_FRDYI() {
ret void
}
int get_max(int a, int b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<get_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <get_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <get_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @get_max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @get_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
__typeof__(memmove(1, 1, 1)) test_memmove_115(void) { return memmove(1, 1, 1); }


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

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

LLVM IR (-O0):
define i8* @test_memmove_115() {
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
define i8* @test_memmove_115() {
ret i8* inttoptr (i64 1 to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ RamRead32A(int, unsigned long *);
int /*<<< orphan*/ RamWrite32A(int, int);
int /*<<< orphan*/ WitTim(int);
void GetGyroWhoAmI(unsigned char *UcWho) {
  unsigned long UlVal;
  RamWrite32A(0xF01D, 0x75000000);
  WitTim(5);
  RamRead32A(0xF01D, &UlVal);
  *UcWho = (unsigned char)(UlVal >> 24);
}


x86 assembly (clang, -O0):
<GetGyroWhoAmI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xf01d,%edi
mov    $0x75000000,%esi
call   1040 <RamWrite32A@plt>
mov    $0x5,%edi
call   1050 <WitTim@plt>
mov    $0xf01d,%edi
lea    -0x10(%rbp),%rsi
call   1030 <RamRead32A@plt>
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetGyroWhoAmI>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    $0xf01d,%edi
mov    $0x75000000,%esi
call   1040 <RamWrite32A@plt>
mov    $0x5,%edi
call   1050 <WitTim@plt>
lea    0x8(%rsp),%rsi
mov    $0xf01d,%edi
call   1030 <RamRead32A@plt>
mov    0xb(%rsp),%al
mov    %al,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @GetGyroWhoAmI(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = call i32 @RamWrite32A(i32 61469, i32 1962934272)
%5 = call i32 @WitTim(i32 5)
%6 = call i32 @RamRead32A(i32 61469, i64* %3)
%7 = load i64, i64* %3
%8 = lshr i64 %7, 24
%9 = trunc i64 %8 to i8
%10 = load i8*, i8** %2
store i8 %9, i8* %10
ret void
}

LLVM IR (-O2):
define void @GetGyroWhoAmI(i8* nocapture writeonly %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = tail call i32 @RamWrite32A(i32 61469, i32 1962934272)
%5 = tail call i32 @WitTim(i32 5)
%6 = call i32 @RamRead32A(i32 61469, i64* %2)
%7 = load i64, i64* %2
%8 = lshr i64 %7, 24
%9 = trunc i64 %8 to i8
store i8 %9, i8* %0
ret void
}
unsigned int hash(int key) { return ((key / 10) % 10) * 37 + (key % 10); }


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
imul   $0x25,%edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%eax
add    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
movslq %ecx,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
lea    (%rsi,%rsi,8),%edx
lea    (%rsi,%rdx,4),%edx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = srem i32 %4, 10
%6 = mul nsw i32 %5, 37
%7 = load i32, i32* %2
%8 = srem i32 %7, 10
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @hash(i32 %0) {
%2 = sdiv i32 %0, 10
%3 = srem i32 %2, 10
%4 = mul nsw i32 %3, 37
%5 = srem i32 %0, 10
%6 = add nsw i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int add1(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  int result;
  scanf("%d", &n);
  result = add1(n);
  printf("Sum = %ld\n", result);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <add1@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"Sum = %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @add1(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void g_message(char *p1) { printf("%s\n", p1); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @g_message(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ COND_CS();
int /*<<< orphan*/ EA_AY_AI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_scs_8_ai(void) {
  m68ki_write_8(EA_AY_AI_8(), COND_CS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_scs_8_ai>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_AI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_CS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_scs_8_ai>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_AI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_CS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_scs_8_ai() {
%1 = call i32 (...) @EA_AY_AI_8()
%2 = call i64 (...) @COND_CS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_scs_8_ai() {
%1 = tail call i32 (...) @EA_AY_AI_8()
%2 = tail call i64 (...) @COND_CS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
void *watchdog(void *v) {
  sleep(10);
  fprintf(stderr, "watchdog timer expired - not a good sign\n");
  exit(0);
}


x86 assembly (clang, -O0):
<watchdog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xa,%edi
call   1050 <sleep@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<watchdog>:
push   %rax
mov    $0xa,%edi
call   1050 <sleep@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"watchdog timer expired - not a good sign\0A\00"
define i8* @watchdog(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @sleep(i32 10)
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"watchdog timer expired - not a good sign\0A\00"
define noalias i8* @watchdog(i8* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 10)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int f470(int *);
int f471(int *p) { return f470(p); }


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

x86 assembly (clang, -O2):
<f471>:
jmp    1030 <f470@plt>

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

LLVM IR (-O2):
define i32 @f471(i32* %0) {
%2 = tail call i32 @f470(i32* %0)
ret i32 %2
}
int is2xx(int status) { return ((status >= 200) && (status < 300)); }


x86 assembly (clang, -O0):
<is2xx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xc8,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <is2xx+0x26>
cmpl   $0x12c,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is2xx>:
add    $0xffffff38,%edi
xor    %eax,%eax
cmp    $0x64,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is2xx(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 200
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 300
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is2xx(i32 %0) {
%2 = add i32 %0, -200
%3 = icmp ult i32 %2, 100
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ multipla_1(int);
int /*<<< orphan*/ multipla_2(int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Multipla 1:\n");
  multipla_1(2);
  printf("Multipla 2:\n");
  multipla_2(2);
  printf("Multipla 3:\n");
  multipla_2(3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1050 <multipla_1@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <multipla_2@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <multipla_2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1050 <multipla_1@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1040 <multipla_2@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1040 <multipla_2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [12 x i8] c"Multipla 1:\00"
@str.3 = [12 x i8] c"Multipla 2:\00"
@str.4 = [12 x i8] c"Multipla 3:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @multipla_1(i32 2)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @multipla_2(i32 2)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 @multipla_2(i32 3)
ret i32 0
}