xunge/DecIR huggingface dataset:
/* Variables and functions */
int fabs(double);
int ShareIsZero(double x) {
  if (fabs(x) <= 1e-20)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<ShareIsZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xecd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1149 <ShareIsZero+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1150 <ShareIsZero+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShareIsZero>:
push   %rax
call   1030 <fabs@plt>
xor    %ecx,%ecx
test   %eax,%eax
setle  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ShareIsZero(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call i32 @fabs(double %4)
%6 = sitofp i32 %5 to double
%7 = fcmp ole double %6, 0x3BC79CA10C924223
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @ShareIsZero(double %0) {
%2 = tail call i32 @fabs(double %0)
%3 = icmp slt i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct lconv {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(char *);
void Ada_delete_lconv(void *jarg1) {
  struct lconv *arg1 = (struct lconv *)0;
  arg1 = (struct lconv *)jarg1;
  free((char *)arg1);
}


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

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

LLVM IR (-O0):
%struct.lconv = type { i32 }
define void @Ada_delete_lconv(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.lconv*
store i8* %0, i8** %2
store %struct.lconv* null, %struct.lconv** %3
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.lconv*
store %struct.lconv* %5, %struct.lconv** %3
%6 = load %struct.lconv*, %struct.lconv** %3
%7 = bitcast %struct.lconv* %6 to i8*
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
%struct.lconv = type { i32 }
define void @Ada_delete_lconv(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int test_imm_57int16_mem(short *val) {
  return ((*val) & (-0x57 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_57int16_mem>:
movzwl (%rdi),%eax
test   $0xffa9,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_57int16_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, -87
%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_57int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -87
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void pray_faith(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 150)) {
    add_status(target, 15);
  }
}


x86 assembly (clang, -O0):
<pray_faith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x96,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <pray_faith+0x50>
mov    -0x10(%rbp),%rdi
mov    $0xf,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pray_faith>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x96,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <pray_faith+0x41>
mov    %r14,%rdi
mov    $0xf,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @pray_faith(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 150)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 15)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @pray_faith(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 150)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 15)
br label %8
8: ; preds = %6, %2
ret void
}
/* Type definitions */
struct char_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_look(struct char_data *, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void do_read(struct char_data *ch, char *argument, int cmd) {
  char buf[100];
  sprintf(buf, "at %s", argument);
  do_look(ch, buf, 15);
}


x86 assembly (clang, -O0):
<do_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xebb(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0xf,%edx
call   1040 <do_look@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_read>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xecc(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xf,%edx
call   1040 <do_look@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.char_data = type { i32 }
@.str = [6 x i8] c"at %s\00"
define void @do_read(%struct.char_data* %0, i8* %1, i32 %2) {
%4 = alloca %struct.char_data*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [100 x i8]
store %struct.char_data* %0, %struct.char_data** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load %struct.char_data*, %struct.char_data** %4
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%13 = call i32 @do_look(%struct.char_data* %11, i8* %12, i32 15)
ret void
}

LLVM IR (-O2):
%struct.char_data = type { i32 }
@.str = [6 x i8] c"at %s\00"
define void @do_read(%struct.char_data* %0, i8* %1, i32 %2) {
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = call i32 @do_look(%struct.char_data* %0, i8* %5, i32 15)
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
int isBlankStr(char *s) {
  char *cp = s - 1;
  while (*++cp && isspace(*cp))
    ;
  return *cp == '\0';
}


x86 assembly (clang, -O0):
<isBlankStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     115f <isBlankStr+0x4f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    116f <isBlankStr+0x5f>
jmp    1174 <isBlankStr+0x64>
jmp    1128 <isBlankStr+0x18>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBlankStr>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     1143 <isBlankStr+0x33>
movsbl %al,%edi
call   1030 <isspace@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <isBlankStr+0x10>
xor    %eax,%eax
cmpb   $0x0,-0x1(%rbx)
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isBlankStr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 -1
store i8* %5, i8** %3
br label %6
6: ; preds = %19, %1
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %6
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = call i64 @isspace(i8 signext %14)
%16 = icmp ne i64 %15, 0
br label %17
17: ; preds = %12, %6
%18 = phi i1 [ false, %6 ], [ %16, %12 ]
br i1 %18, label %19, label %20
19: ; preds = %17
br label %6
20: ; preds = %17
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @isBlankStr(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -1
br label %3
3: ; preds = %8, %1
%4 = phi i8* [ %2, %1 ], [ %5, %8 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %3
%9 = tail call i64 @isspace(i8 signext %6)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %8
%12 = load i8, i8* %5
%13 = icmp eq i8 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %3, %11
%16 = phi i32 [ %14, %11 ], [ 1, %3 ]
ret i32 %16
}
int match_by_value(int pos, void *value, void *user_data) {
  return value == user_data;
}


x86 assembly (clang, -O0):
<match_by_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @match_by_value(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = icmp eq i8* %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @match_by_value(i32 %0, i8* readnone %1, i8* readnone %2) {
%4 = icmp eq i8* %1, %2
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int getsockname(int sockfd, struct sockaddr *addr, unsigned int *addrlen) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<getsockname>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb9(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @getsockname(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @getsockname(i32 %0, %struct.sockaddr* nocapture readnone %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
int valid_reg_digit(char digit_char) {
  if (digit_char < '0' || digit_char > '7')
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<valid_reg_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <valid_reg_digit+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x37,%eax
jle    1130 <valid_reg_digit+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1137 <valid_reg_digit+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_reg_digit>:
and    $0xf8,%dil
xor    %eax,%eax
cmp    $0x30,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @valid_reg_digit(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 48
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 55
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 0, i32* %2
br label %13
12: ; preds = %7
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @valid_reg_digit(i8 signext %0) {
%2 = and i8 %0, -8
%3 = icmp eq i8 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ kill(int, int /*<<< orphan*/);
int main() {
  kill(1, SIGKILL);
  return 0;
}


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

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

LLVM IR (-O0):
@SIGKILL = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGKILL
%3 = call i32 @kill(i32 1, i32 %2)
ret i32 0
}

LLVM IR (-O2):
@SIGKILL = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGKILL
%2 = tail call i32 @kill(i32 1, i32 %1)
ret i32 0
}
int comparator(const void *a, const void *b) {
  return *((int *)b) - *((int *)a);
}


x86 assembly (clang, -O0):
<comparator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparator>:
mov    (%rsi),%eax
sub    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @comparator(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int dgtpicom_end_text() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dgtpicom_end_text() {
ret i32 0
}
char *strcat(char *dst, const char *src) {
  char *r = dst;
  while (*dst++)
    ;
  dst--;
  while (*src)
    *dst++ = *src++;
  *dst = '\0';
  return r;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1131 <strcat+0x31>
jmp    1114 <strcat+0x14>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1171 <strcat+0x71>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    113d <strcat+0x3d>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
mov    %rcx,%rdi
add    $0x1,%rcx
cmpb   $0x0,(%rdi)
jne    1110 <strcat+0x10>
mov    (%rsi),%dl
test   %dl,%dl
je     1146 <strcat+0x46>
mov    $0xffffffffffffffff,%rdi
nopl   0x0(%rax)
mov    %dl,(%rcx,%rdi,1)
movzbl 0x2(%rsi,%rdi,1),%edx
add    $0x1,%rdi
test   %dl,%dl
jne    1130 <strcat+0x30>
add    %rdi,%rcx
mov    %rcx,%rdi
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define i8* @strcat(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 = %12, %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %3
br label %16
16: ; preds = %20, %13
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = icmp ne i8 %18, 0
br i1 %19, label %20, label %26
20: ; preds = %16
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
%23 = load i8, i8* %21
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %3
store i8 %23, i8* %24
br label %16
26: ; preds = %16
%27 = load i8*, i8** %3
store i8 0, i8* %27
%28 = load i8*, i8** %5
ret i8* %28
}

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
%10 = icmp eq i8 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %8, %11
%12 = phi i8 [ %17, %11 ], [ %9, %8 ]
%13 = phi i8* [ %16, %11 ], [ %4, %8 ]
%14 = phi i8* [ %15, %11 ], [ %1, %8 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %13
%17 = load i8, i8* %15
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %11
19: ; preds = %11, %8
%20 = phi i8* [ %4, %8 ], [ %16, %11 ]
store i8 0, i8* %20
ret i8* %0
}
int tempnam(char *directory, char *prefix) {}


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

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

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

LLVM IR (-O2):
define i32 @tempnam(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
long privateCFunc() { return 123; }


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

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

LLVM IR (-O0):
define i64 @privateCFunc() {
ret i64 123
}

LLVM IR (-O2):
define i64 @privateCFunc() {
ret i64 123
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void thread_wakeup() { exit(1); }


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

x86 assembly (clang, -O2):
<thread_wakeup>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @thread_wakeup() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @thread_wakeup() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ testBitmap();
int /*<<< orphan*/ testDiskFormat();
int /*<<< orphan*/ testSizes();
void runDiskTest() {
  testBitmap();
  testSizes();
  testDiskFormat();
}


x86 assembly (clang, -O0):
<runDiskTest>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <testBitmap@plt>
mov    $0x0,%al
call   1030 <testSizes@plt>
mov    $0x0,%al
call   1040 <testDiskFormat@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<runDiskTest>:
push   %rax
xor    %eax,%eax
call   1050 <testBitmap@plt>
xor    %eax,%eax
call   1030 <testSizes@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <testDiskFormat@plt>

LLVM IR (-O0):
define void @runDiskTest() {
%1 = call i32 (...) @testBitmap()
%2 = call i32 (...) @testSizes()
%3 = call i32 (...) @testDiskFormat()
ret void
}

LLVM IR (-O2):
define void @runDiskTest() {
%1 = tail call i32 (...) @testBitmap()
%2 = tail call i32 (...) @testSizes()
%3 = tail call i32 (...) @testDiskFormat()
ret void
}
void gtk_text_buffer_apply_tag_by_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_apply_tag_by_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void GotoXy(int x, int y) { printf("\033[%d;%dH", y, x); }


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

x86 assembly (clang, -O2):
<GotoXy>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @GotoXy(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 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @GotoXy(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ error;
};
typedef TYPE_1__ ERR_STRING_DATA;

/* Variables and functions */
int err_cmp(const void *a_void, const void *b_void) {
  return ((int)(((const ERR_STRING_DATA *)a_void)->error -
                ((const ERR_STRING_DATA *)b_void)->error));
}


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

x86 assembly (clang, -O2):
<err_cmp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @err_cmp(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 = bitcast i8* %5 to %struct.TYPE_2__*
%7 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to %struct.TYPE_2__*
%11 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %10, i32 0, i32 0
%12 = load i64, i64* %11
%13 = sub nsw i64 %8, %12
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @err_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
void myadd(float *sum, float *addend) { *sum = *sum + *addend; }


x86 assembly (clang, -O0):
<myadd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<myadd>:
movss  (%rdi),%xmm0
addss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @myadd(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fadd float %6, %8
%10 = load float*, float** %3
store float %9, float* %10
ret void
}

LLVM IR (-O2):
define void @myadd(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fadd float %3, %4
store float %5, float* %0
ret void
}
/* Variables and functions */
float getMinFloat(void *context, size_t i) { return 0.0f; }


x86 assembly (clang, -O0):
<getMinFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMinFloat>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @getMinFloat(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @getMinFloat(i8* nocapture readnone %0, i64 %1) {
ret float 0.000000e+00
}
int anyof(s1, s2)
register char *s1, *s2;
{
  register int c;
  while ((c = *s1++))
    if (any(c, s2))
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<anyof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1166 <anyof+0x56>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <any@plt>
cmp    $0x0,%eax
je     1161 <anyof+0x51>
movl   $0x1,-0x4(%rbp)
jmp    116d <anyof+0x5d>
jmp    1120 <anyof+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<anyof>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %r14d,%r14d
nopl   (%rax)
movsbl 0x0(%rbp),%edi
test   %edi,%edi
je     1140 <anyof+0x30>
add    $0x1,%rbp
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <any@plt>
test   %eax,%eax
je     1120 <anyof+0x10>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @anyof(i8* nocapture %0, i8* %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %0, %2 ], [ %9, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @any to i32 (i32, i8*, ...)*)(i32 %8, i8* %1)
%11 = icmp eq i32 %10, 0
br i1 %11, label %3, label %12
12: ; preds = %3, %7
%13 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %13
}
/* Type definitions */
typedef int wchar_t;
struct _Locale_numeric {
  int dummy;
};

/* Variables and functions */
wchar_t _WLocale_decimal_point(struct _Locale_numeric *lnum) { return L'.'; }


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

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

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

LLVM IR (-O2):
%struct._Locale_numeric = type { i32 }
define i32 @_WLocale_decimal_point(%struct._Locale_numeric* nocapture readnone %0) {
ret i32 46
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ print_stacktrace();
int /*<<< orphan*/ stderr;
void sighandle_sigfpe(int signo) {
  fprintf(stderr, "Floating point error in child:\n");
  print_stacktrace();
}


x86 assembly (clang, -O0):
<sighandle_sigfpe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <print_stacktrace@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Floating point error in child:\0A\00"
define void @sighandle_sigfpe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @print_stacktrace()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Floating point error in child:\0A\00"
define void @sighandle_sigfpe(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @print_stacktrace()
ret void
}
/* Type definitions */
typedef scalar_t__ timer_t;

/* Variables and functions */
int compare(const void *key, const void *amemb) {
  if (*(timer_t *)key == *(timer_t *)amemb) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jne    112c <compare+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1133 <compare+0x33>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp ne i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
bool is_little_endian() {
  long int i = 1;
  const char *p = (const char *)&i;
  return (p[0] == 1);
}


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

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

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

LLVM IR (-O2):
define i32 @is_little_endian() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ outb(short, int);
void serial_reset(short combase) {
  outb(combase + 1, 0x00);
  outb(combase + 2, 0x07);
  outb(combase + 4, 0x00);
  outb(combase + 4, 0x0B);
}


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

x86 assembly (clang, -O2):
<serial_reset>:
push   %rbx
mov    %edi,%ebx
lea    0x1(%rbx),%eax
movswl %ax,%edi
xor    %esi,%esi
call   1030 <outb@plt>
lea    0x2(%rbx),%eax
movswl %ax,%edi
mov    $0x7,%esi
call   1030 <outb@plt>
add    $0x4,%ebx
movswl %bx,%ebx
mov    %ebx,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    %ebx,%edi
mov    $0xb,%esi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @serial_reset(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = add nsw i32 %4, 1
%6 = trunc i32 %5 to i16
%7 = call i32 @outb(i16 signext %6, i32 0)
%8 = load i16, i16* %2
%9 = sext i16 %8 to i32
%10 = add nsw i32 %9, 2
%11 = trunc i32 %10 to i16
%12 = call i32 @outb(i16 signext %11, i32 7)
%13 = load i16, i16* %2
%14 = sext i16 %13 to i32
%15 = add nsw i32 %14, 4
%16 = trunc i32 %15 to i16
%17 = call i32 @outb(i16 signext %16, i32 0)
%18 = load i16, i16* %2
%19 = sext i16 %18 to i32
%20 = add nsw i32 %19, 4
%21 = trunc i32 %20 to i16
%22 = call i32 @outb(i16 signext %21, i32 11)
ret void
}

LLVM IR (-O2):
define void @serial_reset(i16 signext %0) {
%2 = add i16 %0, 1
%3 = tail call i32 @outb(i16 signext %2, i32 0)
%4 = add i16 %0, 2
%5 = tail call i32 @outb(i16 signext %4, i32 7)
%6 = add i16 %0, 4
%7 = tail call i32 @outb(i16 signext %6, i32 0)
%8 = tail call i32 @outb(i16 signext %6, i32 11)
ret void
}
void global_term() {}


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

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

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

LLVM IR (-O2):
define void @global_term() {
ret void
}
/* Variables and functions */
int png_apply_filter(unsigned char *, unsigned char *, unsigned int, int, int);
int png_apply_filter_8(unsigned char *dest, unsigned char *src, unsigned width,
                       int y) {
  return png_apply_filter(dest, src, width, y, 8);
}


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

x86 assembly (clang, -O2):
<png_apply_filter_8>:
mov    $0x8,%r8d
jmp    1030 <png_apply_filter@plt>

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

LLVM IR (-O2):
define i32 @png_apply_filter_8(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @png_apply_filter(i8* %0, i8* %1, i32 %2, i32 %3, i32 8)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ bar(int *);
void foo(int a) {
  int var[a] __attribute__((__aligned__(16)));
  bar(var);
  return;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
call   1030 <bar@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,%eax
mov    %rsp,%rdi
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
call   1030 <bar@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i32, i64 %6
store i64 %6, i64* %4
%9 = call i32 @bar(i32* %8)
%10 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = zext i32 %0 to i64
%3 = alloca i32, i64 %2
%4 = call i32 @bar(i32* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int lvfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int lvprintf(const char *format, va_list ap) {
  return lvfprintf(stdout, format, ap);
}


x86 assembly (clang, -O0):
<lvprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <lvfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lvprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <lvfprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define i32 @lvprintf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @lvfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int wattr_on(int /*<<< orphan*/ *, int /*<<< orphan*/, void *);
int __darwin_wattr_on(WINDOW *w, uint32_t a, void *p) {
  return wattr_on(w, a, p);
}


x86 assembly (clang, -O0):
<__darwin_wattr_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <wattr_on@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__darwin_wattr_on>:
jmp    1030 <wattr_on@plt>

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

LLVM IR (-O2):
define i32 @__darwin_wattr_on(i32* %0, i32 %1, i8* %2) {
%4 = tail call i32 @wattr_on(i32* %0, i32 %1, i8* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ GLsizei;
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glCopyTexImage1D(int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/);
void CopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x,
                    GLint y, GLsizei width, GLint border) {
  glCopyTexImage1D(target, level, internalformat, x, y, width, border);
}


x86 assembly (clang, -O0):
<CopyTexImage1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <glCopyTexImage1D@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyTexImage1D>:
jmp    1030 <glCopyTexImage1D@plt>

LLVM IR (-O0):
define void @CopyTexImage1D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call i32 @glCopyTexImage1D(i32 %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
define void @CopyTexImage1D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @glCopyTexImage1D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret void
}
void av_color_range_name() {}


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

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

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

LLVM IR (-O2):
define void @av_color_range_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nrf_set_config(int);
void __attribute__((unused)) nrf_ptx_wakeup(void) {
  nrf_set_config(0x08 | 0x02);
}


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

x86 assembly (clang, -O2):
<nrf_ptx_wakeup>:
mov    $0xa,%edi
jmp    1030 <nrf_set_config@plt>

LLVM IR (-O0):
define void @nrf_ptx_wakeup() {
%1 = call i32 @nrf_set_config(i32 10)
ret void
}

LLVM IR (-O2):
define void @nrf_ptx_wakeup() {
%1 = tail call i32 @nrf_set_config(i32 10)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int tv_usec;
  scalar_t__ tv_sec;
};
struct rusage {
  TYPE_1__ ru_utime;
};

/* Variables and functions */
int /*<<< orphan*/ RUSAGE_SELF;
int /*<<< orphan*/ getrusage(int /*<<< orphan*/, struct rusage *);
long util_cpu_time(void) {
  long t = 0;
  struct rusage rusage;
  (void)getrusage(RUSAGE_SELF, &rusage);
  t = (long)rusage.ru_utime.tv_sec * 1000 + rusage.ru_utime.tv_usec / 1000;
  return t;
}


x86 assembly (clang, -O0):
<util_cpu_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
call   1030 <getrusage@plt>
imul   $0x3e8,-0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_cpu_time>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <getrusage@plt>
imul   $0x3e8,0x10(%rsp),%rcx
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
cltq
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i64 }
@RUSAGE_SELF = global i32 0
define i64 @util_cpu_time() {
%1 = alloca i64
%2 = alloca %struct.rusage
store i64 0, i64* %1
%3 = load i32, i32* @RUSAGE_SELF
%4 = call i32 @getrusage(i32 %3, %struct.rusage* %2)
%5 = getelementptr inbounds %struct.rusage, %struct.rusage* %2, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %5, i32 0, i32 1
%7 = load i64, i64* %6
%8 = mul nsw i64 %7, 1000
%9 = getelementptr inbounds %struct.rusage, %struct.rusage* %2, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = sdiv i32 %11, 1000
%13 = sext i32 %12 to i64
%14 = add nsw i64 %8, %13
store i64 %14, i64* %1
%15 = load i64, i64* %1
ret i64 %15
}

LLVM IR (-O2):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i64 }
@RUSAGE_SELF = global i32 0
define i64 @util_cpu_time() {
%1 = alloca %struct.rusage
%2 = bitcast %struct.rusage* %1 to i8*
%3 = load i32, i32* @RUSAGE_SELF
%4 = call i32 @getrusage(i32 %3, %struct.rusage* %1)
%5 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 1
%6 = load i64, i64* %5
%7 = mul nsw i64 %6, 1000
%8 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = sext i32 %10 to i64
%12 = add nsw i64 %7, %11
ret i64 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double lt2ts();
time_t lt2tsu() { return ((time_t)(lt2ts() - 631152000.0)); }


x86 assembly (clang, -O0):
<lt2tsu>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <lt2ts@plt>
movsd  0xedd(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lt2tsu>:
push   %rax
xor    %eax,%eax
call   1030 <lt2ts@plt>
addsd  0xee0(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @lt2tsu() {
%1 = call double (...) @lt2ts()
%2 = fsub double %1, 6.311520e+08
%3 = fptosi double %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @lt2tsu() {
%1 = tail call double (...) @lt2ts()
%2 = fadd double %1, -6.311520e+08
%3 = fptosi double %2 to i32
ret i32 %3
}
/* Variables and functions */
void *realloc(void *, size_t);
void *emdns_mem_realloc(void *data, size_t newsz) {
  return realloc(data, newsz);
}


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

x86 assembly (clang, -O2):
<emdns_mem_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @emdns_mem_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}