xunge/DecIR huggingface dataset:
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ list_len(struct list *);
int /*<<< orphan*/ list_lpop(struct list *);
void list_clear(struct list *list) {
  assert(list != NULL);
  while (list_len(list) != 0)
    list_lpop(list);
}


x86 assembly (clang, -O0):
<list_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <list_len@plt>
cmp    $0x0,%rax
je     116f <list_clear+0x3f>
mov    -0x8(%rbp),%rdi
call   1040 <list_lpop@plt>
jmp    114e <list_clear+0x1e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_clear>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1050 <list_len@plt>
test   %rax,%rax
je     1167 <list_clear+0x37>
mov    %rbx,%rdi
call   1040 <list_lpop@plt>
jmp    1150 <list_clear+0x20>
pop    %rbx
ret

LLVM IR (-O0):
%struct.list = type { i32 }
define void @list_clear(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
%4 = icmp ne %struct.list* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
br label %7
7: ; preds = %11, %1
%8 = load %struct.list*, %struct.list** %2
%9 = call i64 @list_len(%struct.list* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load %struct.list*, %struct.list** %2
%13 = call i32 @list_lpop(%struct.list* %12)
br label %7
14: ; preds = %7
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_clear(%struct.list* %0) {
%2 = icmp ne %struct.list* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i64 @list_len(%struct.list* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1, %7
%8 = tail call i32 @list_lpop(%struct.list* %0)
%9 = tail call i64 @list_len(%struct.list* %0)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %7
11: ; preds = %7, %1
ret void
}
void clear_gpio_function(int *function_select_register, int bit_offset) {
  *function_select_register &= ~(0b111 << bit_offset);
}


x86 assembly (clang, -O0):
<clear_gpio_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x7,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_gpio_function>:
mov    %esi,%ecx
mov    $0x7,%eax
shl    %cl,%eax
not    %eax
and    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @clear_gpio_function(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 7, %5
%7 = xor i32 %6, -1
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = and i32 %9, %7
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @clear_gpio_function(i32* nocapture %0, i32 %1) {
%3 = shl i32 7, %1
%4 = xor i32 %3, -1
%5 = load i32, i32* %0
%6 = and i32 %5, %4
store i32 %6, i32* %0
ret void
}
/* Variables and functions */
scalar_t__ log2(double);
float log2f(float x) { return (float)log2((double)x); }


x86 assembly (clang, -O0):
<log2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <log2@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2f>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <log2@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @log2f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @log2(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @log2f(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @log2(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ get_extension(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int is_pls_extension(char *string) {
  char extension[10];
  if (string == NULL)
    return 0;
  get_extension(extension, string);
  if (!strcmp(extension, "pls"))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_pls_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <is_pls_extension+0x23>
movl   $0x0,-0x4(%rbp)
jmp    117c <is_pls_extension+0x5c>
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <get_extension@plt>
lea    -0x1a(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1175 <is_pls_extension+0x55>
movl   $0x1,-0x4(%rbp)
jmp    117c <is_pls_extension+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pls_extension>:
test   %rdi,%rdi
je     1138 <is_pls_extension+0x28>
sub    $0x18,%rsp
mov    %rdi,%rsi
lea    0xe(%rsp),%rdi
call   1030 <get_extension@plt>
xor    %eax,%eax
cmpl   $0x736c70,0xe(%rsp)
sete   %al
add    $0x18,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"pls\00"
define i32 @is_pls_extension(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [10 x i8]
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %17
8: ; preds = %1
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%10 = load i8*, i8** %3
%11 = call i32 @get_extension(i8* %9, i8* %10)
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%13 = call i32 @strcmp(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %8
store i32 1, i32* %2
br label %17
16: ; preds = %8
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [4 x i8] c"pls\00"
define i32 @is_pls_extension(i8* %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = icmp eq i8* %0, null
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = call i32 @get_extension(i8* %3, i8* %0)
%7 = call i32 @bcmp(i8* dereferenceable(4) %3, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 4)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  void xyz(void);
  xyz();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
call   1040 <xyz@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <xyz@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void @xyz()
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int rl_beginning_of_history(count, key)
int count __attribute__((unused)), key;
{ return (rl_get_previous_history(1 + where_history(), key)); }


x86 assembly (clang, -O0):
<rl_beginning_of_history>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <where_history@plt>
mov    %eax,%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1040 <rl_get_previous_history@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rl_beginning_of_history>:
push   %rbx
mov    %esi,%ebx
xor    %eax,%eax
call   1030 <where_history@plt>
lea    0x1(%rax),%edi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <rl_get_previous_history@plt>

LLVM IR (-O0):
define i32 @rl_beginning_of_history(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @where_history()
%6 = add nsw i32 1, %5
%7 = load i32, i32* %4
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_get_previous_history to i32 (i32, i32, ...)*)(i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @rl_beginning_of_history(i32 %0, i32 %1) {
%3 = tail call i32 (...) @where_history()
%4 = add nsw i32 %3, 1
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_get_previous_history to i32 (i32, i32, ...)*)(i32 %4, i32 %1)
ret i32 %5
}
void f0(int i, long j, double k) {}


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f0(i32 %0, i64 %1, double %2) {
ret void
}
void model_FD_ZERO(void *fdset) {
  unsigned i;
  for (i = 0; i < 1024 / 8 / sizeof(long); ++i)
    ((long *)fdset)[i] = 0;
}


x86 assembly (clang, -O0):
<model_FD_ZERO>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0x10,%rax
jae    1139 <model_FD_ZERO+0x39>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movq   $0x0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <model_FD_ZERO+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<model_FD_ZERO>:
xorps  %xmm0,%xmm0
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @model_FD_ZERO(i8* nocapture writeonly %0) {
ret void
}
void alarm_handler(int signo) {}


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

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

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

LLVM IR (-O2):
define void @alarm_handler(i32 %0) {
ret void
}
void mdp4_dsi_video_base_swap(struct mdp4_overlay_pipe *pipe) {}


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

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

LLVM IR (-O0):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_dsi_video_base_swap(%struct.mdp4_overlay_pipe* %0) {
%2 = alloca %struct.mdp4_overlay_pipe*
store %struct.mdp4_overlay_pipe* %0, %struct.mdp4_overlay_pipe** %2
ret void
}

LLVM IR (-O2):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_dsi_video_base_swap(%struct.mdp4_overlay_pipe* nocapture %0) {
ret void
}
/* Variables and functions */
int getop(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  while (1) {
    char s[1024];
    int op = getop(s);
    printf("op: %c\n", op);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
call   1040 <getop@plt>
mov    %eax,-0x414(%rbp)
mov    -0x414(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rsp,%r14
lea    0xecc(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
call   1040 <getop@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
jmp    1140 <main+0x20>

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

LLVM IR (-O2):
@.str = [8 x i8] c"op: %c\0A\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %3
%4 = call i32 @getop(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %3
}
void function_three() {}


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

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

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

LLVM IR (-O2):
define void @function_three() {
ret void
}
unsigned int ps_getg(int c) { return (c >> 8) & 0xff; }


x86 assembly (clang, -O0):
<ps_getg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps_getg>:
mov    %edi,%eax
movzbl %ah,%eax
ret

LLVM IR (-O0):
define i32 @ps_getg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = and i32 %4, 255
ret i32 %5
}

LLVM IR (-O2):
define i32 @ps_getg(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ decrement_references_count(void *);
void free_object_list_handler(void *ptr) { decrement_references_count(ptr); }


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

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

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

LLVM IR (-O2):
define void @free_object_list_handler(i8* %0) {
%2 = tail call i32 @decrement_references_count(i8* %0)
ret void
}
int test_imm_22int16_mem(short *val) {
  return ((*val) & (-0x22 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_22int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -34
%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_22int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -34
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pixel_pack_portable_s16u8_uv(short *, unsigned char *,
                                                unsigned int);
int /*<<< orphan*/ pixel_pack_portable_s16u8_y(short *, unsigned char *,
                                               unsigned int);
void llconv_yvu_planar_s16u8(short int *src, unsigned char *dst,
                             unsigned int nbpixels) {
  pixel_pack_portable_s16u8_y(src, dst, nbpixels);
  pixel_pack_portable_s16u8_uv(src + nbpixels, dst + nbpixels, nbpixels >> 1);
}


x86 assembly (clang, -O0):
<llconv_yvu_planar_s16u8>:
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 <pixel_pack_portable_s16u8_y@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
shl    $0x1,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
shr    $0x1,%edx
call   1040 <pixel_pack_portable_s16u8_uv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llconv_yvu_planar_s16u8>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <pixel_pack_portable_s16u8_y@plt>
mov    %ebx,%eax
lea    (%r15,%rax,2),%rdi
add    %rax,%r14
shr    %ebx
mov    %r14,%rsi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <pixel_pack_portable_s16u8_uv@plt>

LLVM IR (-O0):
define void @llconv_yvu_planar_s16u8(i16* %0, i8* %1, i32 %2) {
%4 = alloca i16*
%5 = alloca i8*
%6 = alloca i32
store i16* %0, i16** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i16*, i16** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @pixel_pack_portable_s16u8_y(i16* %7, i8* %8, i32 %9)
%11 = load i16*, i16** %4
%12 = load i32, i32* %6
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i16, i16* %11, i64 %13
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i32, i32* %6
%20 = lshr i32 %19, 1
%21 = call i32 @pixel_pack_portable_s16u8_uv(i16* %14, i8* %18, i32 %20)
ret void
}

LLVM IR (-O2):
define void @llconv_yvu_planar_s16u8(i16* %0, i8* %1, i32 %2) {
%4 = tail call i32 @pixel_pack_portable_s16u8_y(i16* %0, i8* %1, i32 %2)
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds i16, i16* %0, i64 %5
%7 = getelementptr inbounds i8, i8* %1, i64 %5
%8 = lshr i32 %2, 1
%9 = tail call i32 @pixel_pack_portable_s16u8_uv(i16* %6, i8* %7, i32 %8)
ret void
}
int m_toupper(int c) { return (c >= 'a' && c <= 'z') ? (c - 0x20) : c; }


x86 assembly (clang, -O0):
<m_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1129 <m_toupper+0x29>
cmpl   $0x7a,-0x4(%rbp)
jg     1129 <m_toupper+0x29>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <m_toupper+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @m_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
float AURAE_sqrtf2(unsigned int fsq2) {
  float fsq1 = 1;
  while (fsq1 < fsq2) {
    fsq1 = fsq1 * 2;
    fsq2 = fsq2 / 2;
  }
  fsq1 = (fsq1 + fsq2) / 2;
  return fsq1;
}


x86 assembly (clang, -O0):
<AURAE_sqrtf2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  0xef1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
ucomiss %xmm1,%xmm0
jbe    114a <AURAE_sqrtf2+0x4a>
movss  0xed2(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1114 <AURAE_sqrtf2+0x14>
movss  -0x8(%rbp),%xmm0
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm1
addss  %xmm1,%xmm0
movss  0xea1(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<AURAE_sqrtf2>:
cmp    $0x2,%edi
jb     1124 <AURAE_sqrtf2+0x24>
movss  0xef3(%rip),%xmm0
nopl   (%rax)
shr    %edi
xorps  %xmm1,%xmm1
cvtsi2ss %edi,%xmm1
addss  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
ja     1110 <AURAE_sqrtf2+0x10>
jmp    1133 <AURAE_sqrtf2+0x33>
mov    %edi,%eax
cvtsi2ss %rax,%xmm1
movss  0xecd(%rip),%xmm0
addss  %xmm1,%xmm0
mulss  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define float @AURAE_sqrtf2(i32 %0) {
%2 = alloca i32
%3 = alloca float
store i32 %0, i32* %2
store float 1.000000e+00, float* %3
br label %4
4: ; preds = %9, %1
%5 = load float, float* %3
%6 = load i32, i32* %2
%7 = uitofp i32 %6 to float
%8 = fcmp olt float %5, %7
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load float, float* %3
%11 = fmul float %10, 2.000000e+00
store float %11, float* %3
%12 = load i32, i32* %2
%13 = udiv i32 %12, 2
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load float, float* %3
%16 = load i32, i32* %2
%17 = uitofp i32 %16 to float
%18 = fadd float %15, %17
%19 = fdiv float %18, 2.000000e+00
store float %19, float* %3
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @AURAE_sqrtf2(i32 %0) {
%2 = uitofp i32 %0 to float
%3 = icmp ugt i32 %0, 1
br i1 %3, label %4, label %11
4: ; preds = %1, %4
%5 = phi float [ %7, %4 ], [ 1.000000e+00, %1 ]
%6 = phi i32 [ %8, %4 ], [ %0, %1 ]
%7 = fmul float %5, 2.000000e+00
%8 = lshr i32 %6, 1
%9 = uitofp i32 %8 to float
%10 = fcmp olt float %7, %9
br i1 %10, label %4, label %11
11: ; preds = %4, %1
%12 = phi float [ 1.000000e+00, %1 ], [ %7, %4 ]
%13 = phi float [ %2, %1 ], [ %9, %4 ]
%14 = fadd float %12, %13
%15 = fmul float %14, 5.000000e-01
ret float %15
}
/* Variables and functions */
int /*<<< orphan*/ __arch_atomic_dec(long *);
void sas_atomic_dec(long int *p) { __arch_atomic_dec(p); }


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

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

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

LLVM IR (-O2):
define void @sas_atomic_dec(i64* %0) {
%2 = tail call i32 @__arch_atomic_dec(i64* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void apply_print(void **ptr, void *cl) {
  FILE *fptr = cl;
  fprintf(fptr, "%s\n", (char *)*ptr);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @apply_print(i8** nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i8*, i8** %0
%5 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
int(ars_d_set_ipopt_rr)(struct ars_packet *pkt, int layer, char *f, char *v) {
  return 0;
}


x86 assembly (clang, -O0):
<ars_d_set_ipopt_rr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ars_packet = type opaque
define i32 @ars_d_set_ipopt_rr(%struct.ars_packet* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca %struct.ars_packet*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.ars_packet* %0, %struct.ars_packet** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret i32 0
}

LLVM IR (-O2):
%struct.ars_packet = type opaque
define i32 @ars_d_set_ipopt_rr(%struct.ars_packet* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
int get_endian(uint8_t ei_data) {
  switch (ei_data) {
  case 1:
    return 0;
  case 2:
    return 1;
  default:
    errx(1, "Unknown endian.");
  }
}


x86 assembly (clang, -O0):
<get_endian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1140 <get_endian+0x30>
jmp    112f <get_endian+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     114c <get_endian+0x3c>
jmp    1158 <get_endian+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1169 <get_endian+0x59>
movl   $0x1,-0x4(%rbp)
jmp    1169 <get_endian+0x59>
mov    $0x1,%edi
lea    0xe9c(%rip),%rsi
call   1030 <errx@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_endian>:
cmp    $0x1,%edi
je     1120 <get_endian+0x10>
cmp    $0x2,%edi
jne    1123 <get_endian+0x13>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret
push   %rax
lea    0xed5(%rip),%rsi
mov    $0x1,%edi
call   1030 <errx@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Unknown endian.\00"
define i32 @get_endian(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 1, label %5
i32 2, label %6
]
5: ; preds = %1
store i32 0, i32* %2
br label %9
6: ; preds = %1
store i32 1, i32* %2
br label %9
7: ; preds = %1
%8 = call i32 @errx(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %5, %6, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [16 x i8] c"Unknown endian.\00"
define i32 @get_endian(i32 %0) {
switch i32 %0, label %3 [
i32 1, label %5
i32 2, label %2
]
2: ; preds = %1
br label %5
3: ; preds = %1
%4 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %1, %2, %3
%6 = phi i32 [ undef, %3 ], [ 1, %2 ], [ 0, %1 ]
ret i32 %6
}
char function(char test[]) { return test[3]; }


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<function>:
mov    0x3(%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 3
%5 = load i8, i8* %4
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @function(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
ret i8 %3
}
int search(struct autotools *at) {
  printf("%s, %s, %d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/"
         "base-usage/make_study/search.c",
         __func__, 14);
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xedd(%rip),%rdi
lea    0xee2(%rip),%rsi
lea    0xf7e(%rip),%rdx
mov    $0xe,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xf8a(%rip),%rdx
mov    $0xe,%ecx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.autotools = type opaque
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/search.c\00"
@__func__.search = [7 x i8] c"search\00"
define i32 @search(%struct.autotools* %0) {
%2 = alloca i32
%3 = alloca %struct.autotools*
store %struct.autotools* %0, %struct.autotools** %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.search, i64 0, i64 0), i32 14)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
%struct.autotools = type opaque
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/search.c\00"
@__func__.search = [7 x i8] c"search\00"
define i32 @search(%struct.autotools* nocapture readnone %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.search, i64 0, i64 0), i32 14)
ret i32 undef
}
untyped_oldstyle2(arg1, arg2) int arg1;
char arg2;
{ ; }


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

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

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

LLVM IR (-O2):
define i32 @untyped_oldstyle2(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int /*<<< orphan*/ baz(int *);
void foo(int *x) {
  if (*x < 0) {
    baz(x);
    return;
  }
  bar(*x);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jge    1147 <foo+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <baz@plt>
jmp    1152 <foo+0x32>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    (%rdi),%eax
test   %eax,%eax
js     112d <foo+0xd>
mov    %eax,%edi
jmp    1040 <bar@plt>
jmp    1030 <baz@plt>

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

LLVM IR (-O2):
define void @foo(i32* %0) {
%2 = load i32, i32* %0
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @baz(i32* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @bar(i32 %2)
br label %8
8: ; preds = %6, %4
ret void
}
fputs(dev, s) register char *s;
register int dev;
{
  register r;
  register c;
  int putc();
  while (c = *s++)
    r = putc(dev, c);
  return (r);
}


x86 assembly (clang, -O0):
<fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     1152 <fputs+0x42>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0x0,%al
call   1030 <putc@plt>
mov    %eax,-0x14(%rbp)
jmp    111f <fputs+0xf>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%cl
test   %cl,%cl
je     1149 <fputs+0x39>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %cl,%esi
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <putc@plt>
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <fputs+0x20>
jmp    1149 <fputs+0x39>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fputs(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @putc to i32 (i32, i32, ...)*)(i32 %0, i32 %8)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i32 [ undef, %2 ], [ %10, %5 ]
ret i32 %14
}
/* Variables and functions */
char *fcitx_utils_set_escape_str_with_set(char *, char const *,
                                          int /*<<< orphan*/ *);
char *fcitx_utils_set_escape_str(char *res, const char *str) {
  return fcitx_utils_set_escape_str_with_set(res, str, NULL);
}


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

x86 assembly (clang, -O2):
<fcitx_utils_set_escape_str>:
xor    %edx,%edx
jmp    1030 <fcitx_utils_set_escape_str_with_set@plt>

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

LLVM IR (-O2):
define i8* @fcitx_utils_set_escape_str(i8* %0, i8* %1) {
%3 = tail call i8* @fcitx_utils_set_escape_str_with_set(i8* %0, i8* %1, i32* null)
ret i8* %3
}
int test_imm_B2uint16_mem(unsigned short *val) {
  return ((*val) & (0xB2 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B2uint16_mem>:
testb  $0xb2,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B2uint16_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, 178
%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_B2uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 178
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ OUTCH(char);
void OUTSTR_FAST(char *ptr) {
  char c;
  while ((c = *ptr++)) {
    OUTCH(c);
  }
}


x86 assembly (clang, -O0):
<OUTSTR_FAST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     1146 <OUTSTR_FAST+0x36>
movsbl -0x9(%rbp),%edi
call   1030 <OUTCH@plt>
jmp    111c <OUTSTR_FAST+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

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


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

x86 assembly (clang, -O2):
<pai>:
mov    %edi,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @pai(i32 %0) {
%2 = ashr i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ e_absy();
int /*<<< orphan*/ e_sbc();
void e_sbc_absy() {
  e_absy();
  e_sbc();
}


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

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

LLVM IR (-O0):
define void @e_sbc_absy() {
%1 = call i32 (...) @e_absy()
%2 = call i32 (...) @e_sbc()
ret void
}

LLVM IR (-O2):
define void @e_sbc_absy() {
%1 = tail call i32 (...) @e_absy()
%2 = tail call i32 (...) @e_sbc()
ret void
}
int test_imm_21uint8_mem(unsigned char *val) {
  return ((*val) & (0x21 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_21uint8_mem>:
testb  $0x21,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_21uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 33
%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_21uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 33
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void insertion_sort(int count, int **in) {}


x86 assembly (clang, -O0):
<insertion_sort>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @insertion_sort(i32 %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32**
store i32 %0, i32* %3
store i32** %1, i32*** %4
ret void
}

LLVM IR (-O2):
define void @insertion_sort(i32 %0, i32** nocapture %1) {
ret void
}
/* Variables and functions */
int getnb();
int /*<<< orphan*/ unget(int);
int more() {
  int c;
  c = getnb();
  unget(c);
  return ((c == '\0' || c == ';') ? 0 : 1);
}


x86 assembly (clang, -O0):
<more>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getnb@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <unget@plt>
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1153 <more+0x33>
cmpl   $0x3b,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<more>:
push   %rbx
xor    %eax,%eax
call   1040 <getnb@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <unget@plt>
test   %ebx,%ebx
setne  %al
cmp    $0x3b,%ebx
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @more() {
%1 = alloca i32
%2 = call i32 (...) @getnb()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @unget(i32 %3)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, 59
br label %10
10: ; preds = %7, %0
%11 = phi i1 [ true, %0 ], [ %9, %7 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @more() {
%1 = tail call i32 (...) @getnb()
%2 = tail call i32 @unget(i32 %1)
%3 = icmp ne i32 %1, 0
%4 = icmp ne i32 %1, 59
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int contains(float *array, float number, int to) {
  for (int i = 0; i < to; i++) {
    if (array[i] == number) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<contains>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    115f <contains+0x5f>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
ucomiss -0x14(%rbp),%xmm0
jne    114c <contains+0x4c>
jp     114c <contains+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1166 <contains+0x66>
jmp    1151 <contains+0x51>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <contains+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<contains>:
test   %esi,%esi
jle    1115 <contains+0x15>
movss  (%rdi),%xmm1
mov    $0x1,%eax
ucomiss %xmm0,%xmm1
jne    1118 <contains+0x18>
jp     1118 <contains+0x18>
ret
xor    %eax,%eax
ret
mov    %esi,%ecx
mov    $0x1,%eax
nop
mov    %rax,%rdx
cmp    %rax,%rcx
je     1138 <contains+0x38>
movss  (%rdi,%rdx,4),%xmm1
lea    0x1(%rdx),%rax
ucomiss %xmm0,%xmm1
jne    1120 <contains+0x20>
jp     1120 <contains+0x20>
xor    %eax,%eax
cmp    %rcx,%rdx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @contains(float* nocapture %0, float %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = zext i32 %2 to i64
%7 = zext i32 %2 to i64
%8 = load float, float* %0
%9 = fcmp oeq float %8, %1
br i1 %9, label %21, label %10
10: ; preds = %5, %13
%11 = phi i64 [ %17, %13 ], [ 1, %5 ]
%12 = icmp eq i64 %11, %7
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = getelementptr inbounds float, float* %0, i64 %11
%15 = load float, float* %14
%16 = fcmp oeq float %15, %1
%17 = add nuw nsw i64 %11, 1
br i1 %16, label %18, label %10
18: ; preds = %10, %13
%19 = icmp ult i64 %11, %6
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %18, %5, %3
%22 = phi i32 [ 0, %3 ], [ 1, %5 ], [ %20, %18 ]
ret i32 %22
}
void init_each_time(w) register struct worker *w;
{
  glb_init_each_time();
  local_init_each_time(w);
}


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

x86 assembly (clang, -O2):
<init_each_time>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <glb_init_each_time@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <local_init_each_time@plt>

LLVM IR (-O0):
%struct.worker = type opaque
define void @init_each_time(%struct.worker* %0) {
%2 = alloca %struct.worker*
store %struct.worker* %0, %struct.worker** %2
%3 = call i32 (...) @glb_init_each_time()
%4 = load %struct.worker*, %struct.worker** %2
%5 = call i32 (%struct.worker*, ...) bitcast (i32 (...)* @local_init_each_time to i32 (%struct.worker*, ...)*)(%struct.worker* %4)
ret void
}

LLVM IR (-O2):
%struct.worker = type opaque
define void @init_each_time(%struct.worker* %0) {
%2 = tail call i32 (...) @glb_init_each_time()
%3 = tail call i32 (%struct.worker*, ...) bitcast (i32 (...)* @local_init_each_time to i32 (%struct.worker*, ...)*)(%struct.worker* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freex(void *p) {
  if (p) {
    free(p);
  }
}


x86 assembly (clang, -O0):
<freex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <freex+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freex>:
test   %rdi,%rdi
je     111a <freex+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @freex(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @freex(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ tss_t;

/* Variables and functions */
int /*<<< orphan*/ kthread_key_delete(int /*<<< orphan*/);
void tss_delete(tss_t key) { (void)kthread_key_delete(key); }


x86 assembly (clang, -O0):
<tss_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <kthread_key_delete@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @tss_delete(i32 %0) {
%2 = tail call i32 @kthread_key_delete(i32 %0)
ret void
}
void ff_hevc_put_hevc_uni_epel_h48_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h48_12_sse4() {
ret void
}