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

/* Variables and functions */
int /*<<< orphan*/ hmap_remove(struct hmap *, struct hmap_node *);
void hmap_remove_and_shrink(struct hmap *hmap, struct hmap_node *node) {
  hmap_remove(hmap, node);
}


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

x86 assembly (clang, -O2):
<hmap_remove_and_shrink>:
jmp    1030 <hmap_remove@plt>

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

LLVM IR (-O2):
%struct.hmap = type { i32 }
%struct.hmap_node = type { i32 }
define void @hmap_remove_and_shrink(%struct.hmap* %0, %struct.hmap_node* %1) {
%3 = tail call i32 @hmap_remove(%struct.hmap* %0, %struct.hmap_node* %1)
ret void
}
void snmp_synch_reset(struct snmp_session *notused) {}


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

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

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

LLVM IR (-O2):
%struct.snmp_session = type opaque
define void @snmp_synch_reset(%struct.snmp_session* nocapture %0) {
ret void
}
void mtk_mdio_cleanup(struct mtk_eth *eth) {}


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

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

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

LLVM IR (-O2):
%struct.mtk_eth = type opaque
define void @mtk_mdio_cleanup(%struct.mtk_eth* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *, int);
void pa_threaded_mainloop_signal(int *m, int wait_for_accept) {
  empty_log("pa_threaded_mainloop_signal: wait_for_accept=%d  Not doing "
            "anything here actually\n",
            wait_for_accept);
  return;
}


x86 assembly (clang, -O0):
<pa_threaded_mainloop_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <empty_log@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [83 x i8] c"pa_threaded_mainloop_signal: wait_for_accept=%d Not doing anything here actually\0A\00"
define void @pa_threaded_mainloop_signal(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @empty_log(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [83 x i8] c"pa_threaded_mainloop_signal: wait_for_accept=%d Not doing anything here actually\0A\00"
define void @pa_threaded_mainloop_signal(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @empty_log(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ tbuffer;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void showNowTime() {
  time_t now;
  char tbuffer[26];
  struct tm *tm_info;
  time(&now);
  tm_info = localtime(&now);
  strftime(tbuffer, sizeof(tbuffer), "%Y/%m/%d %H:%M:%S", tm_info);
  printf("%s\n", tbuffer);
}


x86 assembly (clang, -O0):
<showNowTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x4(%rbp),%rdi
call   1050 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x1a,%esi
lea    0xe8e(%rip),%rdx
call   1060 <strftime@plt>
lea    -0x20(%rbp),%rsi
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showNowTime>:
push   %rbx
sub    $0x30,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0xe9f(%rip),%rdx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1a,%esi
mov    %rax,%rcx
call   1060 <strftime@plt>
lea    0xe95(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y/%m/%d %H:%M:%S\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @showNowTime() {
%1 = alloca i32
%2 = alloca [26 x i8]
%3 = alloca %struct.tm*
%4 = call i32 @time(i32* %1)
%5 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %5, %struct.tm** %3
%6 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%7 = load %struct.tm*, %struct.tm** %3
%8 = call i32 @strftime(i8* %6, i32 26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %7)
%9 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y/%m/%d %H:%M:%S\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @showNowTime() {
%1 = alloca i32
%2 = alloca [26 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%5 = call i32 @time(i32* %1)
%6 = call %struct.tm* @localtime(i32* %1)
%7 = call i32 @strftime(i8* %4, i32 26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}
int main() {
  int a = 2;
  int b = 3;
  a + b;
  int c = a + a * b;
  return c;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = mul nsw i32 %9, %10
%12 = add nsw i32 %8, %11
store i32 %12, i32* %4
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
ret i32 8
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ send(int, void *, size_t, int);
ssize_t test(void) {
  int sockfd = 4;
  int buffer;
  void *buf = &buffer;
  size_t len = sizeof(buffer);
  int flags = 7;
  return send(sockfd, buf, len, flags);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x4,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x4,-0x18(%rbp)
movl   $0x7,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
mov    $0x4,%edi
mov    $0x7,%ecx
call   1030 <send@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i32 4, i32* %1
%6 = bitcast i32* %2 to i8*
store i8* %6, i8** %3
store i64 4, i64* %4
store i32 7, i32* %5
%7 = load i32, i32* %1
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = load i32, i32* %5
%11 = call i32 @send(i32 %7, i8* %8, i64 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @send(i32 4, i8* %2, i64 4, i32 7)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _printf(int, char *, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ system(char *);
void start(char proc[]) {
  _printf(8, "starting %s\nwait\n", proc);
  system(proc);
  sleep(1);
}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x8,%edi
lea    0xeb4(%rip),%rsi
call   1040 <_printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
mov    $0x8,%edi
mov    %rbx,%rdx
call   1040 <_printf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1050 <sleep@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"starting %s\0Await\0A\00"
define void @start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @_printf(i32 8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @system(i8* %5)
%7 = call i32 @sleep(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"starting %s\0Await\0A\00"
define void @start(i8* %0) {
%2 = tail call i32 @_printf(i32 8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @system(i8* %0)
%4 = tail call i32 @sleep(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parseIni(char *);
int main() { parseIni("./gauge.ini"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"./gauge.ini\00"
define i32 @main() {
%1 = call i32 @parseIni(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"./gauge.ini\00"
define i32 @main() {
%1 = tail call i32 @parseIni(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void read_array(int *A) {
  int i, j = 0, x;
  for (i = 0; i < 524288; ++i) {
    x = A[i];
  }
  ++j;
  printf("i %d j %d", i, j);
}


x86 assembly (clang, -O0):
<read_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x80000,-0xc(%rbp)
jge    1153 <read_array+0x43>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <read_array+0x1a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_array>:
lea    0xee9(%rip),%rdi
mov    $0x80000,%esi
mov    $0x1,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"i %d j %d\00"
define void @read_array(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %6
6: ; preds = %15, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 524288
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32*, i32** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
store i32 %14, i32* %5
br label %15
15: ; preds = %9
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %6
18: ; preds = %6
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %21, i32 %22)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"i %d j %d\00"
define void @read_array(i32* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 524288, i32 1)
ret void
}
/* Type definitions */
struct UPnP_Stack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ *RNDPop(struct UPnP_Stack **);
void RNDFlush(struct UPnP_Stack **pp_Top) {
  while (RNDPop(pp_Top) != NULL) {
  }
  *pp_Top = NULL;
}


x86 assembly (clang, -O0):
<RNDFlush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <RNDPop@plt>
cmp    $0x0,%rax
je     1134 <RNDFlush+0x24>
jmp    111c <RNDFlush+0xc>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDFlush>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <RNDPop@plt>
test   %rax,%rax
jne    1120 <RNDFlush+0x10>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.UPnP_Stack = type { i32 }
define void @RNDFlush(%struct.UPnP_Stack** %0) {
%2 = alloca %struct.UPnP_Stack**
store %struct.UPnP_Stack** %0, %struct.UPnP_Stack*** %2
br label %3
3: ; preds = %7, %1
%4 = load %struct.UPnP_Stack**, %struct.UPnP_Stack*** %2
%5 = call i32* @RNDPop(%struct.UPnP_Stack** %4)
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load %struct.UPnP_Stack**, %struct.UPnP_Stack*** %2
store %struct.UPnP_Stack* null, %struct.UPnP_Stack** %9
ret void
}

LLVM IR (-O2):
%struct.UPnP_Stack = type { i32 }
define void @RNDFlush(%struct.UPnP_Stack** %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32* @RNDPop(%struct.UPnP_Stack** %0)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %2
5: ; preds = %2
store %struct.UPnP_Stack* null, %struct.UPnP_Stack** %0
ret void
}
void bootseq() {}


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

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

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

LLVM IR (-O2):
define void @bootseq() {
ret void
}
int main() { return 0UL <= 1UL; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(char *exec) {
  fprintf(stderr,
          "Usage:\n"
          "\n"
          "\t%s [-vD] -d <dazibao> [-p <port>]\n"
          "\n"
          "Options:\n"
          "\t-d <dazibao> specify the path of the dazibao\n"
          "\t-p <port>    specify the port to use (default is 3437)\n"
          "\t-v           verbose mode. Multiple -v options increase\n"
          "\t             the verbosity.\n"
          "\t-D           debug mode. Display pad1s and padNs.\n",
          exec);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [293 x i8] c"Usage:\0A\0A\09%s [-vD] -d <dazibao> [-p <port>]\0A\0AOptions:\0A\09-d <dazibao> specify the path of the dazibao\0A\09-p <port> specify the port to use (default is 3437)\0A\09-v verbose mode. Multiple -v options increase\0A\09 the verbosity.\0A\09-D debug mode. Display pad1s and padNs.\0A\00"
define void @print_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 ([293 x i8], [293 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [293 x i8] c"Usage:\0A\0A\09%s [-vD] -d <dazibao> [-p <port>]\0A\0AOptions:\0A\09-d <dazibao> specify the path of the dazibao\0A\09-p <port> specify the port to use (default is 3437)\0A\09-v verbose mode. Multiple -v options increase\0A\09 the verbosity.\0A\09-D debug mode. Display pad1s and padNs.\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([293 x i8], [293 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *do_u_strcasestr(char const *, char const *, int /*<<< orphan*/);
char *u_strcasestr(const char *haystack, const char *needle) {
  return do_u_strcasestr(haystack, needle, 0);
}


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

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

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

LLVM IR (-O2):
define i8* @u_strcasestr(i8* %0, i8* %1) {
%3 = tail call i8* @do_u_strcasestr(i8* %0, i8* %1, i32 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int main() { raise(SIGALRM); }


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

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

LLVM IR (-O0):
@SIGALRM = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGALRM
%2 = call i32 @raise(i32 %1)
ret i32 0
}

LLVM IR (-O2):
@SIGALRM = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGALRM
%2 = tail call i32 @raise(i32 %1)
ret i32 0
}
/* Variables and functions */
unsigned int exynos_5410_gpio_read(unsigned int);
int /*<<< orphan*/ exynos_5410_gpio_write_mask(unsigned int, unsigned int,
                                               unsigned int);
void odroid_xu_gpio_toggle_25() {
  unsigned int bank_offset = 0x0C20;
  unsigned int bit_index = 7;
  unsigned int d = exynos_5410_gpio_read(bank_offset);
  d ^= (1U << bit_index);
  exynos_5410_gpio_write_mask(bank_offset, d, (1U << bit_index));
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_toggle_25>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xc20,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <exynos_5410_gpio_read@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
call   1030 <exynos_5410_gpio_write_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_toggle_25>:
push   %rax
mov    $0xc20,%edi
call   1040 <exynos_5410_gpio_read@plt>
xor    $0x80,%eax
mov    $0xc20,%edi
mov    %eax,%esi
mov    $0x80,%edx
pop    %rax
jmp    1030 <exynos_5410_gpio_write_mask@plt>

LLVM IR (-O0):
define void @odroid_xu_gpio_toggle_25() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 3104, i32* %1
store i32 7, i32* %2
%4 = load i32, i32* %1
%5 = call i32 @exynos_5410_gpio_read(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = shl i32 1, %6
%8 = load i32, i32* %3
%9 = xor i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %1
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = shl i32 1, %12
%14 = call i32 @exynos_5410_gpio_write_mask(i32 %10, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
define void @odroid_xu_gpio_toggle_25() {
%1 = tail call i32 @exynos_5410_gpio_read(i32 3104)
%2 = xor i32 %1, 128
%3 = tail call i32 @exynos_5410_gpio_write_mask(i32 3104, i32 %2, i32 128)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arch_func_entry(char *);
void emit_func_entry(char *stack_sym) { arch_func_entry(stack_sym); }


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

x86 assembly (clang, -O2):
<emit_func_entry>:
jmp    1030 <arch_func_entry@plt>

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

LLVM IR (-O2):
define void @emit_func_entry(i8* %0) {
%2 = tail call i32 @arch_func_entry(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ fabs(int);
int fmod(int, int);
float redf(int i) {
  int n = 4;
  return (float)((((1 - fmod((i - 1), n))) < 0 ? -fabs(1) : fabs(1)));
}


x86 assembly (clang, -O0):
<redf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x8(%rbp),%esi
call   1030 <fmod@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cmp    $0x0,%eax
jge    116d <redf+0x4d>
mov    $0x1,%edi
call   1040 <fabs@plt>
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    117b <redf+0x5b>
mov    $0x1,%edi
call   1040 <fabs@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redf>:
push   %rbx
add    $0xffffffff,%edi
mov    $0x4,%esi
call   1030 <fmod@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1040 <fabs@plt>
mov    %rax,%rcx
neg    %rcx
cmp    $0x2,%ebx
cmovl  %rax,%rcx
cvtsi2ss %rcx,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @redf(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %3
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
%6 = load i32, i32* %3
%7 = call i32 @fmod(i32 %5, i32 %6)
%8 = sub nsw i32 1, %7
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = call i64 @fabs(i32 1)
%12 = sub nsw i64 0, %11
br label %15
13: ; preds = %1
%14 = call i64 @fabs(i32 1)
br label %15
15: ; preds = %13, %10
%16 = phi i64 [ %12, %10 ], [ %14, %13 ]
%17 = sitofp i64 %16 to float
ret float %17
}

LLVM IR (-O2):
define float @redf(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 @fmod(i32 %2, i32 4)
%4 = icmp sgt i32 %3, 1
%5 = tail call i64 @fabs(i32 1)
%6 = sub nsw i64 0, %5
%7 = select i1 %4, i64 %6, i64 %5
%8 = sitofp i64 %7 to float
ret float %8
}
XSetWindowBorderPixmap() {}


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

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

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

LLVM IR (-O2):
define i32 @XSetWindowBorderPixmap() {
ret i32 undef
}
int test_imm_8Duint32_reg(unsigned int val) {
  return ((val) & (0x8D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_8Duint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 141
%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_8Duint32_reg(i32 %0) {
%2 = and i32 %0, 141
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void I422ToYUY2Row_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToYUY2Row_SSE2() {
ret void
}
int IMUBPOllAngles(float *yaw, float *pitch, float *roll) {}


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

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

LLVM IR (-O0):
define i32 @IMUBPOllAngles(float* %0, float* %1, float* %2) {
%4 = alloca i32
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @IMUBPOllAngles(float* nocapture readnone %0, float* nocapture readnone %1, float* nocapture readnone %2) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void die_print_usage(void) {
  printf("Usage: u2ps [options] input [output]\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"Usage: u2ps [options] input [output]\0A\00"
define void @die_print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [37 x i8] c"Usage: u2ps [options] input [output]\00"
define void @die_print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawn_file_actions_t;

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, char, int);
int posix_spawn_file_actions_init(posix_spawn_file_actions_t *file_actions) {
  memset(file_actions, '\0', sizeof(*file_actions));
  return 0;
}


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

x86 assembly (clang, -O2):
<posix_spawn_file_actions_init>:
push   %rax
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @posix_spawn_file_actions_init(i32* %0) {
%2 = tail call i32 @memset(i32* %0, i8 signext 0, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int this_is_a_number;
  printf("Please enter a number: ");
  scanf("%d", &this_is_a_number);
  printf("You entered %d\n", this_is_a_number);
  getchar();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Please enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"You entered %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Please enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"You entered %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
scalar_t__ tolower(int);
int PLD_strlower(char *convertme) {
  char *c = convertme;
  while (*c != '\0') {
    *c = (unsigned char)tolower((int)*c);
    c++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<PLD_strlower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <PLD_strlower+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <PLD_strlower+0x14>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @PLD_strlower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i64 @tolower(i32 %7)
%9 = trunc i64 %8 to i8
store i8 %9, i8* %6
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret i32 0
}
int os_close(void *data, int *rc) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @os_close(i8* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
void bar(void (*foo)(void)) {
  void (*func)(void) __attribute__((nocf_check)) = foo;
  func();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
call   *-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
jmp    *%rdi

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

LLVM IR (-O2):
define void @bar(void ()* nocapture %0) {
tail call void %0()
ret void
}
double asin(x)
double x;
{ return asin_acos(x, 0); }


x86 assembly (clang, -O0):
<asin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %edi,%edi
mov    $0x1,%al
call   1030 <asin_acos@plt>
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asin>:
push   %rax
xor    %edi,%edi
mov    $0x1,%al
call   1030 <asin_acos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @asin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (double, i32, ...) bitcast (i32 (...)* @asin_acos to i32 (double, i32, ...)*)(double %3, i32 0)
%5 = sitofp i32 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @asin(double %0) {
%2 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @asin_acos to i32 (double, i32, ...)*)(double %0, i32 0)
%3 = sitofp i32 %2 to double
ret double %3
}
/* Type definitions */
struct device {
  int dummy;
};

/* Variables and functions */
int dev_open_flags(struct device *, int, int, int /*<<< orphan*/);
scalar_t__ vg_write_lock_held();
int dev_open(struct device *dev) {
  int flags;
  flags = vg_write_lock_held() ? 02 : 00;
  return dev_open_flags(dev, flags, 1, 0);
}


x86 assembly (clang, -O0):
<dev_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <vg_write_lock_held@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x2,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <dev_open_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dev_open>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <vg_write_lock_held@plt>
xor    %esi,%esi
test   %rax,%rax
setne  %sil
add    %esi,%esi
mov    %rbx,%rdi
mov    $0x1,%edx
xor    %ecx,%ecx
pop    %rbx
jmp    1030 <dev_open_flags@plt>

LLVM IR (-O0):
%struct.device = type { i32 }
define i32 @dev_open(%struct.device* %0) {
%2 = alloca %struct.device*
%3 = alloca i32
store %struct.device* %0, %struct.device** %2
%4 = call i64 (...) @vg_write_lock_held()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 2, i32 0
store i32 %7, i32* %3
%8 = load %struct.device*, %struct.device** %2
%9 = load i32, i32* %3
%10 = call i32 @dev_open_flags(%struct.device* %8, i32 %9, i32 1, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.device = type { i32 }
define i32 @dev_open(%struct.device* %0) {
%2 = tail call i64 (...) @vg_write_lock_held()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 2
%5 = tail call i32 @dev_open_flags(%struct.device* %0, i32 %4, i32 1, i32 0)
ret i32 %5
}
void specks_datawait(struct stuff *st) {}


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

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

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

LLVM IR (-O2):
%struct.stuff = type opaque
define void @specks_datawait(%struct.stuff* nocapture %0) {
ret void
}
unsigned gl_shader_num(void) { return 0; }


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

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

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

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

/* Variables and functions */
size_t sendMessage(int, char *);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
size_t sendPrepareToReceiveMsg(int socket, uint32_t size, uint32_t count) {
  char msg[200];
  sprintf(msg, "receive;%u;%u", size, count);
  return sendMessage(socket, &msg[0]);
}


x86 assembly (clang, -O0):
<sendPrepareToReceiveMsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeb8(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0xe0(%rbp),%rsi
call   1030 <sendMessage@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendPrepareToReceiveMsg>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%ebx
lea    0xec9(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <sendMessage@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"receive;%u;%u\00"
define i64 @sendPrepareToReceiveMsg(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [200 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
%12 = load i32, i32* %4
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%14 = call i64 @sendMessage(i32 %12, i8* %13)
ret i64 %14
}

LLVM IR (-O2):
@.str = [14 x i8] c"receive;%u;%u\00"
define i64 @sendPrepareToReceiveMsg(i32 %0, i32 %1, i32 %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%7 = call i64 @sendMessage(i32 %0, i8* %5)
ret i64 %7
}
void transfer_RGBA8888_to_ARGB8888(unsigned char *(*output),
                                   unsigned char *input) {
  (*output)[0] = input[3];
  (*output)[1] = input[0];
  (*output)[2] = input[1];
  (*output)[3] = input[2];
  (*output) += 4;
}


x86 assembly (clang, -O0):
<transfer_RGBA8888_to_ARGB8888>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_RGBA8888_to_ARGB8888>:
mov    0x3(%rsi),%al
mov    (%rdi),%rcx
mov    %al,(%rcx)
mov    (%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x1(%rcx)
mov    0x1(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x2(%rcx)
mov    0x2(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x3(%rcx)
addq   $0x4,(%rdi)
ret

LLVM IR (-O0):
define void @transfer_RGBA8888_to_ARGB8888(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 = getelementptr inbounds i8, i8* %5, i64 3
%7 = load i8, i8* %6
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %7, i8* %10
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = load i8**, i8*** %3
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %13, i8* %16
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %18
%20 = load i8**, i8*** %3
%21 = load i8*, i8** %20
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %19, i8* %22
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 2
%25 = load i8, i8* %24
%26 = load i8**, i8*** %3
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i64 3
store i8 %25, i8* %28
%29 = load i8**, i8*** %3
%30 = load i8*, i8** %29
%31 = getelementptr inbounds i8, i8* %30, i64 4
store i8* %31, i8** %29
ret void
}

LLVM IR (-O2):
define void @transfer_RGBA8888_to_ARGB8888(i8** nocapture %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 3
%4 = load i8, i8* %3
%5 = load i8*, i8** %0
store i8 %4, i8* %5
%6 = load i8, i8* %1
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %8
%9 = getelementptr inbounds i8, i8* %1, i64 1
%10 = load i8, i8* %9
%11 = load i8*, i8** %0
%12 = getelementptr inbounds i8, i8* %11, i64 2
store i8 %10, i8* %12
%13 = getelementptr inbounds i8, i8* %1, i64 2
%14 = load i8, i8* %13
%15 = load i8*, i8** %0
%16 = getelementptr inbounds i8, i8* %15, i64 3
store i8 %14, i8* %16
%17 = load i8*, i8** %0
%18 = getelementptr inbounds i8, i8* %17, i64 4
store i8* %18, i8** %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FTS;

/* Variables and functions */
int /*<<< orphan*/ *fts_open(char **, int, int /*<<< orphan*/ *);
FTS *_fts_open(char *path, int opts) {
  char *npath[2] = {path, NULL};
  return fts_open(npath, opts, NULL);
}


x86 assembly (clang, -O0):
<_fts_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <fts_open@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fts_open>:
sub    $0x18,%rsp
mov    %rdi,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rdi
xor    %edx,%edx
call   1030 <fts_open@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32* @_fts_open(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [2 x i8*]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
store i8* %7, i8** %6
%8 = getelementptr inbounds i8*, i8** %6, i64 1
store i8* null, i8** %8
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
%10 = load i32, i32* %4
%11 = call i32* @fts_open(i8** %9, i32 %10, i32* null)
ret i32* %11
}

LLVM IR (-O2):
define i32* @_fts_open(i8* %0, i32 %1) {
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %3 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
store i8* %0, i8** %5
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 1
store i8* null, i8** %6
%7 = call i32* @fts_open(i8** %5, i32 %1, i32* null)
ret i32* %7
}
/* Variables and functions */
int /*<<< orphan*/ cgsynth(char *);
void cgsynand(void) { cgsynth("andl"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"andl\00"
define void @cgsynand() {
%1 = call i32 @cgsynth(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"andl\00"
define void @cgsynand() {
%1 = tail call i32 @cgsynth(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void g_completion_clear_items() {}


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

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

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

LLVM IR (-O2):
define void @g_completion_clear_items() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
void bar() {
  int i;
  int array[5];
  printf("%p\n", array);
  for (i = 0; i < 5; i++) {
    array[i] = i;
  }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rsi
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1152 <bar+0x42>
mov    -0x4(%rbp),%ecx
movslq -0x4(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <bar+0x1f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%p\0A\00"
define void @bar() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 0, i32* %1
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %1
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %11
store i32 %9, i32* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %5
16: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define void @bar() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_54(int /*<<< orphan*/);
int gen_54(void) {
  handle_54(0);
  return 0;
}


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

x86 assembly (clang, -O2):
<gen_54>:
push   %rax
xor    %edi,%edi
call   1030 <handle_54@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gen_54() {
%1 = call i32 @handle_54(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_54() {
%1 = tail call i32 @handle_54(i32 0)
ret i32 0
}
int test_imm_7Bint16_mem(short *val) {
  return ((*val) & (0x7B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_7Bint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 123
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}