xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *forth_strdup(const char *s) {
  assert(s);
  char *str;
  if (!(str = malloc(strlen(s) + 1)))
    return NULL;
  strcpy(str, s);
  return str;
}


x86 assembly (clang, -O0):
<forth_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1185 <forth_strdup+0x45>
movq   $0x0,-0x8(%rbp)
jmp    119a <forth_strdup+0x5a>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forth_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <assert@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1170 <forth_strdup+0x30>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @forth_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %13, label %12
12: ; preds = %1
store i8* null, i8** %2
br label %18
13: ; preds = %1
%14 = load i8*, i8** %4
%15 = load i8*, i8** %3
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %4
store i8* %17, i8** %2
br label %18
18: ; preds = %13, %12
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @forth_strdup(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, 1
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %1, %7
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128AdcP__HplAtm128Adc__disableInterruption();
void Atm128AdcP__HplAtm128Adc__disableInterruption(void) {
  HplAtm128AdcP__HplAtm128Adc__disableInterruption();
}


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

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

LLVM IR (-O0):
define void @Atm128AdcP__HplAtm128Adc__disableInterruption() {
%1 = call i32 (...) @HplAtm128AdcP__HplAtm128Adc__disableInterruption()
ret void
}

LLVM IR (-O2):
define void @Atm128AdcP__HplAtm128Adc__disableInterruption() {
%1 = tail call i32 (...) @HplAtm128AdcP__HplAtm128Adc__disableInterruption()
ret void
}
void WebPInitYUV444ConvertersMIPSdspR2(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fdmi_queue_lock(struct fdmi_queue *);
int /*<<< orphan*/ fdmi_queue_remove(struct fdmi_queue *, void *);
int /*<<< orphan*/ fdmi_queue_unlock(struct fdmi_queue *);
void fdmi_queue_lock_remove(struct fdmi_queue *q, void *d) {
  fdmi_queue_lock(q);
  fdmi_queue_remove(q, d);
  fdmi_queue_unlock(q);
  return;
}


x86 assembly (clang, -O0):
<fdmi_queue_lock_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <fdmi_queue_lock@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fdmi_queue_remove@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fdmi_queue_unlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdmi_queue_lock_remove>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <fdmi_queue_lock@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fdmi_queue_remove@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fdmi_queue_unlock@plt>

LLVM IR (-O0):
%struct.fdmi_queue = type { i32 }
define void @fdmi_queue_lock_remove(%struct.fdmi_queue* %0, i8* %1) {
%3 = alloca %struct.fdmi_queue*
%4 = alloca i8*
store %struct.fdmi_queue* %0, %struct.fdmi_queue** %3
store i8* %1, i8** %4
%5 = load %struct.fdmi_queue*, %struct.fdmi_queue** %3
%6 = call i32 @fdmi_queue_lock(%struct.fdmi_queue* %5)
%7 = load %struct.fdmi_queue*, %struct.fdmi_queue** %3
%8 = load i8*, i8** %4
%9 = call i32 @fdmi_queue_remove(%struct.fdmi_queue* %7, i8* %8)
%10 = load %struct.fdmi_queue*, %struct.fdmi_queue** %3
%11 = call i32 @fdmi_queue_unlock(%struct.fdmi_queue* %10)
ret void
}

LLVM IR (-O2):
%struct.fdmi_queue = type { i32 }
define void @fdmi_queue_lock_remove(%struct.fdmi_queue* %0, i8* %1) {
%3 = tail call i32 @fdmi_queue_lock(%struct.fdmi_queue* %0)
%4 = tail call i32 @fdmi_queue_remove(%struct.fdmi_queue* %0, i8* %1)
%5 = tail call i32 @fdmi_queue_unlock(%struct.fdmi_queue* %0)
ret void
}
/* Type definitions */
struct RNApdist_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_args(struct RNApdist_args_info *);
int /*<<< orphan*/ clear_given(struct RNApdist_args_info *);
int /*<<< orphan*/ init_args_info(struct RNApdist_args_info *);
void RNApdist_cmdline_parser_init(struct RNApdist_args_info *args_info) {
  clear_given(args_info);
  clear_args(args_info);
  init_args_info(args_info);
}


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

x86 assembly (clang, -O2):
<RNApdist_cmdline_parser_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_given@plt>
mov    %rbx,%rdi
call   1030 <clear_args@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <init_args_info@plt>

LLVM IR (-O0):
%struct.RNApdist_args_info = type { i32 }
define void @RNApdist_cmdline_parser_init(%struct.RNApdist_args_info* %0) {
%2 = alloca %struct.RNApdist_args_info*
store %struct.RNApdist_args_info* %0, %struct.RNApdist_args_info** %2
%3 = load %struct.RNApdist_args_info*, %struct.RNApdist_args_info** %2
%4 = call i32 @clear_given(%struct.RNApdist_args_info* %3)
%5 = load %struct.RNApdist_args_info*, %struct.RNApdist_args_info** %2
%6 = call i32 @clear_args(%struct.RNApdist_args_info* %5)
%7 = load %struct.RNApdist_args_info*, %struct.RNApdist_args_info** %2
%8 = call i32 @init_args_info(%struct.RNApdist_args_info* %7)
ret void
}

LLVM IR (-O2):
%struct.RNApdist_args_info = type { i32 }
define void @RNApdist_cmdline_parser_init(%struct.RNApdist_args_info* %0) {
%2 = tail call i32 @clear_given(%struct.RNApdist_args_info* %0)
%3 = tail call i32 @clear_args(%struct.RNApdist_args_info* %0)
%4 = tail call i32 @init_args_info(%struct.RNApdist_args_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void gpuhead(int osvers, int osrel, int ossub) {
  printf("   busaddr   gpubusy  membusy  memocc  memtot memuse  gputype"
         "   _gpu_");
}


x86 assembly (clang, -O0):
<gpuhead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [70 x i8] c" busaddr gpubusy membusy memocc memtot memuse gputype _gpu_\00"
define void @gpuhead(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c" busaddr gpubusy membusy memocc memtot memuse gputype _gpu_\00"
define void @gpuhead(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remap_ram();
void platform_init(void) { remap_ram(); }


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

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

LLVM IR (-O0):
define void @platform_init() {
%1 = call i32 (...) @remap_ram()
ret void
}

LLVM IR (-O2):
define void @platform_init() {
%1 = tail call i32 (...) @remap_ram()
ret void
}
void foo601() {}


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

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

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

LLVM IR (-O2):
define void @foo601() {
ret void
}
/* Variables and functions */
long get_num(char *, char *);
int /*<<< orphan*/ get_string(char *);
char *tt_getRemark(char *, int, long, int /*<<< orphan*/);
char *macttGetRemark(char *arg) {
  int tbl;
  long top;
  top = get_num("ttGetRemark", arg);
  tbl = (int)get_num("ttGetRemark", arg);
  return tt_getRemark(arg, tbl, top, get_string(arg));
}


x86 assembly (clang, -O0):
<macttGetRemark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <get_num@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <get_num@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_string@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1050 <tt_getRemark@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macttGetRemark>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xec1(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <get_string@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <tt_getRemark@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"ttGetRemark\00"
define i8* @macttGetRemark(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @get_num(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5)
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = call i64 @get_num(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %3
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = load i64, i64* %4
%13 = load i8*, i8** %2
%14 = call i32 @get_string(i8* %13)
%15 = call i8* @tt_getRemark(i8* %10, i32 %11, i64 %12, i32 %14)
ret i8* %15
}

LLVM IR (-O2):
@.str = [12 x i8] c"ttGetRemark\00"
define i8* @macttGetRemark(i8* %0) {
%2 = tail call i64 @get_num(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i64 @get_num(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = trunc i64 %3 to i32
%5 = tail call i32 @get_string(i8* %0)
%6 = tail call i8* @tt_getRemark(i8* %0, i32 %4, i64 %2, i32 %5)
ret i8* %6
}
int isWhite(char c) {
  if (c == ' ')
    return 1;
  if (c == '\t')
    return 1;
  if (c == '\n')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isWhite>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    1123 <isWhite+0x23>
movl   $0x1,-0x4(%rbp)
jmp    115c <isWhite+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    113c <isWhite+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115c <isWhite+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    1155 <isWhite+0x55>
movl   $0x1,-0x4(%rbp)
jmp    115c <isWhite+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWhite>:
cmp    $0x20,%dil
ja     1120 <isWhite+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <isWhite+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isWhite(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %19
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 9
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %19
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 10
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %2
br label %19
18: ; preds = %13
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @isWhite(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 9, label %3
i8 10, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int execute_swapoff() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_swapoff() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int l_open(char *, int /*<<< orphan*/);
int l_read(int, void *, int);
scalar_t__ malloc(int);
int main(int argc, char *argv[]) {
  int file = l_open("unknown", O_RDONLY);
  void *cbuf = (void *)malloc(sizeof(char) * 100);
  int a = l_read(file, cbuf, 99);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xeaa(%rip),%rdi
call   1050 <l_open@plt>
mov    %eax,-0x14(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    $0x63,%edx
call   1030 <l_read@plt>
mov    %eax,-0x24(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1050 <l_open@plt>
mov    %eax,%ebx
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %ebx,%edi
mov    %rax,%rsi
mov    $0x63,%edx
call   1030 <l_read@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"unknown\00"
@O_RDONLY = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* @O_RDONLY
%10 = call i32 @l_open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9)
store i32 %10, i32* %6
%11 = call i64 @malloc(i32 100)
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %7
%13 = load i32, i32* %6
%14 = load i8*, i8** %7
%15 = call i32 @l_read(i32 %13, i8* %14, i32 99)
store i32 %15, i32* %8
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"unknown\00"
@O_RDONLY = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @l_open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i64 @malloc(i32 100)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @l_read(i32 %4, i8* %6, i32 99)
ret i32 0
}
int cpufreq_limit_put(struct cpufreq_limit_handle *handle) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.cpufreq_limit_handle = type opaque
define i32 @cpufreq_limit_put(%struct.cpufreq_limit_handle* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct catmc_atomic_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct catmc_atomic_char *);
void catmc_atomic_char_destroy(struct catmc_atomic_char *wrapper) {
  free(wrapper);
}


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

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

LLVM IR (-O0):
%struct.catmc_atomic_char = type { i32 }
define void @catmc_atomic_char_destroy(%struct.catmc_atomic_char* %0) {
%2 = alloca %struct.catmc_atomic_char*
store %struct.catmc_atomic_char* %0, %struct.catmc_atomic_char** %2
%3 = load %struct.catmc_atomic_char*, %struct.catmc_atomic_char** %2
%4 = call i32 @free(%struct.catmc_atomic_char* %3)
ret void
}

LLVM IR (-O2):
%struct.catmc_atomic_char = type { i32 }
define void @catmc_atomic_char_destroy(%struct.catmc_atomic_char* nocapture %0) {
%2 = tail call i32 @free(%struct.catmc_atomic_char* %0)
ret void
}
/* Variables and functions */
double pow(double, double);
double z2P_fao(double z) {
  double P;
  P = 101.3 * (pow(((293.0 - 0.0065 * z) / 293.0), 5.26));
  return (P);
}


x86 assembly (clang, -O0):
<z2P_fao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeee(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeba(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xea2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<z2P_fao>:
push   %rax
mulsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
movsd  0xedf(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @z2P_fao(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double 0xBF7A9FBE76C8B439, double %4, double 2.930000e+02)
%6 = fdiv double %5, 2.930000e+02
%7 = call double @pow(double %6, double 5.260000e+00)
%8 = fmul double 1.013000e+02, %7
store double %8, double* %3
%9 = load double, double* %3
ret double %9
}

LLVM IR (-O2):
define double @z2P_fao(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0xBF7A9FBE76C8B439, double 2.930000e+02)
%3 = fdiv double %2, 2.930000e+02
%4 = tail call double @pow(double %3, double 5.260000e+00)
%5 = fmul double %4, 1.013000e+02
ret double %5
}
/* Variables and functions */
int SIGHUP;
int SIGINT;
int SIGTERM;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ system(char *);
void hand(int sig) {
  if (sig == SIGINT || sig == SIGTERM || sig == SIGHUP)
    system("killall cpulim &> /dev/null");
  exit(1);
}


x86 assembly (clang, -O0):
<hand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%eax
je     1161 <hand+0x41>
mov    -0x4(%rbp),%eax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%eax
je     1161 <hand+0x41>
mov    -0x4(%rbp),%eax
mov    0x2e97(%rip),%rcx
cmp    (%rcx),%eax
jne    116d <hand+0x4d>
lea    0xe98(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<hand>:
push   %rax
mov    0x2eb8(%rip),%rax
cmp    %edi,(%rax)
je     114c <hand+0x2c>
mov    0x2ea5(%rip),%rax
cmp    %edi,(%rax)
je     114c <hand+0x2c>
mov    0x2eb2(%rip),%rax
cmp    %edi,(%rax)
je     114c <hand+0x2c>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xead(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIGTERM = global i32 0
@SIGHUP = global i32 0
@.str = [28 x i8] c"killall cpulim &> /dev/null\00"
define void @hand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @SIGTERM
%9 = icmp eq i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = load i32, i32* @SIGHUP
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10, %6, %1
%15 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %10
%17 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIGTERM = global i32 0
@SIGHUP = global i32 0
@.str = [28 x i8] c"killall cpulim &> /dev/null\00"
define void @hand(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @SIGTERM
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = load i32, i32* @SIGHUP
%8 = icmp eq i32 %7, %0
%9 = select i1 %6, i1 true, i1 %8
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = tail call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %1, %10
%13 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_EEint32_reg(int val) { return ((val) & (0xEE << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_EEint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xee,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EEint32_reg>:
test   $0xee,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EEint32_reg(i32 %0) {
%2 = and i32 %0, 238
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void resets(char *s) { *s = '\0'; }


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

x86 assembly (clang, -O2):
<resets>:
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @resets(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_cs_creset(int, int);
void flash_release_reset() { set_cs_creset(1, 1); }


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

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

LLVM IR (-O0):
define void @flash_release_reset() {
%1 = call i32 @set_cs_creset(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @flash_release_reset() {
%1 = tail call i32 @set_cs_creset(i32 1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *argv0) {
  fprintf(stderr, "usage: %s fileout width height dim look [rho]\n", argv0);
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"usage: %s fileout width height dim look [rho]\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"usage: %s fileout width height dim look [rho]\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ getInfix();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *);
char tolower(int /*<<< orphan*/);
int main() {
  char again = 'y';
  while (again == 'y') {
    getInfix();
    printf("\nConvert Another? (y)es or (n)o\n");
    again = tolower(getch());
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x79,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
jne    1189 <main+0x49>
mov    $0x0,%al
call   1060 <getInfix@plt>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getch@plt>
mov    %eax,%edi
call   1040 <tolower@plt>
mov    %al,-0x5(%rbp)
jmp    1153 <main+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <getInfix@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getch@plt>
mov    %eax,%edi
call   1040 <tolower@plt>
cmp    $0x79,%al
je     1150 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\0AConvert Another? (y)es or (n)o\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 121, i8* %2
br label %3
3: ; preds = %7, %0
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 121
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = call i32 (...) @getInfix()
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @getch()
%11 = call signext i8 @tolower(i32 %10)
store i8 %11, i8* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@str = [32 x i8] c"\0AConvert Another? (y)es or (n)o\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @getInfix()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @getch()
%5 = tail call signext i8 @tolower(i32 %4)
%6 = icmp eq i8 %5, 121
br i1 %6, label %1, label %7
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned short, int);
void serial_disable_rda_interrupt(unsigned short com) { outb((com + 1), 0x00); }


x86 assembly (clang, -O0):
<serial_disable_rda_interrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x1,%eax
xor    %esi,%esi
movzwl %ax,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_disable_rda_interrupt>:
add    $0x1,%edi
movzwl %di,%edi
xor    %esi,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @serial_disable_rda_interrupt(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = add nsw i32 %4, 1
%6 = trunc i32 %5 to i16
%7 = call i32 @outb(i16 zeroext %6, i32 0)
ret void
}

LLVM IR (-O2):
define void @serial_disable_rda_interrupt(i16 zeroext %0) {
%2 = add i16 %0, 1
%3 = tail call i32 @outb(i16 zeroext %2, i32 0)
ret void
}
/* Type definitions */
struct ent_physics {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ent_physics *);
void ent_physics_destroy(struct ent_physics **physics) {
  if ((physics == NULL) || (*physics == NULL))
    return;
  free(*physics);
  *physics = NULL;
}


x86 assembly (clang, -O0):
<ent_physics_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1135 <ent_physics_destroy+0x25>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    113a <ent_physics_destroy+0x2a>
jmp    1151 <ent_physics_destroy+0x41>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ent_physics_destroy>:
push   %rbx
test   %rdi,%rdi
je     112d <ent_physics_destroy+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <ent_physics_destroy+0x1d>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.ent_physics = type { i32 }
define void @ent_physics_destroy(%struct.ent_physics** %0) {
%2 = alloca %struct.ent_physics**
store %struct.ent_physics** %0, %struct.ent_physics*** %2
%3 = load %struct.ent_physics**, %struct.ent_physics*** %2
%4 = icmp eq %struct.ent_physics** %3, null
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load %struct.ent_physics**, %struct.ent_physics*** %2
%7 = load %struct.ent_physics*, %struct.ent_physics** %6
%8 = icmp eq %struct.ent_physics* %7, null
br i1 %8, label %9, label %10
9: ; preds = %5, %1
br label %15
10: ; preds = %5
%11 = load %struct.ent_physics**, %struct.ent_physics*** %2
%12 = load %struct.ent_physics*, %struct.ent_physics** %11
%13 = call i32 @free(%struct.ent_physics* %12)
%14 = load %struct.ent_physics**, %struct.ent_physics*** %2
store %struct.ent_physics* null, %struct.ent_physics** %14
br label %15
15: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
%struct.ent_physics = type { i32 }
define void @ent_physics_destroy(%struct.ent_physics** %0) {
%2 = icmp eq %struct.ent_physics** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load %struct.ent_physics*, %struct.ent_physics** %0
%5 = icmp eq %struct.ent_physics* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(%struct.ent_physics* %4)
store %struct.ent_physics* null, %struct.ent_physics** %0
br label %8
8: ; preds = %1, %3, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rte_snprintf(char *, int, char *, unsigned int);
void mbuf_poolname_build(unsigned int sock_id, char *mp_name, int name_size) {
  rte_snprintf(mp_name, name_size, "mbuf_pool_socket_%u", sock_id);
}


x86 assembly (clang, -O0):
<mbuf_poolname_build>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x4(%rbp),%ecx
lea    0xecd(%rip),%rdx
call   1030 <rte_snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbuf_poolname_build>:
mov    %edi,%ecx
lea    0xee7(%rip),%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <rte_snprintf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"mbuf_pool_socket_%u\00"
define void @mbuf_poolname_build(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @rte_snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"mbuf_pool_socket_%u\00"
define void @mbuf_poolname_build(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @rte_snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int _tfsgetline(int, char *, int);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_tfsgetline(int fd, char *bp, int max) {
  int ret;
  monLock();
  ret = _tfsgetline(fd, bp, max);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_tfsgetline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <_tfsgetline@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <monUnlock@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_tfsgetline>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <_tfsgetline@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <monUnlock@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mon_tfsgetline(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = call i32 (...) @monLock()
%9 = load i32, i32* %4
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @_tfsgetline(i32 %9, i8* %10, i32 %11)
store i32 %12, i32* %7
%13 = call i32 (...) @monUnlock()
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @mon_tfsgetline(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 (...) @monLock()
%5 = tail call i32 @_tfsgetline(i32 %0, i8* %1, i32 %2)
%6 = tail call i32 (...) @monUnlock()
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct iovec {
  size_t iov_len;
  int /*<<< orphan*/ iov_base;
};

/* Variables and functions */
int /*<<< orphan*/ __UNCONST(void const *);
int /*<<< orphan*/ crc32v(struct iovec *, int);
uint32_t crc32(const void *buf, size_t size) {
  struct iovec iov[1];
  iov[0].iov_base = __UNCONST(buf);
  iov[0].iov_len = size;
  return crc32v(iov, 1);
}


x86 assembly (clang, -O0):
<crc32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__UNCONST@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x1,%esi
call   1030 <crc32v@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
call   1040 <__UNCONST@plt>
mov    %eax,0x8(%rsp)
mov    %rbx,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <crc32v@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.iovec = type { i64, i32 }
define i32 @crc32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca [1 x %struct.iovec]
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = call i32 @__UNCONST(i8* %6)
%8 = getelementptr inbounds [1 x %struct.iovec], [1 x %struct.iovec]* %5, i64 0, i64 0
%9 = getelementptr inbounds %struct.iovec, %struct.iovec* %8, i32 0, i32 1
store i32 %7, i32* %9
%10 = load i64, i64* %4
%11 = getelementptr inbounds [1 x %struct.iovec], [1 x %struct.iovec]* %5, i64 0, i64 0
%12 = getelementptr inbounds %struct.iovec, %struct.iovec* %11, i32 0, i32 0
store i64 %10, i64* %12
%13 = getelementptr inbounds [1 x %struct.iovec], [1 x %struct.iovec]* %5, i64 0, i64 0
%14 = call i32 @crc32v(%struct.iovec* %13, i32 1)
ret i32 %14
}

LLVM IR (-O2):
%struct.iovec = type { i64, i32 }
define i32 @crc32(i8* %0, i64 %1) {
%3 = alloca [1 x %struct.iovec]
%4 = bitcast [1 x %struct.iovec]* %3 to i8*
%5 = tail call i32 @__UNCONST(i8* %0)
%6 = getelementptr inbounds [1 x %struct.iovec], [1 x %struct.iovec]* %3, i64 0, i64 0
%7 = getelementptr inbounds [1 x %struct.iovec], [1 x %struct.iovec]* %3, i64 0, i64 0, i32 1
store i32 %5, i32* %7
%8 = getelementptr inbounds [1 x %struct.iovec], [1 x %struct.iovec]* %3, i64 0, i64 0, i32 0
store i64 %1, i64* %8
%9 = call i32 @crc32v(%struct.iovec* %6, i32 1)
ret i32 %9
}
int bswap(int v1) {
  int eax = 0;
  char *pedx = (char *)&v1;
  char *peax = (char *)&eax;
  peax[0] = pedx[3];
  peax[1] = pedx[2];
  peax[2] = pedx[1];
  peax[3] = pedx[0];
  return eax;
}


x86 assembly (clang, -O0):
<bswap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bswap(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
int _Forkpty(int *pty, char *name) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_Forkpty(i32* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void List_IteratorDestroy(void *iterator) { free(iterator); }


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

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

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

LLVM IR (-O2):
define void @List_IteratorDestroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swift_inv_data_tag(unsigned long);
void swift_flush_dcache(void) {
  unsigned long addr;
  for (addr = 0; addr < 0x2000; addr += 0x10) {
    swift_inv_data_tag(addr);
  }
}


x86 assembly (clang, -O0):
<swift_flush_dcache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
cmpq   $0x2000,-0x8(%rbp)
jae    1148 <swift_flush_dcache+0x38>
mov    -0x8(%rbp),%rdi
call   1030 <swift_inv_data_tag@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <swift_flush_dcache+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swift_flush_dcache>:
push   %rbx
mov    $0xfffffffffffffff0,%rbx
nopl   0x0(%rax,%rax,1)
add    $0x10,%rbx
mov    %rbx,%rdi
call   1030 <swift_inv_data_tag@plt>
cmp    $0x1ff0,%rbx
jb     1120 <swift_flush_dcache+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @swift_flush_dcache() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %8, %0
%3 = load i64, i64* %1
%4 = icmp ult i64 %3, 8192
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i64, i64* %1
%7 = call i32 @swift_inv_data_tag(i64 %6)
br label %8
8: ; preds = %5
%9 = load i64, i64* %1
%10 = add i64 %9, 16
store i64 %10, i64* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @swift_flush_dcache() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @swift_inv_data_tag(i64 %2)
%4 = add nuw nsw i64 %2, 16
%5 = icmp ult i64 %2, 8176
br i1 %5, label %1, label %6
6: ; preds = %1
ret void
}
/* Variables and functions */
int htonl(unsigned int);
unsigned sl_htonl(unsigned hostlong) { return htonl(hostlong); }


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

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

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

LLVM IR (-O2):
define i32 @sl_htonl(i32 %0) {
%2 = tail call i32 @htonl(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ state_free(void *);
void _state_hash_table_free(void *item) { state_free(item); }


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

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

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

LLVM IR (-O2):
define void @_state_hash_table_free(i8* %0) {
%2 = tail call i32 @state_free(i8* %0)
ret void
}
/* Variables and functions */
char *PathFindFileNameA(char const *);
char *strrchr(char *, char);
char *PathFindExtensionA(const char *path) {
  char *p = PathFindFileNameA(path);
  char *ext = p ? strrchr(p, '.') : p;
  return ext ? ext : p;
}


x86 assembly (clang, -O0):
<PathFindExtensionA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <PathFindFileNameA@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115b <PathFindExtensionA+0x3b>
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x20(%rbp)
jmp    1163 <PathFindExtensionA+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1183 <PathFindExtensionA+0x63>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    118b <PathFindExtensionA+0x6b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PathFindExtensionA>:
push   %rbx
call   1040 <PathFindFileNameA@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113d <PathFindExtensionA+0x1d>
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
jmp    113f <PathFindExtensionA+0x1f>
xor    %eax,%eax
test   %rax,%rax
cmovne %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @PathFindExtensionA(i8* %0) {
%2 = tail call i8* @PathFindFileNameA(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @strrchr(i8* %2, i8 signext 46)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
%8 = icmp eq i8* %7, null
%9 = select i1 %8, i8* %2, i8* %7
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ memmove(void *, void const *, size_t);
void __attribute__((weak))
__aeabi_memmove4_impl2(void *dest, const void *src, size_t n) {
  memmove(dest, src, n);
}


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

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

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

LLVM IR (-O2):
define weak void @__aeabi_memmove4_impl2(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memmove(i8* %0, i8* %1, i64 %2)
ret void
}
void glWeightPointerOES(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define double @cosh(double %0) {
%2 = tail call double @__ocml_cosh_f64(double %0)
ret double %2
}