xunge/DecIR huggingface dataset:
int doCmd_pure(const char *cmd) {
  auto cmdlen = strlen(cmd);
  auto newcmd = (char *)calloc((cmdlen + 64), sizeof(char));
  strcpy(newcmd, cmd);
  auto ret = _doCmd_pure(newcmd, cmdlen);
  free(newcmd);
  return ret;
}


x86 assembly (clang, -O0):
<doCmd_pure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x40,%eax
movslq %eax,%rdi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1070 <_doCmd_pure@plt>
mov    %eax,-0x14(%rbp)
movslq -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doCmd_pure>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1050 <strlen@plt>
mov    %rax,%r14
add    $0x40,%eax
movslq %eax,%rdi
mov    $0x1,%esi
call   1060 <calloc@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcpy@plt>
mov    %ebx,%edi
mov    %r14d,%esi
xor    %eax,%eax
call   1070 <_doCmd_pure@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @doCmd_pure(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 64
%11 = sext i32 %10 to i64
%12 = call i8* @calloc(i64 %11, i64 1)
%13 = ptrtoint i8* %12 to i32
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
%17 = load i8*, i8** %2
%18 = call i8* @strcpy(i8* %16, i8* %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = call i32 (i32, i32, ...) bitcast (i32 (...)* @_doCmd_pure to i32 (i32, i32, ...)*)(i32 %19, i32 %20)
store i32 %21, i32* %5
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i8*
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @doCmd_pure(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = shl i64 %2, 32
%5 = add i64 %4, 274877906944
%6 = ashr exact i64 %5, 32
%7 = tail call i8* @calloc(i64 %6, i64 1)
%8 = ptrtoint i8* %7 to i64
%9 = trunc i64 %8 to i32
%10 = shl i64 %8, 32
%11 = ashr exact i64 %10, 32
%12 = inttoptr i64 %11 to i8*
%13 = tail call i8* @strcpy(i8* dereferenceable(1) %12, i8* dereferenceable(1) %0)
%14 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @_doCmd_pure to i32 (i32, i32, ...)*)(i32 %9, i32 %3)
tail call void @free(i8* %12)
ret i32 %14
}
void pinconf_generic_dump_pins(struct pinctrl_dev *pctldev, struct seq_file *s,
                               const char *gname, unsigned pin) {
  return;
}


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

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

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

LLVM IR (-O2):
%struct.pinctrl_dev = type opaque
%struct.seq_file = type opaque
define void @pinconf_generic_dump_pins(%struct.pinctrl_dev* nocapture %0, %struct.seq_file* nocapture %1, i8* nocapture %2, i32 %3) {
ret void
}
/* Variables and functions */
int PMPI_Get_version(int *, int *);
int MPI_Get_version(int *version, int *subversion) {
  ;
  return PMPI_Get_version(version, subversion);
}


x86 assembly (clang, -O0):
<MPI_Get_version>:
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 <PMPI_Get_version@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @MPI_Get_version(i32* %0, i32* %1) {
%3 = tail call i32 @PMPI_Get_version(i32* %0, i32* %1)
ret i32 %3
}
void mdp4_lcdc_overlay_blt_stop(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_lcdc_overlay_blt_stop(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ glutPostRedisplay();
void Key(unsigned char key, int x, int y) {
  (void)x;
  (void)y;
  switch (key) {
  case 27:
    exit(0);
    break;
  }
  glutPostRedisplay();
}


x86 assembly (clang, -O0):
<Key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x1(%rbp),%al
sub    $0x1b,%al
jne    114b <Key+0x2b>
jmp    1144 <Key+0x24>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x0,%al
call   1030 <glutPostRedisplay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Key>:
cmp    $0x1b,%dil
je     112d <Key+0xd>
xor    %eax,%eax
jmp    1030 <glutPostRedisplay@plt>
push   %rax
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @Key(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
switch i32 %10, label %13 [
i32 27, label %11
]
11: ; preds = %3
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %3
%14 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
define void @Key(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 27
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %3
%8 = tail call i32 (...) @glutPostRedisplay()
ret void
}
/* Type definitions */
struct rlimit {
  size_t rlim_max;
};

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_STACK;
int /*<<< orphan*/ getrlimit(int /*<<< orphan*/, struct rlimit *);
size_t arch_stack_max(void) {
  struct rlimit limit;
  getrlimit(RLIMIT_STACK, &limit);
  return limit.rlim_max;
}


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

x86 assembly (clang, -O2):
<arch_stack_max>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <getrlimit@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rlimit = type { i64 }
@RLIMIT_STACK = global i32 0
define i64 @arch_stack_max() {
%1 = alloca %struct.rlimit
%2 = load i32, i32* @RLIMIT_STACK
%3 = call i32 @getrlimit(i32 %2, %struct.rlimit* %1)
%4 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i32 0, i32 0
%5 = load i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
%struct.rlimit = type { i64 }
@RLIMIT_STACK = global i32 0
define i64 @arch_stack_max() {
%1 = alloca %struct.rlimit
%2 = bitcast %struct.rlimit* %1 to i8*
%3 = load i32, i32* @RLIMIT_STACK
%4 = call i32 @getrlimit(i32 %3, %struct.rlimit* %1)
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void qFull() {
  printf("Queue is full\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Queue is full\0A\00"
define void @qFull() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Queue is full\00"
define void @qFull() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
int hvt_gdb_read_last_signal(struct hvt *hvt, int *signal) { return -1; }


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

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

LLVM IR (-O0):
%struct.hvt = type opaque
define i32 @hvt_gdb_read_last_signal(%struct.hvt* %0, i32* %1) {
%3 = alloca %struct.hvt*
%4 = alloca i32*
store %struct.hvt* %0, %struct.hvt** %3
store i32* %1, i32** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.hvt = type opaque
define i32 @hvt_gdb_read_last_signal(%struct.hvt* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
unsigned int foo(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
unsigned int bar(void) { return foo(0, 0, 0); }


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

x86 assembly (clang, -O2):
<bar>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <foo@plt>

LLVM IR (-O0):
define i32 @bar() {
%1 = call i32 @foo(i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i32 @foo(i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void printstr(void *handle, const char str[]) { fputs(str, stdout); }


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

x86 assembly (clang, -O2):
<printstr>:
mov    %rsi,%rdi
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @printstr(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 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @printstr(i8* nocapture readnone %0, i8* %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* %1, i32 %3)
ret void
}
long long int max(long long int a, long long int b) { return (a > b ? a : b); }


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

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

LLVM IR (-O0):
define i64 @max(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(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void warning(s1, s2) char *s1;
char *s2;
{ prmsg("Warning: ", s1, s2); }


x86 assembly (clang, -O0):
<warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <prmsg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warning>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
xor    %eax,%eax
jmp    1030 <prmsg@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Warning: \00"
define void @warning(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 i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @prmsg to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Warning: \00"
define void @warning(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @prmsg to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Type definitions */
struct rlimit {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int setrlimit(int resource, const struct rlimit *rlim) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<setrlimit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setrlimit>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @setrlimit(i32 %0, %struct.rlimit* %1) {
%3 = alloca i32
%4 = alloca %struct.rlimit*
store i32 %0, i32* %3
store %struct.rlimit* %1, %struct.rlimit** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @setrlimit(i32 %0, %struct.rlimit* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ t_log_adapter_clear_messages();
void teardown(void *context) { t_log_adapter_clear_messages(); }


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

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

LLVM IR (-O0):
define void @teardown(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @t_log_adapter_clear_messages()
ret void
}

LLVM IR (-O2):
define void @teardown(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @t_log_adapter_clear_messages()
ret void
}
p(int a) { printf(a); }


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movslq -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p>:
movslq %edi,%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
define i32 @p(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = call i32 (i8*, ...) @printf(i8* %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @p(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %3)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ DoSQVHQ(int);
void DoSQV2HQ(void) { DoSQVHQ(1); }


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

x86 assembly (clang, -O2):
<DoSQV2HQ>:
mov    $0x1,%edi
jmp    1030 <DoSQVHQ@plt>

LLVM IR (-O0):
define void @DoSQV2HQ() {
%1 = call i32 @DoSQVHQ(i32 1)
ret void
}

LLVM IR (-O2):
define void @DoSQV2HQ() {
%1 = tail call i32 @DoSQVHQ(i32 1)
ret void
}
void XtTranslateCoords() {}


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

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

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

LLVM IR (-O2):
define void @XtTranslateCoords() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mdea_error(char **, char *);
int mdea_array_node_get_boolean(void *p, int *boolean, char **error) {
  mdea_error(error, "Expected boolean, got array");
  return -1;
}


x86 assembly (clang, -O0):
<mdea_array_node_get_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdea_array_node_get_boolean>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Expected boolean, got array\00"
define i32 @mdea_array_node_get_boolean(i8* %0, i32* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8**
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8** %2, i8*** %6
%7 = load i8**, i8*** %6
%8 = call i32 @mdea_error(i8** %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [28 x i8] c"Expected boolean, got array\00"
define i32 @mdea_array_node_get_boolean(i8* nocapture readnone %0, i32* nocapture readnone %1, i8** %2) {
%4 = tail call i32 @mdea_error(i8** %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ box(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ stdscr;
void draw_border(void) { box(stdscr, 0, 0); }


x86 assembly (clang, -O0):
<draw_border>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <box@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_border>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <box@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @draw_border() {
%1 = load i32, i32* @stdscr
%2 = call i32 @box(i32 %1, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @draw_border() {
%1 = load i32, i32* @stdscr
%2 = tail call i32 @box(i32 %1, i32 0, i32 0)
ret void
}
__attribute__((always_)) void native_cpuid(unsigned int *eax, unsigned int *ebx,
                                           unsigned int *ecx,
                                           unsigned int *edx) {
  asm volatile("cpuid"
               : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
               : "0"(*eax), "2"(*ecx));
}


x86 assembly (clang, -O0):
<native_cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%ecx
cpuid
mov    %eax,%r9d
mov    -0x38(%rbp),%rax
mov    %ecx,%esi
mov    -0x30(%rbp),%rcx
mov    %r9d,(%r8)
mov    %ebx,(%rdi)
mov    %esi,(%rcx)
mov    %edx,(%rax)
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<native_cpuid>:
push   %rbx
mov    %rcx,%r8
mov    %rdx,%r9
mov    (%rdi),%eax
mov    (%rdx),%ecx
cpuid
mov    %eax,(%rdi)
mov    %ebx,(%rsi)
mov    %ecx,(%r9)
mov    %edx,(%r8)
pop    %rbx
ret

LLVM IR (-O0):
define void @native_cpuid(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %14, i32 %16)
%18 = extractvalue { i32, i32, i32, i32 } %17, 0
%19 = extractvalue { i32, i32, i32, i32 } %17, 1
%20 = extractvalue { i32, i32, i32, i32 } %17, 2
%21 = extractvalue { i32, i32, i32, i32 } %17, 3
store i32 %18, i32* %9
store i32 %19, i32* %10
store i32 %20, i32* %11
store i32 %21, i32* %12
ret void
}

LLVM IR (-O2):
define void @native_cpuid(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = load i32, i32* %2
%7 = tail call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
%8 = extractvalue { i32, i32, i32, i32 } %7, 0
%9 = extractvalue { i32, i32, i32, i32 } %7, 1
%10 = extractvalue { i32, i32, i32, i32 } %7, 2
%11 = extractvalue { i32, i32, i32, i32 } %7, 3
store i32 %8, i32* %0
store i32 %9, i32* %1
store i32 %10, i32* %2
store i32 %11, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void error() {
  printf("Error\n");
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Error\0A\00"
define void @error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [6 x i8] c"Error\00"
define void @error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) void BEUnpackUint32(uint32_t *data,
                                             const uint8_t container[4]) {
  *data = (uint32_t)container[3] | ((uint32_t)container[2] << 8) |
          ((uint32_t)container[1] << 16) | ((uint32_t)container[0] << 24);
}


x86 assembly (clang, -O0):
<BEUnpackUint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BEUnpackUint32>:
mov    0x10(%rsi),%eax
shl    $0x8,%eax
or     0x18(%rsi),%eax
mov    (%rsi),%ecx
mov    0x8(%rsi),%edx
shl    $0x10,%edx
shl    $0x18,%ecx
or     %edx,%ecx
or     %eax,%ecx
mov    %ecx,(%rdi)
ret

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

LLVM IR (-O2):
define void @BEUnpackUint32(i32* nocapture writeonly %0, i64* nocapture %1) {
%3 = getelementptr inbounds i64, i64* %1, i64 3
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds i64, i64* %1, i64 2
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = or i32 %9, %5
%11 = getelementptr inbounds i64, i64* %1, i64 1
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 16
%15 = or i32 %10, %14
%16 = load i64, i64* %1
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 24
%19 = or i32 %15, %18
store i32 %19, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _SC_NPROCESSORS_ONLN;
int sysconf(int /*<<< orphan*/);
int hw_ctx_nr_get() { return sysconf(_SC_NPROCESSORS_ONLN); }


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

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

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

LLVM IR (-O2):
@_SC_NPROCESSORS_ONLN = global i32 0
define i32 @hw_ctx_nr_get() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = tail call i32 @sysconf(i32 %1)
ret i32 %2
}
void ff_hevc_put_hevc_bi_w_pel_pixels12_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_pel_pixels12_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog_name) {
  printf("Usage:\n\t%s <number_of_elements_to_sort> "
         "<number_of_attempts_to_sort>\n",
         prog_name);
}


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

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

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

LLVM IR (-O2):
@.str = [70 x i8] c"Usage:\0A\09%s <number_of_elements_to_sort> <number_of_attempts_to_sort>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int __attribute__((no)) foo(unsigned short *p) {
  int a = *p;
  asm volatile("nop" : : "D"((int)*p));
  asm volatile("nop" : : "D"((int)*p));
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edi
nop
mov    -0x8(%rbp),%rax
movzwl (%rax),%edi
nop
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %rdi,%rax
movzwl (%rdi),%edi
nop
movzwl (%rax),%edi
nop
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @foo(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
store i16* %0, i16** %2
%4 = load i16*, i16** %2
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
store i32 %6, i32* %3
%7 = load i16*, i16** %2
%8 = load i16, i16* %7
%9 = zext i16 %8 to i32
%10 = load i16*, i16** %2
%11 = load i16, i16* %10
%12 = zext i16 %11 to i32
ret i32 0
}

LLVM IR (-O2):
define i32 @foo(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = zext i16 %2 to i32
tail call void asm sideeffect "nop", "{di},~{dirflag},~{fpsr},~{flags}"(i32 %3)
%4 = load i16, i16* %0
%5 = zext i16 %4 to i32
tail call void asm sideeffect "nop", "{di},~{dirflag},~{fpsr},~{flags}"(i32 %5)
ret i32 0
}
/* Variables and functions */
void int_set(void *const restrict data, size_t const ix,
             void *const restrict x) {
  ((int *)data)[ix] = (int)x;
}


x86 assembly (clang, -O0):
<int_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_set>:
mov    %edx,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @int_set(i8* noalias %0, i64 %1, i8* noalias %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = ptrtoint i8* %7 to i32
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = load i64, i64* %5
%12 = getelementptr inbounds i32, i32* %10, i64 %11
store i32 %8, i32* %12
ret void
}

LLVM IR (-O2):
define void @int_set(i8* noalias nocapture writeonly %0, i64 %1, i8* noalias %2) {
%4 = ptrtoint i8* %2 to i64
%5 = trunc i64 %4 to i32
%6 = bitcast i8* %0 to i32*
%7 = getelementptr inbounds i32, i32* %6, i64 %1
store i32 %5, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
double lglsec(void *);
int /*<<< orphan*/ printf(char *, int, int, double);
int /*<<< orphan*/ stdout;
int lglmonotifiy(void *lgl, int target, int val) {
  printf("t %d %d after %.3f seconds\n", target, val, lglsec(lgl));
  fflush(stdout);
  return 1;
}


x86 assembly (clang, -O0):
<lglmonotifiy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <lglsec@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lglmonotifiy>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1050 <lglsec@plt>
lea    0xebd(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"t %d %d after %.3f seconds\0A\00"
@stdout = global i32 0
define i32 @lglmonotifiy(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = call double @lglsec(i8* %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, double %10)
%12 = load i32, i32* @stdout
%13 = call i32 @fflush(i32 %12)
ret i32 1
}

LLVM IR (-O2):
@.str = [28 x i8] c"t %d %d after %.3f seconds\0A\00"
@stdout = global i32 0
define i32 @lglmonotifiy(i8* %0, i32 %1, i32 %2) {
%4 = tail call double @lglsec(i8* %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, double %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
ret i32 1
}
/* Type definitions */
typedef scalar_t__ pthread_t;

/* Variables and functions */
int(pthread_equal)(pthread_t a, pthread_t b) { return a == b; }


x86 assembly (clang, -O0):
<pthread_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @pthread_equal(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 eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @pthread_equal(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ LPI2C3_DriverIRQHandler();
__attribute__((weak)) void LPI2C3_IRQHandler(void) {
  LPI2C3_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @LPI2C3_IRQHandler() {
%1 = call i32 (...) @LPI2C3_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @LPI2C3_IRQHandler() {
%1 = tail call i32 (...) @LPI2C3_DriverIRQHandler()
ret void
}
/* Variables and functions */
float atanhf(float);
float sinhf(float);
float __attribute__((no)) sinatanf_(float x) {
  float atg = atanhf(x);
  return sinhf(atg) + atg;
}


x86 assembly (clang, -O0):
<sinatanf_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <atanhf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <sinhf@plt>
addss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinatanf_>:
push   %rax
call   1030 <atanhf@plt>
movss  %xmm0,0x4(%rsp)
call   1040 <sinhf@plt>
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sinatanf_(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @atanhf(float %4)
store float %5, float* %3
%6 = load float, float* %3
%7 = call float @sinhf(float %6)
%8 = load float, float* %3
%9 = fadd float %7, %8
ret float %9
}

LLVM IR (-O2):
define float @sinatanf_(float %0) {
%2 = tail call float @atanhf(float %0)
%3 = tail call float @sinhf(float %2)
%4 = fadd float %2, %3
ret float %4
}
int foo(int in) {
  int a, b, c, d;
  a = in;
  b = a;
  c = a;
  d = a + b;
  return in + in * 3 + a + b + c + d;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
add    %ecx,%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rdi,8),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = mul nsw i32 %0, 9
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void print_version(void) { fprintf(stderr, "%s %s\n", "karman", "1.0"); }


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xedc(%rip),%rdx
lea    0xedc(%rip),%rcx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
lea    0xee0(%rip),%rdx
lea    0xee0(%rip),%rcx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [7 x i8] c"karman\00"
@.str.2 = [4 x i8] c"1.0\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [7 x i8] c"karman\00"
@.str.2 = [4 x i8] c"1.0\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
char const *dns_ntop(int, void const *, char *, int);
const char *dns_xntop(int af, const void *src) {
  static char buf[6 * 5 + 4 * 4];
  return dns_ntop(af, src, buf, sizeof(buf));
}


x86 assembly (clang, -O0):
<dns_xntop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0x2f13(%rip),%rdx
mov    $0x2e,%ecx
call   1030 <dns_ntop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_xntop>:
lea    0x2f29(%rip),%rdx
mov    $0x2e,%ecx
jmp    1030 <dns_ntop@plt>

LLVM IR (-O0):
@dns_xntop.buf = internal global [46 x i8] zeroinitializer
define i8* @dns_xntop(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i8* @dns_ntop(i32 %5, i8* %6, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @dns_xntop.buf, i64 0, i64 0), i32 46)
ret i8* %7
}

LLVM IR (-O2):
@dns_xntop.buf = internal global [46 x i8] zeroinitializer
define i8* @dns_xntop(i32 %0, i8* %1) {
%3 = tail call i8* @dns_ntop(i32 %0, i8* %1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @dns_xntop.buf, i64 0, i64 0), i32 46)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ le32enc(int /*<<< orphan*/ *, int /*<<< orphan*/);
void le64enc(void *pp, uint64_t u) {
  uint8_t *p = (uint8_t *)pp;
  le32enc(p, (uint32_t)(u & 0xffffffffU));
  le32enc(p + 4, (uint32_t)(u >> 32));
}


x86 assembly (clang, -O0):
<le64enc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
and    $0xffffffff,%esi
call   1030 <le32enc@plt>
mov    -0x18(%rbp),%rdi
add    $0x10,%rdi
mov    -0xc(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <le32enc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<le64enc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <le32enc@plt>
add    $0x10,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <le32enc@plt>

LLVM IR (-O0):
define void @le64enc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %4
%10 = and i32 %9, -1
%11 = call i32 @le32enc(i32* %8, i32 %10)
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 4
%14 = load i32, i32* %4
%15 = ashr i32 %14, 32
%16 = call i32 @le32enc(i32* %13, i32 %15)
ret void
}

LLVM IR (-O2):
define void @le64enc(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @le32enc(i32* %3, i32 %1)
%5 = getelementptr inbounds i8, i8* %0, i64 16
%6 = bitcast i8* %5 to i32*
%7 = tail call i32 @le32enc(i32* %6, i32 poison)
ret void
}
int away(const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @away(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
size_t strlen(char *);
char towlower(char);
void downcase_word(char *word) {
  size_t len = strlen(word);
  for (int i = 0; i < len; i++) {
    word[i] = towlower(word[i]);
  }
}


x86 assembly (clang, -O0):
<downcase_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    117a <downcase_word+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <towlower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1140 <downcase_word+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<downcase_word>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1030 <strlen@plt>
test   %rax,%rax
je     1157 <downcase_word+0x37>
mov    %rax,%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <towlower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <downcase_word+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @downcase_word(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %1
ret void
5: ; preds = %1, %5
%6 = phi i64 [ %10, %5 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call signext i8 @towlower(i8 signext %8)
store i8 %9, i8* %7
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %2
br i1 %11, label %4, label %5
}
/* Type definitions */
struct obstack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ obstack_blank(struct obstack *, int /*<<< orphan*/);
char const *obstack_finish(struct obstack *);
int /*<<< orphan*/ qu_append_c_name(struct obstack *, char const *);
const char *qu_c_name(struct obstack *ob, const char *name) {
  obstack_blank(ob, 0);
  qu_append_c_name(ob, name);
  return obstack_finish(ob);
}


x86 assembly (clang, -O0):
<qu_c_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <obstack_blank@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <qu_append_c_name@plt>
mov    -0x8(%rbp),%rdi
call   1040 <obstack_finish@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qu_c_name>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <obstack_blank@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <qu_append_c_name@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <obstack_finish@plt>

LLVM IR (-O0):
%struct.obstack = type { i32 }
define i8* @qu_c_name(%struct.obstack* %0, i8* %1) {
%3 = alloca %struct.obstack*
%4 = alloca i8*
store %struct.obstack* %0, %struct.obstack** %3
store i8* %1, i8** %4
%5 = load %struct.obstack*, %struct.obstack** %3
%6 = call i32 @obstack_blank(%struct.obstack* %5, i32 0)
%7 = load %struct.obstack*, %struct.obstack** %3
%8 = load i8*, i8** %4
%9 = call i32 @qu_append_c_name(%struct.obstack* %7, i8* %8)
%10 = load %struct.obstack*, %struct.obstack** %3
%11 = call i8* @obstack_finish(%struct.obstack* %10)
ret i8* %11
}

LLVM IR (-O2):
%struct.obstack = type { i32 }
define i8* @qu_c_name(%struct.obstack* %0, i8* %1) {
%3 = tail call i32 @obstack_blank(%struct.obstack* %0, i32 0)
%4 = tail call i32 @qu_append_c_name(%struct.obstack* %0, i8* %1)
%5 = tail call i8* @obstack_finish(%struct.obstack* %0)
ret i8* %5
}
void print_m64() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv16_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void fatal_error_msg(char *s) { printf("Fatal error: %s\n", s); }


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"Fatal error: %s\0A\00"
define void @fatal_error_msg(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void name_cmp(void) {}


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

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

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

LLVM IR (-O2):
define void @name_cmp() {
ret void
}
int cdr_close(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @cdr_close() {
ret i32 0
}

LLVM IR (-O2):
define i32 @cdr_close() {
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t pffft_simd_size(void) { return 4; }


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

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

LLVM IR (-O0):
define i32 @pffft_simd_size() {
ret i32 4
}

LLVM IR (-O2):
define i32 @pffft_simd_size() {
ret i32 4
}