xunge/DecIR huggingface dataset:
int string_length(char *string) {
  int i = 0;
  while (string[i] != 0) {
    i++;
  }
  i++;
  return i;
}


x86 assembly (clang, -O0):
<string_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <string_length+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <string_length+0xf>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_length>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <string_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @string_length(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
%10 = add nuw nsw i32 %9, 1
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ ff_bfin_put_pixels8uc(int /*<<< orphan*/ *,
                                         int /*<<< orphan*/ const *,
                                         int /*<<< orphan*/ const *,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int);
void bfin_put_pixels8_x2(uint8_t *block, const uint8_t *pixels,
                         ptrdiff_t line_size, int h) {
  ff_bfin_put_pixels8uc(block, pixels, pixels + 1, line_size, line_size, h);
}


x86 assembly (clang, -O0):
<bfin_put_pixels8_x2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
add    $0x4,%rdx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1030 <ff_bfin_put_pixels8uc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfin_put_pixels8_x2>:
mov    %ecx,%r9d
mov    %edx,%ecx
lea    0x4(%rsi),%rdx
mov    %ecx,%r8d
jmp    1030 <ff_bfin_put_pixels8uc@plt>

LLVM IR (-O0):
define void @bfin_put_pixels8_x2(i32* %0, i32* %1, i32 %2, i32 %3) {
%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 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %6
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %7
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32 @ff_bfin_put_pixels8uc(i32* %9, i32* %10, i32* %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @bfin_put_pixels8_x2(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = tail call i32 @ff_bfin_put_pixels8uc(i32* %0, i32* %1, i32* %5, i32 %2, i32 %2, i32 %3)
ret void
}
int get_msb(int num) {
  int bitpos = 0;
  while (num) {
    bitpos++;
    num = num >> 1;
  }
  return (bitpos == 0) ? 0 : bitpos - 1;
}


x86 assembly (clang, -O0):
<get_msb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <get_msb+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <get_msb+0xe>
cmpl   $0x0,-0x8(%rbp)
jne    1143 <get_msb+0x43>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    114c <get_msb+0x4c>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_msb>:
test   %edi,%edi
je     111d <get_msb+0x1d>
mov    $0xffffffff,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <get_msb+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @get_msb(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = ashr i32 %5, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %4, %3 ]
ret i32 %10
}
/* Variables and functions */
char *strdup(char const *);
char *string_iconv(int from_utf8, const char *from_code, const char *to_code,
                   const char *string) {
  char *outbuf;
  if (!string)
    return NULL;
  (void)from_utf8;
  (void)from_code;
  (void)to_code;
  outbuf = strdup(string);
  return outbuf;
}


x86 assembly (clang, -O0):
<string_iconv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    113f <string_iconv+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1154 <string_iconv+0x44>
mov    -0x28(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_iconv>:
test   %rcx,%rcx
je     111d <string_iconv+0xd>
mov    %rcx,%rdi
jmp    1030 <strdup@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @string_iconv(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%11 = load i8*, i8** %9
%12 = icmp ne i8* %11, null
br i1 %12, label %14, label %13
13: ; preds = %4
store i8* null, i8** %5
br label %21
14: ; preds = %4
%15 = load i32, i32* %6
%16 = load i8*, i8** %7
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = call i8* @strdup(i8* %18)
store i8* %19, i8** %10
%20 = load i8*, i8** %10
store i8* %20, i8** %5
br label %21
21: ; preds = %14, %13
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @string_iconv(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = icmp eq i8* %3, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i8* @strdup(i8* %3)
br label %8
8: ; preds = %4, %6
%9 = phi i8* [ %7, %6 ], [ null, %4 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void libsfp_printvalue_default(void *udata, const char *value) {
  printf("%s", value);
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @libsfp_printvalue_default(i8* %0, i8* %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 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @libsfp_printvalue_default(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
void ARGBToARGB4444Row_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToARGB4444Row_Any_NEON() {
ret void
}
/* Variables and functions */
long rul__conrg_get_cur_block_index();
int /*<<< orphan*/ sprintf(char *, char *, char *, long);
char *rul__gen_get_cur_ret_val_name(void) {
  static char name_buffer[50];
  long bl_num;
  bl_num = rul__conrg_get_cur_block_index();
  sprintf(name_buffer, "%s%ld_ret_val", "rul_", bl_num);
  return (name_buffer);
}


x86 assembly (clang, -O0):
<rul__gen_get_cur_ret_val_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rul__conrg_get_cur_block_index@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0x2f02(%rip),%rdi
lea    0xebb(%rip),%rsi
lea    0xec2(%rip),%rdx
call   1040 <sprintf@plt>
lea    0x2ee8(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rul__gen_get_cur_ret_val_name>:
push   %rbx
xor    %eax,%eax
call   1030 <rul__conrg_get_cur_block_index@plt>
lea    0x2f11(%rip),%rbx
lea    0xeca(%rip),%rsi
lea    0xed1(%rip),%rdx
mov    %rbx,%rdi
mov    %rax,%rcx
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@rul__gen_get_cur_ret_val_name.name_buffer = internal global [50 x i8] zeroinitializer
@.str = [14 x i8] c"%s%ld_ret_val\00"
@.str.1 = [5 x i8] c"rul_\00"
define i8* @rul__gen_get_cur_ret_val_name() {
%1 = alloca i64
%2 = call i64 (...) @rul__conrg_get_cur_block_index()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @sprintf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @rul__gen_get_cur_ret_val_name.name_buffer, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret i8* getelementptr inbounds ([50 x i8], [50 x i8]* @rul__gen_get_cur_ret_val_name.name_buffer, i64 0, i64 0)
}

LLVM IR (-O2):
@rul__gen_get_cur_ret_val_name.name_buffer = internal global [50 x i8] zeroinitializer
@.str = [14 x i8] c"%s%ld_ret_val\00"
@.str.1 = [5 x i8] c"rul_\00"
define i8* @rul__gen_get_cur_ret_val_name() {
%1 = tail call i64 (...) @rul__conrg_get_cur_block_index()
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @rul__gen_get_cur_ret_val_name.name_buffer, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %1)
ret i8* getelementptr inbounds ([50 x i8], [50 x i8]* @rul__gen_get_cur_ret_val_name.name_buffer, i64 0, i64 0)
}
/* Variables and functions */
int is_alpha(char);
int is_number(char);
int l_location(char *str) {
  if (is_alpha(str[5]) == -1 || is_number(str[6]) == -1)
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<l_location>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x5(%rax),%edi
call   1040 <is_alpha@plt>
cmp    $0xffffffff,%eax
je     1158 <l_location+0x38>
mov    -0x10(%rbp),%rax
movsbl 0x6(%rax),%edi
call   1030 <is_number@plt>
cmp    $0xffffffff,%eax
jne    1164 <l_location+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <l_location+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_location>:
push   %rbx
mov    %rdi,%rbx
movsbl 0x5(%rdi),%edi
call   1040 <is_alpha@plt>
cmp    $0xffffffff,%eax
je     1149 <l_location+0x29>
movsbl 0x6(%rbx),%edi
call   1030 <is_number@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
sete   %al
neg    %eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @l_location(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 5
%6 = load i8, i8* %5
%7 = call i32 @is_alpha(i8 signext %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %15, label %9
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 6
%12 = load i8, i8* %11
%13 = call i32 @is_number(i8 signext %12)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %16
15: ; preds = %9, %1
store i32 -1, i32* %2
br label %17
16: ; preds = %9
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @l_location(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 5
%3 = load i8, i8* %2
%4 = tail call i32 @is_alpha(i8 signext %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %0, i64 6
%8 = load i8, i8* %7
%9 = tail call i32 @is_number(i8 signext %8)
%10 = icmp eq i32 %9, -1
%11 = sext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ -1, %1 ], [ %11, %6 ]
ret i32 %13
}
void compute_add_sources_ac_cuda_(long *Mesh_pointer, int *iphasef, int *itf) {}


x86 assembly (clang, -O0):
<compute_add_sources_ac_cuda_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @compute_add_sources_ac_cuda_(i64* %0, i32* %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i32*
%6 = alloca i32*
store i64* %0, i64** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
define void @compute_add_sources_ac_cuda_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ halt(char *, char *);
int /*<<< orphan*/ *open_file_follow_system_path(char *, char *);
FILE *open_system_file(char *name) {
  FILE *tmp = open_file_follow_system_path(name, "rt");
  if (tmp == NULL)
    halt("Can't open '%s'.", name);
  return (tmp);
}


x86 assembly (clang, -O0):
<open_system_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <open_file_follow_system_path@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <open_system_file+0x3b>
mov    -0x8(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <halt@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_system_file>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
call   1040 <open_file_follow_system_path@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114a <open_system_file+0x2a>
lea    0xec1(%rip),%rdi
mov    %r14,%rsi
call   1030 <halt@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rt\00"
@.str.1 = [17 x i8] c"Can't open '%s'.\00"
define i32* @open_system_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @open_file_follow_system_path(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @halt(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load i32*, i32** %3
ret i32* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"rt\00"
@.str.1 = [17 x i8] c"Can't open '%s'.\00"
define i32* @open_system_file(i8* %0) {
%2 = tail call i32* @open_file_follow_system_path(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @halt(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ edit_cur_head();
int /*<<< orphan*/ edit_kill();
void edit_clear() {
  edit_cur_head();
  edit_kill();
}


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

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

LLVM IR (-O0):
define void @edit_clear() {
%1 = call i32 (...) @edit_cur_head()
%2 = call i32 (...) @edit_kill()
ret void
}

LLVM IR (-O2):
define void @edit_clear() {
%1 = tail call i32 (...) @edit_cur_head()
%2 = tail call i32 (...) @edit_kill()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strstrip(char *, char *);
int main(void) {
  char string[20] = "RANDOM STRING";
  char vowel[20] = "AEIOU";
  strstrip(string, vowel);
  printf("Modified string:%s\n", string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec6(%rip),%eax
mov    %eax,-0x30(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <strstrip@plt>
lea    -0x20(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x30(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0x20(%rsp),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <strstrip@plt>
lea    0xed1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.string = [20 x i8] c"RANDOM STRING\00\00\00\00\00\00\00"
@__const.main.vowel = [20 x i8] c"AEIOU\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [20 x i8] c"Modified string:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca [20 x i8]
store i32 0, i32* %1
%4 = bitcast [20 x i8]* %2 to i8*
%5 = bitcast [20 x i8]* %3 to i8*
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = call i32 @strstrip(i8* %6, i8* %7)
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string = [20 x i8] c"RANDOM STRING\00\00\00\00\00\00\00"
@__const.main.vowel = [20 x i8] c"AEIOU\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [20 x i8] c"Modified string:%s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @strstrip(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
double _get_uchar(const char *data, size_t pos) {
  unsigned char *buf = (unsigned char *)data;
  return ((double)buf[pos]);
}


x86 assembly (clang, -O0):
<_get_uchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_uchar>:
movzbl (%rdi,%rsi,1),%eax
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @_get_uchar(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i64, i64* %4
%9 = getelementptr inbounds i8, i8* %7, i64 %8
%10 = load i8, i8* %9
%11 = uitofp i8 %10 to double
ret double %11
}

LLVM IR (-O2):
define double @_get_uchar(i8* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
%4 = load i8, i8* %3
%5 = uitofp i8 %4 to double
ret double %5
}
/* Variables and functions */
double __nv_log(double);
double log(double __a) { return __nv_log(__a); }


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

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

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

LLVM IR (-O2):
define double @log(double %0) {
%2 = tail call double @__nv_log(double %0)
ret double %2
}
int fegetround(void) {
  int cw;
  __asm__("fnstcw %0" : "=m"(*&cw));
  return cw & 0xc00;
}


x86 assembly (clang, -O0):
<fegetround>:
push   %rbp
mov    %rsp,%rbp
fnstcw -0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xc00,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fegetround>:
fnstcw -0x4(%rsp)
mov    $0xc00,%eax
and    -0x4(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @fegetround() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* %1
%4 = and i32 %3, 3072
ret i32 %4
}
int nextPow2(unsigned int x) {
  --x;
  x |= x >> 1;
  x |= x >> 2;
  x |= x >> 4;
  x |= x >> 8;
  x |= x >> 16;
  return ++x;
}


x86 assembly (clang, -O0):
<nextPow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-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),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextPow2>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
shr    %ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
shr    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
shr    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @nextPow2(i32 %0) {
%2 = add i32 %0, -1
%3 = lshr i32 %2, 1
%4 = or i32 %3, %2
%5 = lshr i32 %4, 2
%6 = or i32 %5, %4
%7 = lshr i32 %6, 4
%8 = or i32 %7, %6
%9 = lshr i32 %8, 8
%10 = or i32 %9, %8
%11 = lshr i32 %10, 16
%12 = or i32 %11, %10
%13 = add i32 %12, 1
ret i32 %13
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __nanosleep(const struct timespec *requested_time,
                struct timespec *remaining) {
  __set_errno(ENOSYS);
  return -1;
}


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

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

LLVM IR (-O0):
%struct.timespec = type { i32 }
@ENOSYS = global i32 0
define i32 @__nanosleep(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@ENOSYS = global i32 0
define i32 @__nanosleep(%struct.timespec* nocapture readnone %0, %struct.timespec* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
/* Variables and functions */
bool gumbo_isalpha(int c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; }


x86 assembly (clang, -O0):
<gumbo_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
or     $0x20,%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x5(%rbp)
jl     112a <gumbo_isalpha+0x2a>
mov    -0x4(%rbp),%eax
or     $0x20,%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gumbo_isalpha>:
or     $0x20,%edi
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @gumbo_isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = or i32 %3, 32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = or i32 %7, 32
%9 = icmp sle i32 %8, 122
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @gumbo_isalpha(i32 %0) {
%2 = or i32 %0, 32
%3 = add i32 %2, -97
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
char uVtToUpper(char c) {
  if ((c <= 'z') && (c >= 'a'))
    return c - 'a' + 'A';
  return c;
}


x86 assembly (clang, -O0):
<uVtToUpper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1136 <uVtToUpper+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1136 <uVtToUpper+0x36>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    113c <uVtToUpper+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uVtToUpper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @uVtToUpper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void ldisc_deregister(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


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

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

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

LLVM IR (-O2):
define void @ldisc_deregister() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
void test15() { int x = x; }


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

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

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

LLVM IR (-O2):
define void @test15() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_fd6_connect();
int /*<<< orphan*/ test_fd_connect();
int /*<<< orphan*/ test_gai_connect();
int /*<<< orphan*/ test_http_connect();
int main(void) {
  test_fd_connect();
  test_fd6_connect();
  test_http_connect();
  test_gai_connect();
  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_fd_connect@plt>
mov    $0x0,%al
call   1060 <test_fd6_connect@plt>
mov    $0x0,%al
call   1040 <test_http_connect@plt>
mov    $0x0,%al
call   1050 <test_gai_connect@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_fd_connect@plt>
xor    %eax,%eax
call   1060 <test_fd6_connect@plt>
xor    %eax,%eax
call   1040 <test_http_connect@plt>
xor    %eax,%eax
call   1050 <test_gai_connect@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_fd_connect()
%3 = call i32 (...) @test_fd6_connect()
%4 = call i32 (...) @test_http_connect()
%5 = call i32 (...) @test_gai_connect()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_fd_connect()
%2 = tail call i32 (...) @test_fd6_connect()
%3 = tail call i32 (...) @test_http_connect()
%4 = tail call i32 (...) @test_gai_connect()
ret i32 0
}
void _default_handler(void) { return; }


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

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

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

LLVM IR (-O2):
define void @_default_handler() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int a4;
};
typedef TYPE_1__ xfrm_address_t;

/* Variables and functions */
unsigned int ntohl(int);
unsigned int __xfrm4_daddr_saddr_hash(xfrm_address_t *daddr,
                                      xfrm_address_t *saddr) {
  return ntohl(daddr->a4 ^ saddr->a4);
}


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

x86 assembly (clang, -O2):
<__xfrm4_daddr_saddr_hash>:
mov    (%rsi),%eax
xor    (%rdi),%eax
mov    %eax,%edi
jmp    1030 <ntohl@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32 }
define i32 @__xfrm4_daddr_saddr_hash(%struct.TYPE_4__* %0, %struct.TYPE_4__* %1) {
%3 = alloca %struct.TYPE_4__*
%4 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = xor i32 %7, %10
%12 = call i32 @ntohl(i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32 }
define i32 @__xfrm4_daddr_saddr_hash(%struct.TYPE_4__* nocapture %0, %struct.TYPE_4__* nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = xor i32 %6, %4
%8 = tail call i32 @ntohl(i32 %7)
ret i32 %8
}
void ff_hevc_put_hevc_bi_epel_h16_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h16_10_avx2() {
ret void
}
int test_imm_ADuint16_mem(unsigned short *val) {
  return ((*val) & (-0xAD << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_ADuint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -173
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_ADuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -173
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ stv5730_write16bit(unsigned int, unsigned int, int);
void stv5730_locate(unsigned int port, unsigned int flags, int row, int col) {
  if (row < 0 || row >= 11 || col < 0 || col >= 28)
    return;
  stv5730_write16bit(port, flags, (row << 8) + col);
}


x86 assembly (clang, -O0):
<stv5730_locate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     114c <stv5730_locate+0x3c>
cmpl   $0xb,-0xc(%rbp)
jge    114c <stv5730_locate+0x3c>
cmpl   $0x0,-0x10(%rbp)
jl     114c <stv5730_locate+0x3c>
cmpl   $0x1c,-0x10(%rbp)
jl     1151 <stv5730_locate+0x41>
jmp    1165 <stv5730_locate+0x55>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
shl    $0x8,%edx
add    -0x10(%rbp),%edx
call   1030 <stv5730_write16bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stv5730_locate>:
cmp    $0xa,%edx
ja     1124 <stv5730_locate+0x14>
cmp    $0x1b,%ecx
ja     1124 <stv5730_locate+0x14>
shl    $0x8,%edx
add    %ecx,%edx
jmp    1030 <stv5730_write16bit@plt>
ret

LLVM IR (-O0):
define void @stv5730_locate(i32 %0, i32 %1, i32 %2, i32 %3) {
%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 %3, i32* %8
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 0
br i1 %10, label %20, label %11
11: ; preds = %4
%12 = load i32, i32* %7
%13 = icmp sge i32 %12, 11
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %8
%19 = icmp sge i32 %18, 28
br i1 %19, label %20, label %21
20: ; preds = %17, %14, %11, %4
br label %29
21: ; preds = %17
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = shl i32 %24, 8
%26 = load i32, i32* %8
%27 = add nsw i32 %25, %26
%28 = call i32 @stv5730_write16bit(i32 %22, i32 %23, i32 %27)
br label %29
29: ; preds = %21, %20
ret void
}

LLVM IR (-O2):
define void @stv5730_locate(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ugt i32 %2, 10
%6 = icmp ugt i32 %3, 27
%7 = or i1 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = shl nuw nsw i32 %2, 8
%10 = add nuw nsw i32 %9, %3
%11 = tail call i32 @stv5730_write16bit(i32 %0, i32 %1, i32 %10)
br label %12
12: ; preds = %4, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void open_url(char *url) {
  char launch[255];
  sprintf(launch, "echo x-www-browser '%s' &", url);
  system(launch);
}


x86 assembly (clang, -O0):
<open_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_url>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"echo x-www-browser '%s' &\00"
define void @open_url(i8* %0) {
%2 = alloca i8*
%3 = alloca [255 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"echo x-www-browser '%s' &\00"
define void @open_url(i8* %0) {
%2 = alloca [255 x i8]
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
ret void
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(int, scalar_t__);
void *__attribute__((malloc)) xmalloc(ssize_t size) {
  void *ptr;
  if (size <= 0)
    return NULL;
  ptr = calloc(1, size);
  if (!ptr)
    abort();
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jg     1144 <xmalloc+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1170 <xmalloc+0x50>
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1168 <xmalloc+0x48>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
test   %rdi,%rdi
jle    113a <xmalloc+0x1a>
mov    %rdi,%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
test   %rax,%rax
je     113e <xmalloc+0x1e>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define noalias i8* @xmalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp sle i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %17
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i8* @calloc(i32 1, i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %8
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %8
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %15, %7
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = icmp slt i64 %0, 1
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @calloc(i32 1, i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int a = 3, b = 6, c = 9, d;
  d = ((((((a) > (b)) ? (a) : (b)) > (c)) ? (((a) > (b)) ? (a) : (b)) : (c)));
  printf("d:%i\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x9,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114b <main+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1151 <main+0x41>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1185 <main+0x75>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1174 <main+0x64>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    117a <main+0x6a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    118b <main+0x7b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"d:%i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 0
}
void f(void) {
  void *p = &&a;
  goto *p;
a:;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
lea    0x11(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    111e <f+0x1e>
pop    %rbp
ret
mov    -0x10(%rbp),%rax
jmp    *%rax

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i8*
store i8* blockaddress(@f, %3), i8** %1
%2 = load i8*, i8** %1
br label %4
3: ; preds = %4
ret void
4: ; preds = %0
%5 = phi i8* [ %2, %0 ]
indirectbr i8* %5, [label %3]
}

LLVM IR (-O2):
define void @f() {
ret void
}
void gen_rotate(struct tg_context *context, struct TG_rotate *opts) {}


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

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

LLVM IR (-O0):
%struct.tg_context = type opaque
%struct.TG_rotate = type opaque
define void @gen_rotate(%struct.tg_context* %0, %struct.TG_rotate* %1) {
%3 = alloca %struct.tg_context*
%4 = alloca %struct.TG_rotate*
store %struct.tg_context* %0, %struct.tg_context** %3
store %struct.TG_rotate* %1, %struct.TG_rotate** %4
ret void
}

LLVM IR (-O2):
%struct.tg_context = type opaque
%struct.TG_rotate = type opaque
define void @gen_rotate(%struct.tg_context* nocapture %0, %struct.TG_rotate* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_seq_mail(char *s) { return (char *)mock(s); }


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

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

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

LLVM IR (-O2):
define i8* @cf_s_seq_mail(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
long long int power(long long int n, long long int k) {
  long long int p, q = 1, i;
  p = n * k;
  for (i = 0; i < p; i++)
    q = q * 2;
  return q;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x20(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1154 <power+0x54>
mov    -0x20(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1129 <power+0x29>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
imul   %rsi,%rdi
test   %rdi,%rdi
jle    111f <power+0x1f>
lea    -0x1(%rdi),%rax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1125 <power+0x25>
mov    $0x1,%eax
jmp    113a <power+0x3a>
mov    $0x1,%eax
ret
and    $0xfffffffffffffff8,%rdi
mov    $0x1,%eax
xchg   %ax,%ax
shl    $0x8,%rax
add    $0xfffffffffffffff8,%rdi
jne    1130 <power+0x30>
test   %rcx,%rcx
je     1149 <power+0x49>
nop
add    %rax,%rax
add    $0xffffffffffffffff,%rcx
jne    1140 <power+0x40>
ret

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

LLVM IR (-O2):
define i64 @power(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %27
5: ; preds = %2
%6 = add i64 %3, -1
%7 = and i64 %3, 7
%8 = icmp ult i64 %6, 7
br i1 %8, label %17, label %9
9: ; preds = %5
%10 = and i64 %3, -8
br label %11
11: ; preds = %11, %9
%12 = phi i64 [ 1, %9 ], [ %14, %11 ]
%13 = phi i64 [ 0, %9 ], [ %15, %11 ]
%14 = shl i64 %12, 8
%15 = add i64 %13, 8
%16 = icmp eq i64 %15, %10
br i1 %16, label %17, label %11
17: ; preds = %11, %5
%18 = phi i64 [ undef, %5 ], [ %14, %11 ]
%19 = phi i64 [ 1, %5 ], [ %14, %11 ]
%20 = icmp eq i64 %7, 0
br i1 %20, label %27, label %21
21: ; preds = %17, %21
%22 = phi i64 [ %24, %21 ], [ %19, %17 ]
%23 = phi i64 [ %25, %21 ], [ 0, %17 ]
%24 = shl nsw i64 %22, 1
%25 = add i64 %23, 1
%26 = icmp eq i64 %25, %7
br i1 %26, label %27, label %21
27: ; preds = %17, %21, %2
%28 = phi i64 [ 1, %2 ], [ %18, %17 ], [ %24, %21 ]
ret i64 %28
}