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

/* Variables and functions */
uint32_t pciTag(int busnum, int devnum, int funcnum) {
  uint32_t tag;
  tag = (busnum & ((((0x0ffu) << 8) | 0x0ffu))) << 16;
  tag |= (devnum & 0x00001fu) << 11;
  tag |= (funcnum & 0x000007u) << 8;
  return tag;
}


x86 assembly (clang, -O0):
<pciTag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
shl    $0x10,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
shl    $0xb,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7,%eax
shl    $0x8,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pciTag>:
shl    $0x10,%edi
shl    $0xb,%esi
movzwl %si,%eax
or     %edi,%eax
and    $0x7,%edx
shl    $0x8,%edx
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @pciTag(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 16
%5 = shl i32 %1, 11
%6 = and i32 %5, 63488
%7 = or i32 %6, %4
%8 = shl i32 %2, 8
%9 = and i32 %8, 1792
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ erro(char *);
int /*<<< orphan*/ insere_lista_eventos_futuros(int, double, int);
void schedule(int num_evento, double te, int token) {
  int bufid;
  if (te < 0.0)
    erro("Rotina: schedule() - Erro: te menor que zero");
  else
    insere_lista_eventos_futuros(num_evento, te, token);
}


x86 assembly (clang, -O0):
<schedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1152 <schedule+0x32>
lea    0xeb8(%rip),%rdi
call   1030 <erro@plt>
jmp    1162 <schedule+0x42>
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%esi
call   1040 <insere_lista_eventos_futuros@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<schedule>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1136 <schedule+0x16>
lea    0xecf(%rip),%rdi
jmp    1030 <erro@plt>
jmp    1040 <insere_lista_eventos_futuros@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Rotina: schedule() - Erro: te menor que zero\00"
define void @schedule(i32 %0, double %1, i32 %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store double %1, double* %5
store i32 %2, i32* %6
%8 = load double, double* %5
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @erro(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %17
12: ; preds = %3
%13 = load i32, i32* %4
%14 = load double, double* %5
%15 = load i32, i32* %6
%16 = call i32 @insere_lista_eventos_futuros(i32 %13, double %14, i32 %15)
br label %17
17: ; preds = %12, %10
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Rotina: schedule() - Erro: te menor que zero\00"
define void @schedule(i32 %0, double %1, i32 %2) {
%4 = fcmp olt double %1, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @erro(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %3
%8 = tail call i32 @insere_lista_eventos_futuros(i32 %0, double %1, i32 %2)
br label %9
9: ; preds = %7, %5
ret void
}
/* Type definitions */
struct constructHeader {
  int dummy;
};

/* Variables and functions */
char const *GetConstructModuleName(struct constructHeader *);
const char *EnvDefglobalModule(void *theEnv, void *theDefglobal) {
  return GetConstructModuleName((struct constructHeader *)theDefglobal);
}


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

x86 assembly (clang, -O2):
<EnvDefglobalModule>:
mov    %rsi,%rdi
jmp    1030 <GetConstructModuleName@plt>

LLVM IR (-O0):
%struct.constructHeader = type { i32 }
define i8* @EnvDefglobalModule(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 = bitcast i8* %5 to %struct.constructHeader*
%7 = call i8* @GetConstructModuleName(%struct.constructHeader* %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.constructHeader = type { i32 }
define i8* @EnvDefglobalModule(i8* nocapture readnone %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.constructHeader*
%4 = tail call i8* @GetConstructModuleName(%struct.constructHeader* %3)
ret i8* %4
}
/* Type definitions */
struct pthread {
  int dummy;
};
typedef int pthread_t;

/* Variables and functions */
scalar_t__ pthread_kill(int, int /*<<< orphan*/);
int thread_check_status(pthread_t tid) {
  struct pthread *thread = (struct pthread *)tid;
  if ((tid == -1) || (!thread))
    return -1;
  if (pthread_kill(tid, 0) != 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<thread_check_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
je     1138 <thread_check_status+0x28>
cmpq   $0x0,-0x10(%rbp)
jne    1144 <thread_check_status+0x34>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <thread_check_status+0x5b>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <pthread_kill@plt>
cmp    $0x0,%rax
je     1164 <thread_check_status+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <thread_check_status+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_check_status>:
lea    -0x1(%rdi),%ecx
mov    $0xffffffff,%eax
cmp    $0xfffffffd,%ecx
ja     112e <thread_check_status+0x1e>
push   %rax
xor    %esi,%esi
call   1030 <pthread_kill@plt>
neg    %rax
sbb    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
%struct.pthread = type { i32 }
define i32 @thread_check_status(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.pthread*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.pthread*
store %struct.pthread* %7, %struct.pthread** %4
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, -1
br i1 %9, label %13, label %10
10: ; preds = %1
%11 = load %struct.pthread*, %struct.pthread** %4
%12 = icmp ne %struct.pthread* %11, null
br i1 %12, label %14, label %13
13: ; preds = %10, %1
store i32 -1, i32* %2
br label %20
14: ; preds = %10
%15 = load i32, i32* %3
%16 = call i64 @pthread_kill(i32 %15, i32 0)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 -1, i32* %2
br label %20
19: ; preds = %14
store i32 0, i32* %2
br label %20
20: ; preds = %19, %18, %13
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @thread_check_status(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, -2
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @pthread_kill(i32 %0, i32 0)
%6 = icmp ne i64 %5, 0
%7 = sext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int bitcount(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("Number of 1s: %d\n", bitcount(1));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"Number of 1s: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @bitcount(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
__attribute__((always_)) uint8_t max_uint8_t(uint8_t a, uint8_t b) {
  return a > b ? a : b;
}


x86 assembly (clang, -O0):
<max_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <max_uint8_t+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max_uint8_t+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_uint8_t>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max_uint8_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max_uint8_t(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void bu_compile_arg(args) struct conscell *args;
{
  int n = bu_compile_arg_list(args);
  if (n != 1)
    goto er;
  EMIT1ATM("ARG");
  EMITEND();
  return;
er:
  cerror("arg: wrong # of args", args);
}


x86 assembly (clang, -O0):
<bu_compile_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <bu_compile_arg_list@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1169 <bu_compile_arg+0x29>
jmp    1183 <bu_compile_arg+0x43>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1050 <EMIT1ATM@plt>
mov    $0x0,%al
call   1030 <EMITEND@plt>
jmp    1195 <bu_compile_arg+0x55>
mov    -0x8(%rbp),%rsi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1060 <cerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bu_compile_arg>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <bu_compile_arg_list@plt>
cmp    $0x1,%eax
jne    1166 <bu_compile_arg+0x26>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1050 <EMIT1ATM@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <EMITEND@plt>
lea    0xe97(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1060 <cerror@plt>

LLVM IR (-O0):
%struct.conscell = type opaque
@.str = [4 x i8] c"ARG\00"
@.str.1 = [21 x i8] c"arg: wrong # of args\00"
define void @bu_compile_arg(%struct.conscell* %0) {
%2 = alloca %struct.conscell*
%3 = alloca i32
store %struct.conscell* %0, %struct.conscell** %2
%4 = load %struct.conscell*, %struct.conscell** %2
%5 = call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
br label %12
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @EMITEND()
br label %15
12: ; preds = %8
%13 = load %struct.conscell*, %struct.conscell** %2
%14 = call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %13)
br label %15
15: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
%struct.conscell = type opaque
@.str = [4 x i8] c"ARG\00"
@.str.1 = [21 x i8] c"arg: wrong # of args\00"
define void @bu_compile_arg(%struct.conscell* %0) {
%2 = tail call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @EMITEND()
br label %9
7: ; preds = %1
%8 = tail call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %0)
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ motion_set(int);
void soft_right_2(void) { motion_set(0x08); }


x86 assembly (clang, -O0):
<soft_right_2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
call   1030 <motion_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<soft_right_2>:
mov    $0x8,%edi
jmp    1030 <motion_set@plt>

LLVM IR (-O0):
define void @soft_right_2() {
%1 = call i32 @motion_set(i32 8)
ret void
}

LLVM IR (-O2):
define void @soft_right_2() {
%1 = tail call i32 @motion_set(i32 8)
ret void
}
void sbn_exit(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @fio_malloc_test() {
ret void
}
/* Type definitions */
struct sparsegroup {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sparsegroup_free_group(struct sparsegroup *, size_t);
void sparsegroup_deinit(struct sparsegroup *g, size_t elt_size) {
  sparsegroup_free_group(g, elt_size);
}


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

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

LLVM IR (-O0):
%struct.sparsegroup = type { i32 }
define void @sparsegroup_deinit(%struct.sparsegroup* %0, i64 %1) {
%3 = alloca %struct.sparsegroup*
%4 = alloca i64
store %struct.sparsegroup* %0, %struct.sparsegroup** %3
store i64 %1, i64* %4
%5 = load %struct.sparsegroup*, %struct.sparsegroup** %3
%6 = load i64, i64* %4
%7 = call i32 @sparsegroup_free_group(%struct.sparsegroup* %5, i64 %6)
ret void
}

LLVM IR (-O2):
%struct.sparsegroup = type { i32 }
define void @sparsegroup_deinit(%struct.sparsegroup* %0, i64 %1) {
%3 = tail call i32 @sparsegroup_free_group(%struct.sparsegroup* %0, i64 %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XKeymapEvent;

/* Variables and functions */
void *get_XKeymapEvent_display(void *_p) {
  return (void *)((XKeymapEvent *)_p)->display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XKeymapEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XKeymapEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sys_cfg_tdls_ext_cap_usage(void) {
  printf("\nUsage : sys_cfg_tdls_ext_cap [CONFIG_FILE] \n");
  printf("\nIf CONFIG_FILE is provided, a 'set' is performed, else a 'get' is "
         "performed.\n");
  printf("\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_sys_cfg_tdls_ext_cap_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xef9(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"\0AUsage : sys_cfg_tdls_ext_cap [CONFIG_FILE] \0A\00"
@.str.1 = [79 x i8] c"\0AIf CONFIG_FILE is provided, a 'set' is performed, else a 'get' is performed.\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @print_sys_cfg_tdls_ext_cap_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"\0AUsage : sys_cfg_tdls_ext_cap [CONFIG_FILE] \00"
@str.3 = [78 x i8] c"\0AIf CONFIG_FILE is provided, a 'set' is performed, else a 'get' is performed.\00"
define void @print_sys_cfg_tdls_ext_cap_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int parse(char *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    puts("Error: You must pass a file to parse as the first argument!");
    exit(1);
  }
  return parse(argv[1]);
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    1166 <main+0x36>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <parse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1140 <main+0x10>
mov    0x8(%rsi),%rdi
pop    %rax
jmp    1040 <parse@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"Error: You must pass a file to parse as the first argument!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @parse(i8* %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [60 x i8] c"Error: You must pass a file to parse as the first argument!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @parse(i8* %9)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int yyparse();
int main(int argc, char *argv[]) {
  fprintf(stdout, "> ");
  return yyparse();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <yyparse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <yyparse@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"> \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @yyparse()
ret i32 %8
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"> \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @yyparse()
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
char *pack_u64(char *buf, uint64_t val) {
  *(uint64_t *)buf = val;
  return buf + sizeof(uint64_t);
}


x86 assembly (clang, -O0):
<pack_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_u64>:
mov    %esi,(%rdi)
lea    0x4(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @pack_u64(i8* writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
%4 = getelementptr inbounds i8, i8* %0, i64 4
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *longestPalindrome2(char *);
int /*<<< orphan*/ printf(char *, char *);
void longestPalindromeMain(void) {
  char s[] = "gfsdabcddcbagteabcdaadcbaetsg";
  char *result = longestPalindrome2(s);
  printf("%s\n", result);
  free(result);
}


x86 assembly (clang, -O0):
<longestPalindromeMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb9(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xeb3(%rip),%ax
mov    %ax,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
call   1050 <longestPalindrome2@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<longestPalindromeMain>:
push   %rbx
sub    $0x20,%rsp
movups 0xed2(%rip),%xmm0
movups %xmm0,0xe(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1050 <longestPalindrome2@plt>
mov    %rax,%rbx
lea    0xec0(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.longestPalindromeMain.s = [30 x i8] c"gfsdabcddcbagteabcdaadcbaetsg\00"
@.str = [4 x i8] c"%s\0A\00"
define void @longestPalindromeMain() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i8* @longestPalindrome2(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
void read(char c[]) { scanf("%s", c); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @read(i8* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void gtk_tree_store_insert() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_store_insert() {
ret void
}
struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void) {
  return (struct s3c24x0_watchdog *)0x15300000;
}


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

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

LLVM IR (-O0):
%struct.s3c24x0_watchdog = type opaque
define %struct.s3c24x0_watchdog* @s3c24x0_get_base_watchdog() {
ret %struct.s3c24x0_watchdog* inttoptr (i64 355467264 to %struct.s3c24x0_watchdog*)
}

LLVM IR (-O2):
%struct.s3c24x0_watchdog = type opaque
define %struct.s3c24x0_watchdog* @s3c24x0_get_base_watchdog() {
ret %struct.s3c24x0_watchdog* inttoptr (i64 355467264 to %struct.s3c24x0_watchdog*)
}
void GC_Mark_Stack_Fake(struct GC *gc) {}


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

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

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

LLVM IR (-O2):
%struct.GC = type opaque
define void @GC_Mark_Stack_Fake(%struct.GC* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ funct(int);
int main() {
  funct(20);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @funct(i32 20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @funct(i32 20)
ret i32 0
}
int f(x)
int x;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 0
}
/* Variables and functions */
int scalar(int, int);
int main() {
  int quantas_trincas = 33, valor1 = 821;
  int tk2 = 1, tk0 = -1;
  valor1 = scalar(quantas_trincas - tk2, valor1) - tk0;
  return valor1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x21,-0x8(%rbp)
movl   $0x335,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <scalar@plt>
sub    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x20,%edi
mov    $0x335,%esi
call   1030 <scalar@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 33, i32* %2
store i32 821, i32* %3
store i32 1, i32* %4
store i32 -1, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = call i32 @scalar(i32 %8, i32 %9)
%11 = load i32, i32* %5
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @scalar(i32 32, i32 821)
%2 = add nsw i32 %1, 1
ret i32 %2
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
void timeit() {
  struct timeval tv_tmp;
  gettimeofday(&tv_tmp, NULL);
}


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

x86 assembly (clang, -O2):
<timeit>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @timeit() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @timeit() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
ret void
}
short test_43_2(short *mem) { return __atomic_sub_fetch(mem + 4, 1, 4); }


x86 assembly (clang, -O0):
<test_43_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
movw   $0x1,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
mov    %ax,%cx
neg    %eax
lock xadd %ax,0x8(%rdx)
sub    %cx,%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_43_2>:
mov    $0xffff,%ax
lock xadd %ax,0x8(%rdi)
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define signext i16 @test_43_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 4
store i16 1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw sub i16* %6, i16 %7 acq_rel
%9 = sub i16 %8, %7
store i16 %9, i16* %4
%10 = load i16, i16* %4
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @test_43_2(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 4
%3 = atomicrmw sub i16* %2, i16 1 acq_rel
%4 = add i16 %3, -1
ret i16 %4
}
void endtimer_(const unsigned int *handle) { return; }


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

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

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

LLVM IR (-O2):
define void @endtimer_(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_SetSharpness(void *);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned short);
void UPnPRenderingControl_SetSharpness(void *upnptoken, unsigned int InstanceID,
                                       unsigned short DesiredSharpness) {
  printf("Invoke: UPnPRenderingControl_SetSharpness(%u,%u);\r\n", InstanceID,
         DesiredSharpness);
  UPnPResponse_RenderingControl_SetSharpness(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_SetSharpness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec0(%rip),%rdi
movzwl -0xe(%rbp),%edx
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UPnPResponse_RenderingControl_SetSharpness@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_SetSharpness>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UPnPResponse_RenderingControl_SetSharpness@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"Invoke: UPnPRenderingControl_SetSharpness(%u,%u);\0D\0A\00"
define void @UPnPRenderingControl_SetSharpness(i8* %0, i32 %1, i16 zeroext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i16
store i8* %0, i8** %4
store i32 %1, i32* %5
store i16 %2, i16* %6
%7 = load i32, i32* %5
%8 = load i16, i16* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %7, i16 zeroext %8)
%10 = load i8*, i8** %4
%11 = call i32 @UPnPResponse_RenderingControl_SetSharpness(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"Invoke: UPnPRenderingControl_SetSharpness(%u,%u);\0D\0A\00"
define void @UPnPRenderingControl_SetSharpness(i8* %0, i32 %1, i16 zeroext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %2)
%5 = tail call i32 @UPnPResponse_RenderingControl_SetSharpness(i8* %0)
ret void
}
void time_it_init(void) {}


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

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

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

LLVM IR (-O2):
define void @time_it_init() {
ret void
}
/* Variables and functions */
double __infer_nondet_double();
double cosh(double x) { return __infer_nondet_double(); }


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

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

LLVM IR (-O0):
define double @cosh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @cosh(double %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello, World! \n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello, World! \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello, World! \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void ff_hevc_put_hevc_bi_pel_pixels16_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels16_8_sse4() {
ret void
}
/* Variables and functions */
int f1();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = f1();
  printf("%d", a);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (...) @f1()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SYS_exit_group;
int /*<<< orphan*/ __syscall1(int /*<<< orphan*/, int);
void quit(int code) { __syscall1(SYS_exit_group, code); }


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <__syscall1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quit>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__syscall1@plt>

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

LLVM IR (-O2):
@SYS_exit_group = global i32 0
define void @quit(i32 %0) {
%2 = load i32, i32* @SYS_exit_group
%3 = tail call i32 @__syscall1(i32 %2, i32 %0)
ret void
}
int test_imm_A0uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xA0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A0uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0xa0,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A0uint64_midword_reg>:
test   $0xa00000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A0uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 10485760
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int rev_short(int /*<<< orphan*/);
uint32_t rev_long(uint32_t val) {
  return (((rev_short((uint16_t)val) & 0xffff) << 16) |
          (rev_short((uint16_t)(val >> 16)) & 0xffff));
}


x86 assembly (clang, -O0):
<rev_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <rev_short@plt>
and    $0xffff,%eax
shl    $0x10,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
call   1030 <rev_short@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    $0xffff,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_long>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <rev_short@plt>
mov    %eax,%ebp
shl    $0x10,%ebp
sar    $0x10,%ebx
mov    %ebx,%edi
call   1030 <rev_short@plt>
movzwl %ax,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rev_long(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rev_short(i32 %3)
%5 = and i32 %4, 65535
%6 = shl i32 %5, 16
%7 = load i32, i32* %2
%8 = ashr i32 %7, 16
%9 = call i32 @rev_short(i32 %8)
%10 = and i32 %9, 65535
%11 = or i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @rev_long(i32 %0) {
%2 = tail call i32 @rev_short(i32 %0)
%3 = shl i32 %2, 16
%4 = ashr i32 %0, 16
%5 = tail call i32 @rev_short(i32 %4)
%6 = and i32 %5, 65535
%7 = or i32 %6, %3
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ strtoul(char const *, char **, int /*<<< orphan*/);
int /*<<< orphan*/ warnx(char *, char const *);
int get_int_arg(const char *s, uint32_t *valp) {
  char *p;
  *valp = strtoul(s, &p, 0);
  if (*p) {
    warnx("bad parameter \"%s\"", s);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_int_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1170 <get_int_arg+0x50>
mov    -0x10(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1030 <warnx@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <get_int_arg+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int_arg>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
xor    %ebp,%ebp
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    %eax,(%r14)
mov    0x8(%rsp),%rax
cmpb   $0x0,(%rax)
je     115d <get_int_arg+0x3d>
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <warnx@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"bad parameter \22%s\22\00"
define i32 @get_int_arg(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @strtoul(i8* %0, i8** %3, i32 0)
store i32 %5, i32* %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = tail call i32 @warnx(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %11
11: ; preds = %2, %9
%12 = phi i32 [ -1, %9 ], [ 0, %2 ]
ret i32 %12
}
void _marshall_put32(void *pBuf, unsigned long iVal) {
  ((char *)(pBuf))[0] = ((char *)(&iVal))[3],
         ((char *)(pBuf))[1] = ((char *)(&iVal))[2],
         ((char *)(pBuf))[2] = ((char *)(&iVal))[1],
         ((char *)(pBuf))[3] = ((char *)(&iVal))[0];
}


x86 assembly (clang, -O0):
<_marshall_put32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0xd(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xe(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xf(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_marshall_put32>:
bswap  %esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @_marshall_put32(i8* nocapture writeonly %0, i64 %1) {
%3 = trunc i64 %1 to i8
%4 = lshr i64 %1, 8
%5 = trunc i64 %4 to i8
%6 = lshr i64 %1, 16
%7 = trunc i64 %6 to i8
%8 = lshr i64 %1, 24
%9 = trunc i64 %8 to i8
store i8 %9, i8* %0
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %7, i8* %10
%11 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %5, i8* %11
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %3, i8* %12
ret void
}
void gtk_entry_completion_get_text_column() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_completion_get_text_column() {
ret void
}
/* Variables and functions */
int ntohl(int);
void buf_ntohl(void *buf, int len) {
  int *buf_i = (int *)buf;
  int i;
  for (i = 0; i < (len / sizeof(int)) + 1; i++) {
    buf_i[i] = ntohl(buf_i[i]);
  }
}


x86 assembly (clang, -O0):
<buf_ntohl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
movslq -0xc(%rbp),%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
jae    1172 <buf_ntohl+0x62>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <ntohl@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112e <buf_ntohl+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_ntohl>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
movslq %esi,%r14
shr    $0x2,%r14
add    $0x1,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbx,4),%edi
call   1030 <ntohl@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <buf_ntohl+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @buf_ntohl(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
store i32 0, i32* %6
br label %9
9: ; preds = %28, %2
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = udiv i64 %13, 4
%15 = add i64 %14, 1
%16 = icmp ult i64 %11, %15
br i1 %16, label %17, label %31
17: ; preds = %9
%18 = load i32*, i32** %5
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = call i32 @ntohl(i32 %22)
%24 = load i32*, i32** %5
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
store i32 %23, i32* %27
br label %28
28: ; preds = %17
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %9
31: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @buf_ntohl(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = sext i32 %1 to i64
%5 = lshr i64 %4, 2
br label %6
6: ; preds = %2, %6
%7 = phi i64 [ 0, %2 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %3, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @ntohl(i32 %9)
store i32 %10, i32* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %7, %5
br i1 %12, label %13, label %6
13: ; preds = %6
ret void
}