xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int LOG_NDELAY;
int LOG_PERROR;
int LOG_PID;
int /*<<< orphan*/ openlog(char const *, int, int /*<<< orphan*/);
void open_log(const char *app_name) {
  openlog(app_name, LOG_NDELAY | LOG_PID | LOG_PERROR, LOG_DAEMON);
}


x86 assembly (clang, -O0):
<open_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    0x2ea0(%rip),%rax
or     (%rax),%esi
mov    0x2ea7(%rip),%rax
or     (%rax),%esi
mov    0x2ea6(%rip),%rax
mov    (%rax),%edx
call   1030 <openlog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_log>:
mov    0x2ea9(%rip),%rax
mov    0x2eb2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2eb7(%rip),%rax
or     (%rax),%esi
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
jmp    1030 <openlog@plt>

LLVM IR (-O0):
@LOG_NDELAY = global i32 0
@LOG_PID = global i32 0
@LOG_PERROR = global i32 0
@LOG_DAEMON = global i32 0
define void @open_log(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @LOG_NDELAY
%5 = load i32, i32* @LOG_PID
%6 = or i32 %4, %5
%7 = load i32, i32* @LOG_PERROR
%8 = or i32 %6, %7
%9 = load i32, i32* @LOG_DAEMON
%10 = call i32 @openlog(i8* %3, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@LOG_NDELAY = global i32 0
@LOG_PID = global i32 0
@LOG_PERROR = global i32 0
@LOG_DAEMON = global i32 0
define void @open_log(i8* %0) {
%2 = load i32, i32* @LOG_NDELAY
%3 = load i32, i32* @LOG_PID
%4 = or i32 %3, %2
%5 = load i32, i32* @LOG_PERROR
%6 = or i32 %4, %5
%7 = load i32, i32* @LOG_DAEMON
%8 = tail call i32 @openlog(i8* %0, i32 %6, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void nhr_response_log_unprocessed(const char *key, const char *value) {
  printf("\nWARNING: libnhr unprocessed \"%s\" : \"%s\".", key, value);
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"\0AWARNING: libnhr unprocessed \22%s\22 : \22%s\22.\00"
define void @nhr_response_log_unprocessed(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"\0AWARNING: libnhr unprocessed \22%s\22 : \22%s\22.\00"
define void @nhr_response_log_unprocessed(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
void ah(void) {}


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

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

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

LLVM IR (-O2):
define void @ah() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int puts(const char *string) {
  while (*string) {
    if (*string == '\n')
      putchar('\r');
    putchar(*string++);
  }
  return 0;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <puts+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1143 <puts+0x33>
mov    $0xd,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111c <puts+0xc>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    %rdi,%rbx
jmp    1139 <puts+0x29>
cs nopw 0x0(%rax,%rax,1)
mov    $0xd,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
cmp    $0xa,%al
je     1120 <puts+0x10>
test   %al,%al
jne    112d <puts+0x1d>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @puts(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = load i8, i8* %3
switch i8 %4, label %8 [
i8 0, label %12
i8 10, label %5
]
5: ; preds = %2
%6 = tail call i32 @putchar(i8 signext 13)
%7 = load i8, i8* %3
br label %8
8: ; preds = %2, %5
%9 = phi i8 [ %4, %2 ], [ %7, %5 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
%11 = tail call i32 @putchar(i8 signext %9)
br label %2
12: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print_side_usage() {
  printf("\n"
         "\n usage: side in-file-1 in-file-2 "
         "out-file method"
         "\n        where method is Top-to-bottom "
         "or Side-by-side"
         "\n");
  return (1);
}


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

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

LLVM IR (-O0):
@.str = [106 x i8] c"\0A\0A usage: side in-file-1 in-file-2 out-file method\0A where method is Top-to-bottom or Side-by-side\0A\00"
define i32 @print_side_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [105 x i8] c"\0A\0A usage: side in-file-1 in-file-2 out-file method\0A where method is Top-to-bottom or Side-by-side\00"
define i32 @print_side_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @str, i64 0, i64 0))
ret i32 1
}
int _get_str_length(char *str) {
  int length = 0;
  while (str[length]) {
    length++;
  }
  return length;
}


x86 assembly (clang, -O0):
<_get_str_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     112f <_get_str_length+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <_get_str_length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_str_length>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <_get_str_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @_get_str_length(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
struct state {
  int dummy;
};

/* Variables and functions */
int ya_random();
int c_tweak(struct state *st, int base, int tweak) {
  int ranTweak = (ya_random() % (2 * tweak));
  int n = (base + (ranTweak - tweak));
  if (n < 0)
    n = -n;
  return (n < 255 ? n : 255);
}


x86 assembly (clang, -O0):
<c_tweak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <ya_random@plt>
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1155 <c_tweak+0x45>
xor    %eax,%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0xff,-0x18(%rbp)
jge    116d <c_tweak+0x5d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    117a <c_tweak+0x6a>
mov    $0xff,%eax
mov    %eax,-0x1c(%rbp)
jmp    117a <c_tweak+0x6a>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_tweak>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
xor    %eax,%eax
call   1030 <ya_random@plt>
lea    (%rbx,%rbx,1),%ecx
cltd
idiv   %ecx
sub    %ebx,%ebp
add    %edx,%ebp
mov    %ebp,%ecx
neg    %ecx
cmovs  %ebp,%ecx
cmp    $0xff,%ecx
mov    $0xff,%eax
cmovb  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.state = type { i32 }
define i32 @c_tweak(%struct.state* %0, i32 %1, i32 %2) {
%4 = alloca %struct.state*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.state* %0, %struct.state** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = call i32 (...) @ya_random()
%10 = load i32, i32* %6
%11 = mul nsw i32 2, %10
%12 = srem i32 %9, %11
store i32 %12, i32* %7
%13 = load i32, i32* %5
%14 = load i32, i32* %7
%15 = load i32, i32* %6
%16 = sub nsw i32 %14, %15
%17 = add nsw i32 %13, %16
store i32 %17, i32* %8
%18 = load i32, i32* %8
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %3
%21 = load i32, i32* %8
%22 = sub nsw i32 0, %21
store i32 %22, i32* %8
br label %23
23: ; preds = %20, %3
%24 = load i32, i32* %8
%25 = icmp slt i32 %24, 255
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = load i32, i32* %8
br label %29
28: ; preds = %23
br label %29
29: ; preds = %28, %26
%30 = phi i32 [ %27, %26 ], [ 255, %28 ]
ret i32 %30
}

LLVM IR (-O2):
%struct.state = type { i32 }
define i32 @c_tweak(%struct.state* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @ya_random()
%5 = shl nsw i32 %2, 1
%6 = srem i32 %4, %5
%7 = sub i32 %1, %2
%8 = add i32 %7, %6
%9 = tail call i32 @llvm.abs.i32(i32 %8, i1 true)
%10 = icmp ult i32 %9, 255
%11 = select i1 %10, i32 %9, i32 255
ret i32 %11
}
/* Variables and functions */
int R(int /*<<< orphan*/);
int /*<<< orphan*/ cudaPeekAtLastError();
int PeekAtLastError(void) { return R(cudaPeekAtLastError()); }


x86 assembly (clang, -O0):
<PeekAtLastError>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <cudaPeekAtLastError@plt>
mov    %eax,%edi
call   1030 <R@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PeekAtLastError>:
push   %rax
xor    %eax,%eax
call   1040 <cudaPeekAtLastError@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <R@plt>

LLVM IR (-O0):
define i32 @PeekAtLastError() {
%1 = call i32 (...) @cudaPeekAtLastError()
%2 = call i32 @R(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @PeekAtLastError() {
%1 = tail call i32 (...) @cudaPeekAtLastError()
%2 = tail call i32 @R(i32 %1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ sflap_send(char *, int, int);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void serv_set_idle(int time) {
  char buf[256];
  snprintf(buf, sizeof(buf), "toc_set_idle %d", time);
  sflap_send(buf, -1, 2);
}


x86 assembly (clang, -O0):
<serv_set_idle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x100,%esi
lea    0xebc(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x110(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1040 <sflap_send@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serv_set_idle>:
push   %rbx
sub    $0x100,%rsp
mov    %edi,%ecx
lea    0xecf(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1040 <sflap_send@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"toc_set_idle %d\00"
define void @serv_set_idle(i32 %0) {
%2 = alloca i32
%3 = alloca [256 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @snprintf(i8* %4, i32 256, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i32 @sflap_send(i8* %7, i32 -1, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"toc_set_idle %d\00"
define void @serv_set_idle(i32 %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 256, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @sflap_send(i8* %3, i32 -1, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x48() {
  Assert_real((isalnum(72)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              365, ("isalnum should be 1 for H"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x48>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x16d,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x48>:
push   %rax
mov    $0x48,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x16d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for H\00"
define void @t_isalnum_0x48() {
%1 = call i32 @isalnum(i32 72)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 365, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for H\00"
define void @t_isalnum_0x48() {
%1 = tail call i32 @isalnum(i32 72)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 365, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RTFileFlush(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileFlush() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EPOLL_CTL_DEL;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ epoll_ctl(int, int /*<<< orphan*/, int, int /*<<< orphan*/);
void close_conn(int epoll_fd, int sockfd) {
  epoll_ctl(epoll_fd, EPOLL_CTL_DEL, sockfd, 0);
  close(sockfd);
}


x86 assembly (clang, -O0):
<close_conn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
xor    %ecx,%ecx
call   1040 <epoll_ctl@plt>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_conn>:
push   %rbx
mov    %esi,%ebx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edx
xor    %ecx,%ecx
call   1040 <epoll_ctl@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

LLVM IR (-O0):
@EPOLL_CTL_DEL = global i32 0
define void @close_conn(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @EPOLL_CTL_DEL
%7 = load i32, i32* %4
%8 = call i32 @epoll_ctl(i32 %5, i32 %6, i32 %7, i32 0)
%9 = load i32, i32* %4
%10 = call i32 @close(i32 %9)
ret void
}

LLVM IR (-O2):
@EPOLL_CTL_DEL = global i32 0
define void @close_conn(i32 %0, i32 %1) {
%3 = load i32, i32* @EPOLL_CTL_DEL
%4 = tail call i32 @epoll_ctl(i32 %0, i32 %3, i32 %1, i32 0)
%5 = tail call i32 @close(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_loadiwkey(unsigned int, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int /*<<< orphan*/);
void test_loadiwkey(unsigned int ctl, __m128i intkey, __m128i enkey_lo,
                    __m128i enkey_hi) {
  _mm_loadiwkey(ctl, intkey, enkey_lo, enkey_hi);
}


x86 assembly (clang, -O0):
<test_loadiwkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <_mm_loadiwkey@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_loadiwkey>:
jmp    1030 <_mm_loadiwkey@plt>

LLVM IR (-O0):
define void @test_loadiwkey(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @_mm_loadiwkey(i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @test_loadiwkey(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @_mm_loadiwkey(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
int tls13_server_certificate_request_send(struct tls13_ctx *ctx) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.tls13_ctx = type opaque
define i32 @tls13_server_certificate_request_send(%struct.tls13_ctx* nocapture readnone %0) {
ret i32 1
}
short creal_fun_complexOf_short(unsigned a) { return a >> 16; }


x86 assembly (clang, -O0):
<creal_fun_complexOf_short>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<creal_fun_complexOf_short>:
mov    %edi,%eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define signext i16 @creal_fun_complexOf_short(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 16
%5 = trunc i32 %4 to i16
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @creal_fun_complexOf_short(i32 %0) {
%2 = lshr i32 %0, 16
%3 = trunc i32 %2 to i16
ret i16 %3
}
int main() {
  int a = 5;
  a = ~a;
  return a + 6;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x6,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 6
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int pow(float, int);
float f(float x) { return (1 / (1 + pow(x, 2))); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x2,%edi
call   1030 <pow@plt>
lea    0x1(%rax),%ecx
add    $0x2,%eax
xor    %edx,%edx
cmp    $0x3,%eax
cmovb  %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @pow(float %3, i32 2)
%5 = add nsw i32 1, %4
%6 = sdiv i32 1, %5
%7 = sitofp i32 %6 to float
ret float %7
}

LLVM IR (-O2):
define float @f(float %0) {
%2 = tail call i32 @pow(float %0, i32 2)
%3 = add nsw i32 %2, 1
%4 = add i32 %2, 2
%5 = icmp ult i32 %4, 3
%6 = select i1 %5, i32 %3, i32 0
%7 = sitofp i32 %6 to float
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void ivory_serialize_pack_prim_2_le(uint8_t *dst, const uint8_t *src) {
  dst[0] = src[0];
  dst[1] = src[1];
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_prim_2_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_prim_2_le>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_prim_2_le(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_prim_2_le(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__10__IO__makeOutput();
void HplAtm128SpiP__MOSI__makeOutput(void) {
  HplAtm128GeneralIOPinP__10__IO__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @HplAtm128SpiP__MOSI__makeOutput() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__10__IO__makeOutput()
ret void
}
/* Variables and functions */
int isinf(double);
int math___Float_native_is_inf___impl(double self) { return isinf(self); }


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

x86 assembly (clang, -O2):
<math___Float_native_is_inf___impl>:
jmp    1030 <isinf@plt>

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

LLVM IR (-O2):
define i32 @math___Float_native_is_inf___impl(double %0) {
%2 = tail call i32 @isinf(double %0)
ret i32 %2
}
int cairo_code_draw_casALabel_get_height() { return 10; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casALabel_get_height() {
ret i32 10
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casALabel_get_height() {
ret i32 10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct stat {
  scalar_t__ st_size;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int /*<<< orphan*/ fstat(int /*<<< orphan*/, struct stat *);
uint32_t file_size(FILE *f) {
  struct stat info;
  if (!fstat(fileno(f), &info))
    return ((uint32_t)info.st_size);
  else
    return (0);
}


x86 assembly (clang, -O0):
<file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fileno@plt>
mov    %eax,%edi
lea    -0x18(%rbp),%rsi
call   1040 <fstat@plt>
cmp    $0x0,%eax
jne    1155 <file_size+0x35>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    115c <file_size+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size>:
push   %rax
call   1030 <fileno@plt>
mov    %rsp,%rsi
mov    %eax,%edi
call   1040 <fstat@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
jne    113b <file_size+0x1b>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i32 @file_size(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca %struct.stat
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @fileno(i32* %5)
%7 = call i32 @fstat(i32 %6, %struct.stat* %4)
%8 = icmp ne i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i32 @file_size(i32* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = tail call i32 @fileno(i32* %0)
%5 = call i32 @fstat(i32 %4, %struct.stat* %2)
%6 = icmp eq i32 %5, 0
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = select i1 %6, i32 %9, i32 0
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void check(int b, const char *msg) {
  if (!b) {
    fprintf(stderr, "error: %s\n\n", msg);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    115c <check+0x3c>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
test   %edi,%edi
je     1125 <check+0x5>
ret
push   %rax
mov    %rsi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"error: %s\0A\0A\00"
define void @check(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"error: %s\0A\0A\00"
define void @check(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int *, int /*<<< orphan*/);
void f6d(int *p) {
  bar(p, 0);
  if (!p) {
    int *q = 0;
    *q = 0xDEADBEEF;
  }
}


x86 assembly (clang, -O0):
<f6d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <bar@plt>
cmpq   $0x0,-0x8(%rbp)
jne    1144 <f6d+0x34>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xdeadbeef,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f6d(i32* %0) {
%2 = tail call i32 @bar(i32* %0, i32 0)
%3 = icmp ne i32* %0, null
tail call void @llvm.assume(i1 %3)
ret void
}
double rul(unsigned long a, double secs) { return (double)a / secs; }


x86 assembly (clang, -O0):
<rul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movaps 0xeec(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xeeb(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rul>:
movq   %rdi,%xmm2
punpckldq 0xef3(%rip),%xmm2
subpd  0xefb(%rip),%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @rul(i64 %0, double %1) {
%3 = alloca i64
%4 = alloca double
store i64 %0, i64* %3
store double %1, double* %4
%5 = load i64, i64* %3
%6 = uitofp i64 %5 to double
%7 = load double, double* %4
%8 = fdiv double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @rul(i64 %0, double %1) {
%3 = uitofp i64 %0 to double
%4 = fdiv double %3, %1
ret double %4
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *get_extension(const char *filename) {
  const char *ext;
  ext = strrchr(filename, '.');
  if (ext)
    return ext + 1;
  return NULL;
}


x86 assembly (clang, -O0):
<get_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114a <get_extension+0x3a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <get_extension+0x42>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_extension>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @get_extension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
/* Variables and functions */
int recv(int, void *, int, int);
int g_tcp_recv(int sck, void *ptr, int len, int flags) {
  return recv(sck, ptr, len, flags);
}


x86 assembly (clang, -O0):
<g_tcp_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_tcp_recv>:
jmp    1030 <recv@plt>

LLVM IR (-O0):
define i32 @g_tcp_recv(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @recv(i32 %9, i8* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @g_tcp_recv(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @recv(i32 %0, i8* %1, i32 %2, i32 %3)
ret i32 %5
}
int writeblanks(start, end)
char *start;
char *end;
{
  char *p;
  for (p = start; p < end; p++)
    *p = ' ';
  return 0;
}


x86 assembly (clang, -O0):
<writeblanks>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    113a <writeblanks+0x3a>
mov    -0x18(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <writeblanks+0x14>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeblanks>:
cmp    %rsi,%rdi
jae    112a <writeblanks+0x1a>
push   %rax
mov    %rsi,%rdx
sub    %rdi,%rdx
mov    $0x20,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @writeblanks(i8* writeonly %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
br label %8
8: ; preds = %4, %2
ret i32 0
}
int getdents(int fd, struct linux_dirent *de, int len) {
  int r;
  __asm__ __volatile__("\tint $0x80\n"
                       : "=a"(r)
                       : "a"(141), "b"(fd), "c"(de), "d"(len)
                       : "memory");
  return r;
}


x86 assembly (clang, -O0):
<getdents>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0xc(%rbp),%ebx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%edx
mov    $0x8d,%eax
int    $0x80
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdents>:
push   %rbx
mov    %rsi,%rcx
mov    %edi,%ebx
mov    $0x8d,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
%struct.linux_dirent = type opaque
define i32 @getdents(i32 %0, %struct.linux_dirent* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.linux_dirent*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store %struct.linux_dirent* %1, %struct.linux_dirent** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load %struct.linux_dirent*, %struct.linux_dirent** %5
%10 = load i32, i32* %6
%11 = call i32 asm sideeffect "\09int $$0x80\0A", "={ax},{ax},{bx},{cx},{dx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 141, i32 %8, %struct.linux_dirent* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
%struct.linux_dirent = type opaque
define i32 @getdents(i32 %0, %struct.linux_dirent* %1, i32 %2) {
%4 = tail call i32 asm sideeffect "\09int $$0x80\0A", "={ax},{ax},{bx},{cx},{dx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 141, i32 %0, %struct.linux_dirent* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ printf(char *, ...);
void trace_glPopMatrix(void) {
  printf("%20s(", "glPopMatrix");
  printf(");\n");
  glPopMatrix();
}


x86 assembly (clang, -O0):
<trace_glPopMatrix>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_glPopMatrix>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glPopMatrix@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%20s(\00"
@.str.1 = [12 x i8] c"glPopMatrix\00"
@.str.2 = [4 x i8] c");\0A\00"
define void @trace_glPopMatrix() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%20s(\00"
@.str.1 = [12 x i8] c"glPopMatrix\00"
@str = [3 x i8] c");\00"
define void @trace_glPopMatrix() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @glPopMatrix()
ret void
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
void bitmap_toggle(uint32_t *bitmap, unsigned nr) {
  unsigned i = ((nr) / (32U));
  uint32_t mask = (1U << ((nr) % 32U));
  bitmap[i] ^= mask;
}


x86 assembly (clang, -O0):
<bitmap_toggle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
xor    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_toggle>:
mov    %esi,%ecx
mov    %esi,%eax
mov    $0x1,%edx
shl    %cl,%edx
shr    $0x5,%eax
xor    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @bitmap_toggle(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = udiv i32 %7, 32
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = urem i32 %9, 32
%11 = shl i32 1, %10
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = xor i32 %17, %12
store i32 %18, i32* %16
ret void
}

LLVM IR (-O2):
define void @bitmap_toggle(i32* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 5
%4 = and i32 %1, 31
%5 = shl nuw i32 1, %4
%6 = zext i32 %3 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = xor i32 %8, %5
store i32 %9, i32* %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ stdin;
int main() {
  char buffer[489];
  int g;
  g = 0;
  scanf(buffer, stdin, sizeof(buffer));
  if (g) {
    printf("Your first trainning is complete operative.\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1f4(%rbp)
lea    -0x1f0(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
mov    $0x1e9,%edx
call   1040 <scanf@plt>
cmpl   $0x0,-0x1f4(%rbp)
je     116f <main+0x4f>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1f8,%rsp
mov    0x2eca(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdi
mov    $0x1e9,%edx
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x1f8,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [45 x i8] c"Your first trainning is complete operative.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [489 x i8]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = getelementptr inbounds [489 x i8], [489 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @scanf(i8* %4, i32 %5, i32 489)
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [489 x i8]
%2 = getelementptr inbounds [489 x i8], [489 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @scanf(i8* %2, i32 %3, i32 489)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
void zero_out(int arr[], int size) { memset(arr, 0, size * sizeof(int)); }


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

x86 assembly (clang, -O2):
<zero_out>:
lea    0x0(,%rsi,4),%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @zero_out(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 4
%9 = trunc i64 %8 to i32
%10 = call i32 @memset(i32* %5, i32 0, i32 %9)
ret void
}

LLVM IR (-O2):
define void @zero_out(i32* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32 @memset(i32* %0, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_shm(int /*<<< orphan*/);
int /*<<< orphan*/ getenv(char *);
void m_exit(void) { cleanup_shm(getenv("PINTHREADS_SHMID")); }


x86 assembly (clang, -O0):
<m_exit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%edi
call   1040 <cleanup_shm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_exit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <cleanup_shm@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"PINTHREADS_SHMID\00"
define void @m_exit() {
%1 = call i32 @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @cleanup_shm(i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"PINTHREADS_SHMID\00"
define void @m_exit() {
%1 = tail call i32 @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @cleanup_shm(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PathPlannerSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void PathPlannerSettingsRequestUpdate() {
  UAVObjRequestUpdate(PathPlannerSettingsHandle());
}


x86 assembly (clang, -O0):
<PathPlannerSettingsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PathPlannerSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PathPlannerSettingsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <PathPlannerSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @PathPlannerSettingsRequestUpdate() {
%1 = call i32 (...) @PathPlannerSettingsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @PathPlannerSettingsRequestUpdate() {
%1 = tail call i32 (...) @PathPlannerSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Type definitions */
struct zint_symbol {
  int dummy;
};

/* Variables and functions */
int eanx_cc(struct zint_symbol *, unsigned char *, int, int /*<<< orphan*/);
__attribute__((visibility("hidden"))) int
eanx(struct zint_symbol *symbol, unsigned char source[], int src_len) {
  return eanx_cc(symbol, source, src_len, 0);
}


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

x86 assembly (clang, -O2):
<eanx>:
xor    %ecx,%ecx
jmp    1030 <eanx_cc@plt>

LLVM IR (-O0):
%struct.zint_symbol = type { i32 }
define hidden i32 @eanx(%struct.zint_symbol* %0, i8* %1, i32 %2) {
%4 = alloca %struct.zint_symbol*
%5 = alloca i8*
%6 = alloca i32
store %struct.zint_symbol* %0, %struct.zint_symbol** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.zint_symbol*, %struct.zint_symbol** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @eanx_cc(%struct.zint_symbol* %7, i8* %8, i32 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.zint_symbol = type { i32 }
define hidden i32 @eanx(%struct.zint_symbol* %0, i8* %1, i32 %2) {
%4 = tail call i32 @eanx_cc(%struct.zint_symbol* %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}