xunge/DecIR huggingface dataset:
int test_imm_A3uint16_reg(unsigned short val) {
  return ((val) & (0xA3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A3uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xa3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_A3uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 163
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EBADF;
int /*<<< orphan*/ errno;
int _write(int file, char *ptr, int len) {
  switch (file) {
  default:
    errno = EBADF;
    return -1;
  }
  return len;
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec2(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EBADF = global i32 0
@errno = global i32 0
define i32 @_write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
switch i32 %7, label %8 [
]
8: ; preds = %3
%9 = load i32, i32* @EBADF
store i32 %9, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EBADF = global i32 0
@errno = global i32 0
define i32 @_write(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @EBADF
store i32 %4, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ rv;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int, int);
const char *binname(int a, int b) {
  static char rv[32];
  snprintf(rv, sizeof(rv), "bin-%d-%d", a, b);
  return rv;
}


x86 assembly (clang, -O0):
<binname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
lea    0x2f14(%rip),%rdi
mov    $0x20,%esi
lea    0xec8(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2efc(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binname>:
push   %rbx
mov    %esi,%r8d
mov    %edi,%ecx
lea    0x2f23(%rip),%rbx
lea    0xedc(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@binname.rv = internal global [32 x i8] zeroinitializer
@.str = [10 x i8] c"bin-%d-%d\00"
define i8* @binname(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @binname.rv, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @binname.rv, i64 0, i64 0)
}

LLVM IR (-O2):
@binname.rv = internal global [32 x i8] zeroinitializer
@.str = [10 x i8] c"bin-%d-%d\00"
define i8* @binname(i32 %0, i32 %1) {
%3 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @binname.rv, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @binname.rv, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int sigsuspend(const sigset_t *mask) {
  ;
  errno = ENOSYS;
  return -1;
  ;
}


x86 assembly (clang, -O0):
<sigsuspend>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @sigsuspend(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @sigsuspend(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
scalar_t__ round(double);
int ROUND(double x) { return (int)round(x); }


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

x86 assembly (clang, -O2):
<ROUND>:
jmp    1030 <round@plt>

LLVM IR (-O0):
define i32 @ROUND(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @round(double %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ROUND(double %0) {
%2 = tail call i64 @round(double %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
char *unbox_char_string();
int /*<<< orphan*/ unsetenv(char *);
void primitive_unset_os_env_impl(void) {
  char *key = unbox_char_string();
  unsetenv(key);
}


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

x86 assembly (clang, -O2):
<primitive_unset_os_env_impl>:
push   %rax
xor    %eax,%eax
call   1040 <unbox_char_string@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <unsetenv@plt>

LLVM IR (-O0):
define void @primitive_unset_os_env_impl() {
%1 = alloca i8*
%2 = call i8* (...) @unbox_char_string()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @unsetenv(i8* %3)
ret void
}

LLVM IR (-O2):
define void @primitive_unset_os_env_impl() {
%1 = tail call i8* (...) @unbox_char_string()
%2 = tail call i32 @unsetenv(i8* %1)
ret void
}
void proc_decomp_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @proc_decomp_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testCmds();
int /*<<< orphan*/ testConversationLog();
void testVmHost() {
  testCmds();
  testConversationLog();
}


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

x86 assembly (clang, -O2):
<testVmHost>:
push   %rax
xor    %eax,%eax
call   1040 <testCmds@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <testConversationLog@plt>

LLVM IR (-O0):
define void @testVmHost() {
%1 = call i32 (...) @testCmds()
%2 = call i32 (...) @testConversationLog()
ret void
}

LLVM IR (-O2):
define void @testVmHost() {
%1 = tail call i32 (...) @testCmds()
%2 = tail call i32 (...) @testConversationLog()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GIEOn();
int /*<<< orphan*/ hint();
main() {
  GIEOn();
  hint();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GIEOn@plt>
mov    $0x0,%al
call   1040 <hint@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <GIEOn@plt>
xor    %eax,%eax
call   1040 <hint@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @GIEOn()
%2 = call i32 (...) @hint()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @GIEOn()
%2 = tail call i32 (...) @hint()
ret i32 0
}
void foo342() {}


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

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

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

LLVM IR (-O2):
define void @foo342() {
ret void
}
/* Variables and functions */
int sub(int);
void main(void) {
  int x;
  int y;
  y = sub(x);
}


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <sub@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = call i32 @sub(i32 %3)
store i32 %4, i32* %2
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @sub(i32 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  unsigned int x = 0;
  unsigned int y = 1;
  while (x < 6) {
    x++;
    y *= 2;
  }
  __VERIFIER_assert(x == 6);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x6,-0x8(%rbp)
jae    114e <main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x6,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = mul i32 %10, 2
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 6
%15 = zext i1 %14 to i32
%16 = call i32 @__VERIFIER_assert(i32 %15)
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
/* Variables and functions */
scalar_t__ isupper(char);
char tolower(char);
char *strlwr(char *a) {
  char *ret = a;
  while (*a != '\0') {
    if (isupper(*a))
      *a = tolower(*a);
    ++a;
  }
  return ret;
}


x86 assembly (clang, -O0):
<strlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     117f <strlwr+0x5f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     116e <strlwr+0x4e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <strlwr+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1165 <strlwr+0x45>
mov    %r14,%rbx
jmp    114c <strlwr+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1165 <strlwr+0x45>
movsbl %al,%edi
call   1040 <isupper@plt>
test   %rax,%rax
je     1140 <strlwr+0x20>
movsbl (%rbx),%edi
call   1030 <tolower@plt>
mov    %al,(%rbx)
jmp    1140 <strlwr+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strlwr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = tail call i64 @isupper(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i8, i8* %6
%11 = tail call signext i8 @tolower(i8 signext %10)
store i8 %11, i8* %6
br label %12
12: ; preds = %9, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret i8* %0
}
/* Variables and functions */
char *dl_strndup(char *, int);
scalar_t__ strlen(char *);
char *dl_strdup(char *s) { return dl_strndup(s, (int)strlen(s)); }


x86 assembly (clang, -O0):
<dl_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <dl_strndup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dl_strdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <dl_strndup@plt>

LLVM IR (-O0):
define i8* @dl_strdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = call i8* @dl_strndup(i8* %3, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @dl_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = tail call i8* @dl_strndup(i8* %0, i32 %3)
ret i8* %4
}
int fun886() { return 886; }


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

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

LLVM IR (-O0):
define i32 @fun886() {
ret i32 886
}

LLVM IR (-O2):
define i32 @fun886() {
ret i32 886
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int /*<<< orphan*/);
void TOSH_CLR_FLASH_SELECT_PIN() { clear_io_bit(0x37, 0); }


x86 assembly (clang, -O0):
<TOSH_CLR_FLASH_SELECT_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x37,%edi
xor    %esi,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_FLASH_SELECT_PIN>:
mov    $0x37,%edi
xor    %esi,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_FLASH_SELECT_PIN() {
%1 = call i32 @clear_io_bit(i32 55, i32 0)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_FLASH_SELECT_PIN() {
%1 = tail call i32 @clear_io_bit(i32 55, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void naFree(void *m) { free(m); }


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

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

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

LLVM IR (-O2):
define void @naFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned float_abs(unsigned uf) {
  int zf = uf & 0x7fffffff;
  if (zf > 0x7f800000) {
    return uf;
  } else {
    return zf;
  }
}


x86 assembly (clang, -O0):
<float_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7f800000,-0xc(%rbp)
jle    112a <float_abs+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <float_abs+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_abs>:
mov    %edi,%eax
and    $0x7fffffff,%eax
cmp    $0x7f800001,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @float_abs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = and i32 %5, 2147483647
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 2139095040
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @float_abs(i32 %0) {
%2 = and i32 %0, 2147483647
%3 = icmp ugt i32 %2, 2139095040
%4 = select i1 %3, i32 %0, i32 %2
ret i32 %4
}
void hash_digest_init(void) {}


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

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

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

LLVM IR (-O2):
define void @hash_digest_init() {
ret void
}
/* Variables and functions */
double pow(double, double);
double luminosity(double mass_ratio) {
  double n;
  if (mass_ratio < 1.0)
    n = 1.75 * (mass_ratio - 0.1) + 3.325;
  else
    n = 0.5 * (2.0 - mass_ratio) + 4.4;
  return (pow(mass_ratio, n));
}


x86 assembly (clang, -O0):
<luminosity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1163 <luminosity+0x53>
movsd  -0x8(%rbp),%xmm0
movsd  0xef3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xed7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    118d <luminosity+0x7d>
movsd  0xead(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luminosity>:
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    113f <luminosity+0x2f>
movsd  0xefa(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  0xef6(%rip),%xmm1
addsd  0xef6(%rip),%xmm1
jmp    1030 <pow@plt>
movsd  0xec1(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xebd(%rip),%xmm1
addsd  0xebd(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @luminosity(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp olt double %4, 1.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %2
%8 = fsub double %7, 1.000000e-01
%9 = call double @llvm.fmuladd.f64(double 1.750000e+00, double %8, double 3.325000e+00)
store double %9, double* %3
br label %14
10: ; preds = %1
%11 = load double, double* %2
%12 = fsub double 2.000000e+00, %11
%13 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %12, double 4.400000e+00)
store double %13, double* %3
br label %14
14: ; preds = %10, %6
%15 = load double, double* %2
%16 = load double, double* %3
%17 = call double @pow(double %15, double %16)
ret double %17
}

LLVM IR (-O2):
define double @luminosity(double %0) {
%2 = fcmp olt double %0, 1.000000e+00
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = fadd double %0, -1.000000e-01
%5 = tail call double @llvm.fmuladd.f64(double %4, double 1.750000e+00, double 3.325000e+00)
br label %9
6: ; preds = %1
%7 = fsub double 2.000000e+00, %0
%8 = tail call double @llvm.fmuladd.f64(double %7, double 5.000000e-01, double 4.400000e+00)
br label %9
9: ; preds = %6, %3
%10 = phi double [ %5, %3 ], [ %8, %6 ]
%11 = tail call double @pow(double %0, double %10)
ret double %11
}
void loop4(int sum, int n) {
  while (1) {
    if (n == 0)
      break;
    sum += n;
  }
  return;
}


x86 assembly (clang, -O0):
<loop4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1119 <loop4+0x19>
jmp    1127 <loop4+0x27>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110a <loop4+0xa>
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop4>:
test   %esi,%esi
je     1112 <loop4+0x12>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1110 <loop4+0x10>
ret

LLVM IR (-O0):
define void @loop4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2, %9
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
br label %13
9: ; preds = %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = add nsw i32 %11, %10
store i32 %12, i32* %3
br label %5
13: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @loop4(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2, %4
br label %4
5: ; preds = %2
ret void
}
/* Variables and functions */
int fc8180_probe(void *);
signed int bbm_com_probe(void *handle) {
  signed int res;
  res = fc8180_probe(handle);
  return res;
}


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

x86 assembly (clang, -O2):
<bbm_com_probe>:
jmp    1030 <fc8180_probe@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_probe(i8* %0) {
%2 = tail call i32 @fc8180_probe(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ serial_read(unsigned char *, int);
unsigned char serial_read_byte() {
  unsigned char b;
  serial_read(&b, 1);
  return b;
}


x86 assembly (clang, -O0):
<serial_read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <serial_read@plt>
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_read_byte>:
push   %rax
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <serial_read@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @serial_read_byte() {
%1 = alloca i8
%2 = call i32 @serial_read(i8* %1, i32 1)
%3 = load i8, i8* %1
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @serial_read_byte() {
%1 = alloca i8
%2 = call i32 @serial_read(i8* %1, i32 1)
%3 = load i8, i8* %1
ret i8 %3
}
/* Type definitions */
struct blob_attr {
  int dummy;
};

/* Variables and functions */
char *blobmsg_data(struct blob_attr *);
char *blobmsg_get_string(struct blob_attr *attr) { return blobmsg_data(attr); }


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

x86 assembly (clang, -O2):
<blobmsg_get_string>:
jmp    1030 <blobmsg_data@plt>

LLVM IR (-O0):
%struct.blob_attr = type { i32 }
define i8* @blobmsg_get_string(%struct.blob_attr* %0) {
%2 = alloca %struct.blob_attr*
store %struct.blob_attr* %0, %struct.blob_attr** %2
%3 = load %struct.blob_attr*, %struct.blob_attr** %2
%4 = call i8* @blobmsg_data(%struct.blob_attr* %3)
ret i8* %4
}

LLVM IR (-O2):
%struct.blob_attr = type { i32 }
define i8* @blobmsg_get_string(%struct.blob_attr* %0) {
%2 = tail call i8* @blobmsg_data(%struct.blob_attr* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xmlClose(void) { printf("</mobile>\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"</mobile>\0A\00"
define void @xmlClose() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"</mobile>\00"
define void @xmlClose() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct aiocb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int aio_read(struct aiocb *aiocbp) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<aio_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aio_read>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.aiocb = type { i32 }
@ENOSYS = global i32 0
define i32 @aio_read(%struct.aiocb* %0) {
%2 = alloca %struct.aiocb*
store %struct.aiocb* %0, %struct.aiocb** %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
%struct.aiocb = type { i32 }
@ENOSYS = global i32 0
define i32 @aio_read(%struct.aiocb* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Variables and functions */
scalar_t__ light_isdigit(int);
int light_isxdigit(int c) {
  if (light_isdigit(c))
    return 1;
  c |= 32;
  return (c >= 'a' && c <= 'f');
}


x86 assembly (clang, -O0):
<light_isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <light_isdigit@plt>
cmp    $0x0,%rax
je     1139 <light_isxdigit+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1166 <light_isxdigit+0x56>
mov    -0x8(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     115b <light_isxdigit+0x4b>
cmpl   $0x66,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<light_isxdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <light_isdigit@plt>
test   %rax,%rax
setne  %al
or     $0x20,%ebx
add    $0xffffff9f,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @light_isxdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @light_isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %19
8: ; preds = %1
%9 = load i32, i32* %3
%10 = or i32 %9, 32
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 97
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 102
br label %16
16: ; preds = %13, %8
%17 = phi i1 [ false, %8 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @light_isxdigit(i32 %0) {
%2 = tail call i64 @light_isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = or i32 %0, 32
%5 = add i32 %4, -97
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char **argv) {
  printf("%s requires two arguments\n\n1. The low frequency in hertz \n2. The "
         "high frequency in hertz\n\n The maximum is 20,000 hertz, minimum is "
         "1 hertz\n\n sweep will generate a sine wave sweep to verify eXtace "
         "is functioning normally\n\n",
         argv[0]);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    (%rdi),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [222 x i8] c"%s requires two arguments\0A\0A1. The low frequency in hertz \0A2. The high frequency in hertz\0A\0A The maximum is 20,000 hertz, minimum is 1 hertz\0A\0A sweep will generate a sine wave sweep to verify eXtace is functioning normally\0A\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([222 x i8], [222 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [222 x i8] c"%s requires two arguments\0A\0A1. The low frequency in hertz \0A2. The high frequency in hertz\0A\0A The maximum is 20,000 hertz, minimum is 1 hertz\0A\0A sweep will generate a sine wave sweep to verify eXtace is functioning normally\0A\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([222 x i8], [222 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
int __test() {
  int x = 3;
  return -x;
}


x86 assembly (clang, -O0):
<__test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__test() {
%1 = alloca i32
store i32 3, i32* %1
%2 = load i32, i32* %1
%3 = sub nsw i32 0, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @__test() {
ret i32 -3
}
void send_byte_uart(unsigned char byte) {}


x86 assembly (clang, -O0):
<send_byte_uart>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @send_byte_uart(i8 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void hm_int_int_entry_destroy(void *entry) { free(entry); }


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

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

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

LLVM IR (-O2):
define void @hm_int_int_entry_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int send(int, char *, int, int /*<<< orphan*/);
int strlen(char *);
int send_data(int sock, char *buf) {
  int len = strlen(buf);
  int bytes_sent = send(sock, buf, len, 0);
  if (!bytes_sent)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<send_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1040 <send@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1165 <send_data+0x45>
movl   $0x0,-0x4(%rbp)
jmp    116c <send_data+0x4c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_data>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @send_data(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %3, i32 0)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ client_creature_init();
int /*<<< orphan*/ client_player_init();
int /*<<< orphan*/ client_world_init();
void client_game_init() {
  client_world_init();
  client_player_init();
  client_creature_init();
}


x86 assembly (clang, -O0):
<client_game_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <client_world_init@plt>
mov    $0x0,%al
call   1030 <client_player_init@plt>
mov    $0x0,%al
call   1040 <client_creature_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<client_game_init>:
push   %rax
xor    %eax,%eax
call   1050 <client_world_init@plt>
xor    %eax,%eax
call   1030 <client_player_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <client_creature_init@plt>

LLVM IR (-O0):
define void @client_game_init() {
%1 = call i32 (...) @client_world_init()
%2 = call i32 (...) @client_player_init()
%3 = call i32 (...) @client_creature_init()
ret void
}

LLVM IR (-O2):
define void @client_game_init() {
%1 = tail call i32 (...) @client_world_init()
%2 = tail call i32 (...) @client_player_init()
%3 = tail call i32 (...) @client_creature_init()
ret void
}
void genneg_s() {}


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

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

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

LLVM IR (-O2):
define void @genneg_s() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int syscall_cp(int, int /*<<< orphan*/ const *, int);
int sigsuspend(const sigset_t *mask) { return syscall_cp(130, mask, 8); }


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

x86 assembly (clang, -O2):
<sigsuspend>:
mov    %rdi,%rsi
mov    $0x82,%edi
mov    $0x8,%edx
jmp    1030 <syscall_cp@plt>

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

LLVM IR (-O2):
define i32 @sigsuspend(i32* %0) {
%2 = tail call i32 @syscall_cp(i32 130, i32* %0, i32 8)
ret i32 %2
}
/* Variables and functions */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c))
    return ('A' - 'a' + c);
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113d <toupper+0x2d>
mov    -0x8(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <toupper+0x33>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @islower(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = add nsw i32 -32, %8
store i32 %9, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int t1_3d_init_ctxno_mag(unsigned int f, int f2) {
  int n;
  if (!(f2 & 0x0002))
    n = (f & ((0x00000010 | 0x00000020 | 0x00000040 | 0x00000080 | 0x00000100 |
               0x00000200)))
            ? 1
            : 0;
  else
    n = 2;
  return (((0 + 1) + 16) + n);
}


x86 assembly (clang, -O0):
<t1_3d_init_ctxno_mag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    1137 <t1_3d_init_ctxno_mag+0x37>
mov    -0x4(%rbp),%edx
and    $0x3f0,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    113e <t1_3d_init_ctxno_mag+0x3e>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x11,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_3d_init_ctxno_mag>:
and    $0x3f0,%edi
cmp    $0x1,%edi
mov    $0x12,%ecx
sbb    $0x0,%ecx
test   $0x2,%sil
mov    $0x13,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @t1_3d_init_ctxno_mag(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = and i32 %6, 2
%8 = icmp ne i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = and i32 %10, 1008
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
store i32 %14, i32* %5
br label %16
15: ; preds = %2
store i32 2, i32* %5
br label %16
16: ; preds = %15, %9
%17 = load i32, i32* %5
%18 = add nsw i32 17, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @t1_3d_init_ctxno_mag(i32 %0, i32 %1) {
%3 = and i32 %1, 2
%4 = icmp eq i32 %3, 0
%5 = and i32 %0, 1008
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 17, i32 18
%8 = select i1 %4, i32 %7, i32 19
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ _errorloop();
void UsageFault_Handler() { _errorloop(); }


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

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

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

LLVM IR (-O2):
define void @UsageFault_Handler() {
%1 = tail call i32 (...) @_errorloop()
ret void
}
void foo_2_1_1_2_2_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_2_1_1_2_2() {
ret void
}
char put_box(char ch) {
  switch (ch) {
  case ' ':
    return '$';
  case '.':
    return '*';
  default:
    return ch;
  }
}


x86 assembly (clang, -O0):
<put_box>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x20,%eax
je     1130 <put_box+0x30>
jmp    111f <put_box+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x2e,%eax
je     1139 <put_box+0x39>
jmp    1142 <put_box+0x42>
movb   $0x24,-0x1(%rbp)
jmp    1148 <put_box+0x48>
movb   $0x2a,-0x1(%rbp)
jmp    1148 <put_box+0x48>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_box>:
cmp    $0x20,%edi
je     110f <put_box+0xf>
mov    %edi,%eax
cmp    $0x2e,%edi
jne    110e <put_box+0xe>
mov    $0x2a,%al
ret
mov    $0x24,%al
ret

LLVM IR (-O0):
define signext i8 @put_box(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 32, label %6
i32 46, label %7
]
6: ; preds = %1
store i8 36, i8* %2
br label %10
7: ; preds = %1
store i8 42, i8* %2
br label %10
8: ; preds = %1
%9 = load i8, i8* %3
store i8 %9, i8* %2
br label %10
10: ; preds = %8, %7, %6
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @put_box(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 32, label %5
i32 46, label %3
]
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3
%6 = phi i8 [ %0, %4 ], [ 42, %3 ], [ 36, %1 ]
ret i8 %6
}
int main() {
  int leght;
  char *point;
  char plm[] = "This Year's Starting Line-Up";
  point = &plm;
  underline(point);
  leght = strlenght(point);
  printf("This%c string has %d characters", 24, leght);
  puts("\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xea4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xea2(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xe9d(%rip),%al
mov    %al,-0x14(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1060 <underline@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <strlenght@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edx
lea    0xe70(%rip),%rdi
mov    $0x18,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movups 0xec1(%rip),%xmm0
movups %xmm0,0xd(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <underline@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <strlenght@plt>
lea    0xea3(%rip),%rdi
mov    $0x18,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.plm = [29 x i8] c"This Year's Starting Line-Up\00"
@.str = [32 x i8] c"This%c string has %d characters\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [29 x i8]
store i32 0, i32* %1
%5 = bitcast [29 x i8]* %4 to i8*
%6 = bitcast [29 x i8]* %4 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @underline to i32 (i8*, ...)*)(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @strlenght to i32 (i8*, ...)*)(i8* %9)
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 24, i32 %11)
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.plm = [29 x i8] c"This Year's Starting Line-Up\00"
@.str = [32 x i8] c"This%c string has %d characters\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca [29 x i8]
%2 = getelementptr inbounds [29 x i8], [29 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @underline to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @strlenght to i32 (i8*, ...)*)(i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 24, i32 %4)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int __attribute__((target("fpmath=387"))) walrus() { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @walrus() {
ret i32 4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdin;
void closeStream(FILE *f) {
  if (f != stdin) {
    fclose(f);
  }
}


x86 assembly (clang, -O0):
<closeStream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ec1(%rip),%rcx
cmp    (%rcx),%rax
je     1139 <closeStream+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeStream>:
mov    0x2ed1(%rip),%rax
cmp    %rdi,(%rax)
je     1121 <closeStream+0x11>
jmp    1030 <fclose@plt>
ret

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

LLVM IR (-O2):
@stdin = global i32* null
define void @closeStream(i32* nocapture %0) {
%2 = load i32*, i32** @stdin
%3 = icmp eq i32* %2, %0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %0)
br label %6
6: ; preds = %4, %1
ret void
}
void debugInit(void) {}


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

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

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

LLVM IR (-O2):
define void @debugInit() {
ret void
}
void parse_smells_request(struct TCPRECORD *sess, struct NetFrame *frame,
                          const unsigned char *px, unsigned length) {}


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

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

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

LLVM IR (-O2):
%struct.TCPRECORD = type opaque
%struct.NetFrame = type opaque
define void @parse_smells_request(%struct.TCPRECORD* nocapture %0, %struct.NetFrame* nocapture %1, i8* nocapture %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serror(char *);
badoperand() { serror("bad operand(s)"); }


x86 assembly (clang, -O0):
<badoperand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <serror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"bad operand(s)\00"
define i32 @badoperand() {
%1 = alloca i32
%2 = call i32 @serror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [15 x i8] c"bad operand(s)\00"
define i32 @badoperand() {
%1 = tail call i32 @serror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}