xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ format_num(int, int, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
void format_snum(int width, bool leading_zero, int64_t num) {
  if (num < 0) {
    num = -num;
    putchar('-');
  }
  format_num(width, leading_zero, 10, false, num);
}


x86 assembly (clang, -O0):
<format_snum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    114d <format_snum+0x2d>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x2d,%edi
call   1040 <putchar@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%r8d
mov    $0xa,%edx
xor    %ecx,%ecx
call   1030 <format_num@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_snum>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
test   %edx,%edx
jns    113b <format_snum+0x1b>
neg    %ebx
mov    $0x2d,%edi
call   1040 <putchar@plt>
mov    %ebp,%edi
mov    %r14d,%esi
mov    $0xa,%edx
xor    %ecx,%ecx
mov    %ebx,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <format_num@plt>

LLVM IR (-O0):
define void @format_snum(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i32, i32* %6
%11 = sub nsw i32 0, %10
store i32 %11, i32* %6
%12 = call i32 @putchar(i8 signext 45)
br label %13
13: ; preds = %9, %3
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = call i32 @format_num(i32 %14, i32 %15, i32 10, i32 0, i32 %16)
ret void
}

LLVM IR (-O2):
define void @format_snum(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = sub nsw i32 0, %2
%7 = tail call i32 @putchar(i8 signext 45)
br label %8
8: ; preds = %5, %3
%9 = phi i32 [ %6, %5 ], [ %2, %3 ]
%10 = tail call i32 @format_num(i32 %0, i32 %1, i32 10, i32 0, i32 %9)
ret void
}
void *return_arg(void *q) { return q; }


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

x86 assembly (clang, -O2):
<return_arg>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @return_arg(i8* readnone returned %0) {
ret i8* %0
}
void test_set(void) {}


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

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

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

LLVM IR (-O2):
define void @test_set() {
ret void
}
void gtk_tool_button_get_use_underline() {}


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

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

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

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

/* Variables and functions */
char *errmsg_obj_line_v(char const *, int, char const *, int /*<<< orphan*/);
char *errmsg_obj_v(const char *obj, const char *p, va_list args) {
  return errmsg_obj_line_v(obj, -1, p, args);
}


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

x86 assembly (clang, -O2):
<errmsg_obj_v>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0xffffffff,%esi
jmp    1030 <errmsg_obj_line_v@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_mulhi_epu16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_mulhi_epu16(__m128i A, __m128i B) {
  return _mm_mulhi_epu16(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_mulhi_epu16>:
jmp    1030 <_mm_mulhi_epu16@plt>

LLVM IR (-O0):
define i32 @test_mm_mulhi_epu16(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 @_mm_mulhi_epu16(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_mulhi_epu16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_mulhi_epu16(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
void mpz8_init(mpz_t z[8]) {
  int i;
  for (i = 0; i < 8; i++) {
    mpz_init(z[i]);
  }
}


x86 assembly (clang, -O0):
<mpz8_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    114b <mpz8_init+0x3b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <mpz_init@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <mpz8_init+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpz8_init>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <mpz_init@plt>
mov    0x4(%rbx),%edi
call   1030 <mpz_init@plt>
mov    0x8(%rbx),%edi
call   1030 <mpz_init@plt>
mov    0xc(%rbx),%edi
call   1030 <mpz_init@plt>
mov    0x10(%rbx),%edi
call   1030 <mpz_init@plt>
mov    0x14(%rbx),%edi
call   1030 <mpz_init@plt>
mov    0x18(%rbx),%edi
call   1030 <mpz_init@plt>
mov    0x1c(%rbx),%edi
pop    %rbx
jmp    1030 <mpz_init@plt>

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

LLVM IR (-O2):
define void @mpz8_init(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @mpz_init(i32 %2)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @mpz_init(i32 %5)
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = tail call i32 @mpz_init(i32 %8)
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = load i32, i32* %10
%12 = tail call i32 @mpz_init(i32 %11)
%13 = getelementptr inbounds i32, i32* %0, i64 4
%14 = load i32, i32* %13
%15 = tail call i32 @mpz_init(i32 %14)
%16 = getelementptr inbounds i32, i32* %0, i64 5
%17 = load i32, i32* %16
%18 = tail call i32 @mpz_init(i32 %17)
%19 = getelementptr inbounds i32, i32* %0, i64 6
%20 = load i32, i32* %19
%21 = tail call i32 @mpz_init(i32 %20)
%22 = getelementptr inbounds i32, i32* %0, i64 7
%23 = load i32, i32* %22
%24 = tail call i32 @mpz_init(i32 %23)
ret void
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
unsigned int xstrtoull_sfx(char const *, int, struct suffix_mult const *);
__attribute__((always_)) unsigned int
xstrtou_sfx(const char *str, int b, const struct suffix_mult *sfx) {
  return xstrtoull_sfx(str, b, sfx);
}


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

x86 assembly (clang, -O2):
<xstrtou_sfx>:
jmp    1030 <xstrtoull_sfx@plt>

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

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i32 @xstrtou_sfx(i8* %0, i32 %1, %struct.suffix_mult* %2) {
%4 = tail call i32 @xstrtoull_sfx(i8* %0, i32 %1, %struct.suffix_mult* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void util_free_(void *ptr) {
  if ((ptr) != NULL)
    free(ptr);
}


x86 assembly (clang, -O0):
<util_free_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <util_free_+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_free_>:
test   %rdi,%rdi
je     111a <util_free_+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @util_free_(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ GLeeInit();
unsigned int pglXGetAGPOffsetMESA(void const *);
unsigned int _Lazy_glXGetAGPOffsetMESA(const void *pointer) {
  if (GLeeInit())
    return pglXGetAGPOffsetMESA(pointer);
  return (unsigned int)0;
}


x86 assembly (clang, -O0):
<_Lazy_glXGetAGPOffsetMESA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <GLeeInit@plt>
cmp    $0x0,%rax
je     114e <_Lazy_glXGetAGPOffsetMESA+0x2e>
mov    -0x10(%rbp),%rdi
call   1040 <pglXGetAGPOffsetMESA@plt>
mov    %eax,-0x4(%rbp)
jmp    1155 <_Lazy_glXGetAGPOffsetMESA+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Lazy_glXGetAGPOffsetMESA>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <GLeeInit@plt>
test   %rax,%rax
je     1139 <_Lazy_glXGetAGPOffsetMESA+0x19>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <pglXGetAGPOffsetMESA@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_Lazy_glXGetAGPOffsetMESA(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i64 (...) @GLeeInit()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @pglXGetAGPOffsetMESA(i8* %7)
store i32 %8, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @_Lazy_glXGetAGPOffsetMESA(i8* %0) {
%2 = tail call i64 (...) @GLeeInit()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @pglXGetAGPOffsetMESA(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
unsigned long WaitMouseMove281();
unsigned long waitmousemove() { return WaitMouseMove281(); }


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

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

LLVM IR (-O0):
define i64 @waitmousemove() {
%1 = call i64 (...) @WaitMouseMove281()
ret i64 %1
}

LLVM IR (-O2):
define i64 @waitmousemove() {
%1 = tail call i64 (...) @WaitMouseMove281()
ret i64 %1
}
int fib(int n) {
  if (n < 2) {
    return 1;
  }
  return fib(n - 2) + fib(n - 1);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1131 <fib+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fib+0x44>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     1145 <fib+0x35>
mov    %edi,%ebx
add    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <fib@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1130 <fib+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -2
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -1
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 3
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Type definitions */
struct group {
  int dummy;
};
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int ENOENT;
int NSS_STATUS_NOTFOUND;
enum nss_status _nss_noenum_getgrnam_r(const char *name, struct group *gr,
                                       char *buffer, size_t buflen,
                                       int *errnop) {
  *errnop = ENOENT;
  return NSS_STATUS_NOTFOUND;
}


x86 assembly (clang, -O0):
<_nss_noenum_getgrnam_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_noenum_getgrnam_r>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%r8)
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.group = type { i32 }
@ENOENT = global i32 0
@NSS_STATUS_NOTFOUND = global i32 0
define i32 @_nss_noenum_getgrnam_r(i8* %0, %struct.group* %1, i8* %2, i64 %3, i32* %4) {
%6 = alloca i8*
%7 = alloca %struct.group*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32*
store i8* %0, i8** %6
store %struct.group* %1, %struct.group** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32* %4, i32** %10
%11 = load i32, i32* @ENOENT
%12 = load i32*, i32** %10
store i32 %11, i32* %12
%13 = load i32, i32* @NSS_STATUS_NOTFOUND
ret i32 %13
}

LLVM IR (-O2):
%struct.group = type { i32 }
@ENOENT = global i32 0
@NSS_STATUS_NOTFOUND = global i32 0
define i32 @_nss_noenum_getgrnam_r(i8* nocapture readnone %0, %struct.group* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, i32* nocapture writeonly %4) {
%6 = load i32, i32* @ENOENT
store i32 %6, i32* %4
%7 = load i32, i32* @NSS_STATUS_NOTFOUND
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void printData(double area) {
  printf("\nEstimated area: %f\n\n", area);
  return;
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"\0AEstimated area: %f\0A\0A\00"
define void @printData(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0AEstimated area: %f\0A\0A\00"
define void @printData(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
void reserve_hugetlb_gpages(void) {}


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

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

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

LLVM IR (-O2):
define void @reserve_hugetlb_gpages() {
ret void
}
void S_mode4() {}


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

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

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

LLVM IR (-O2):
define void @S_mode4() {
ret void
}
/* Variables and functions */
int sqrt(double);
double func(double x, double y) { return 1. / sqrt(x + y); }


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1030 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec3(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rax
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xed7(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @func(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
%8 = call i32 @sqrt(double %7)
%9 = sitofp i32 %8 to double
%10 = fdiv double 1.000000e+00, %9
ret double %10
}

LLVM IR (-O2):
define double @func(double %0, double %1) {
%3 = fadd double %0, %1
%4 = tail call i32 @sqrt(double %3)
%5 = sitofp i32 %4 to double
%6 = fdiv double 1.000000e+00, %5
ret double %6
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int ntohl(int);
uint64_t ntohll(uint64_t *value) {
  uint64_t vv = *((uint64_t *)value);
  int num = 42;
  if (*(char *)&num == 42)
    return (((uint64_t)ntohl(vv)) << 32) + ntohl(vv >> 32);
  else
    return vv;
}


x86 assembly (clang, -O0):
<ntohll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x2a,-0x18(%rbp)
movsbl -0x18(%rbp),%eax
cmp    $0x2a,%eax
jne    1169 <ntohll+0x59>
mov    -0x14(%rbp),%edi
call   1030 <ntohl@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x20,%ecx
sar    %cl,%edi
call   1030 <ntohl@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    116f <ntohll+0x5f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohll>:
push   %rbx
mov    (%rdi),%ebx
mov    %ebx,%edi
call   1030 <ntohl@plt>
call   1030 <ntohl@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ntohll(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %4
store i32 42, i32* %5
%8 = bitcast i32* %5 to i8*
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 42
br i1 %11, label %12, label %20
12: ; preds = %1
%13 = load i32, i32* %4
%14 = call i32 @ntohl(i32 %13)
%15 = shl i32 %14, 32
%16 = load i32, i32* %4
%17 = ashr i32 %16, 32
%18 = call i32 @ntohl(i32 %17)
%19 = add nsw i32 %15, %18
store i32 %19, i32* %2
br label %22
20: ; preds = %1
%21 = load i32, i32* %4
store i32 %21, i32* %2
br label %22
22: ; preds = %20, %12
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @ntohll(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @ntohl(i32 %2)
%4 = tail call i32 @ntohl(i32 poison)
ret i32 %2
}
int HelpItem104(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem104() {
ret i32 0
}
double xrand(double xl, double xh, double r) {
  double res;
  res = xl + (xh - xl) * r / 2147483647.0;
  return (res);
}


x86 assembly (clang, -O0):
<xrand>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xed1(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrand>:
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
divsd  0xef0(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @xrand(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = load double, double* %5
%10 = load double, double* %4
%11 = fsub double %9, %10
%12 = load double, double* %6
%13 = fmul double %11, %12
%14 = fdiv double %13, 0x41DFFFFFFFC00000
%15 = fadd double %8, %14
store double %15, double* %7
%16 = load double, double* %7
ret double %16
}

LLVM IR (-O2):
define double @xrand(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = fmul double %4, %2
%6 = fdiv double %5, 0x41DFFFFFFFC00000
%7 = fadd double %6, %0
ret double %7
}
/* Type definitions */
typedef size_t uint32_t;

/* Variables and functions */
size_t rgph_murmur32s_fmix(size_t);
void rgph_murmur32s_finalise(size_t len, uint32_t h[]) {
  h[0] ^= len;
  h[0] = rgph_murmur32s_fmix(h[0]);
}


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

x86 assembly (clang, -O2):
<rgph_murmur32s_finalise>:
push   %rbx
mov    %rsi,%rbx
xor    (%rsi),%rdi
mov    %rdi,(%rsi)
call   1030 <rgph_murmur32s_fmix@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @rgph_murmur32s_finalise(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
%5 = load i64, i64* %3
%6 = load i64*, i64** %4
%7 = getelementptr inbounds i64, i64* %6, i64 0
%8 = load i64, i64* %7
%9 = xor i64 %8, %5
store i64 %9, i64* %7
%10 = load i64*, i64** %4
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = call i64 @rgph_murmur32s_fmix(i64 %12)
%14 = load i64*, i64** %4
%15 = getelementptr inbounds i64, i64* %14, i64 0
store i64 %13, i64* %15
ret void
}

LLVM IR (-O2):
define void @rgph_murmur32s_finalise(i64 %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = xor i64 %3, %0
store i64 %4, i64* %1
%5 = tail call i64 @rgph_murmur32s_fmix(i64 %4)
store i64 %5, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int clamp_i(int x, int min, int max) {
  assert(min < max);
  if (x < min) {
    return min;
  } else if (x > max) {
    return max;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<clamp_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114b <clamp_i+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <clamp_i+0x58>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1162 <clamp_i+0x52>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <clamp_i+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_i>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %edi,%edi
cmp    %edx,%esi
setl   %dil
call   1030 <assert@plt>
cmp    %ebx,%ebp
cmovle %ebp,%ebx
cmp    %r14d,%ebp
cmovl  %r14d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @clamp_i(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %6
%9 = load i32, i32* %7
%10 = icmp slt i32 %8, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = load i32, i32* %6
store i32 %17, i32* %4
br label %26
18: ; preds = %3
%19 = load i32, i32* %5
%20 = load i32, i32* %7
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = load i32, i32* %7
store i32 %23, i32* %4
br label %26
24: ; preds = %18
%25 = load i32, i32* %5
store i32 %25, i32* %4
br label %26
26: ; preds = %24, %22, %16
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
define i32 @clamp_i(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp slt i32 %0, %1
%8 = icmp sgt i32 %0, %2
%9 = select i1 %8, i32 %2, i32 %0
%10 = select i1 %7, i32 %1, i32 %9
ret i32 %10
}
const char *get_type_name_button(struct castable *castable) { return "button"; }


x86 assembly (clang, -O0):
<get_type_name_button>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_type_name_button>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct.castable = type opaque
@.str = [7 x i8] c"button\00"
define i8* @get_type_name_button(%struct.castable* %0) {
%2 = alloca %struct.castable*
store %struct.castable* %0, %struct.castable** %2
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.castable = type opaque
@.str = [7 x i8] c"button\00"
define i8* @get_type_name_button(%struct.castable* nocapture readnone %0) {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
void RTSgBufSet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSgBufSet() {
ret void
}
void init_condattr() {}


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

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

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

LLVM IR (-O2):
define void @init_condattr() {
ret void
}
float blendBehaviour(float inA, float inB, float inC, float finalA,
                     float finalB, float finalC) {
  float totalA = inA * finalA;
  float totalB = inB * finalB;
  float totalC = inC * finalC;
  return ((totalA + totalB + totalC) / (inA + inB + inC));
}


x86 assembly (clang, -O0):
<blendBehaviour>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x1c(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
addss  -0x8(%rbp),%xmm1
addss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<blendBehaviour>:
mulss  %xmm0,%xmm3
mulss  %xmm1,%xmm4
addss  %xmm3,%xmm4
mulss  %xmm2,%xmm5
addss  %xmm4,%xmm5
addss  %xmm1,%xmm0
addss  %xmm2,%xmm0
divss  %xmm0,%xmm5
movaps %xmm5,%xmm0
ret

LLVM IR (-O0):
define float @blendBehaviour(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%16 = load float, float* %7
%17 = load float, float* %10
%18 = fmul float %16, %17
store float %18, float* %13
%19 = load float, float* %8
%20 = load float, float* %11
%21 = fmul float %19, %20
store float %21, float* %14
%22 = load float, float* %9
%23 = load float, float* %12
%24 = fmul float %22, %23
store float %24, float* %15
%25 = load float, float* %13
%26 = load float, float* %14
%27 = fadd float %25, %26
%28 = load float, float* %15
%29 = fadd float %27, %28
%30 = load float, float* %7
%31 = load float, float* %8
%32 = fadd float %30, %31
%33 = load float, float* %9
%34 = fadd float %32, %33
%35 = fdiv float %29, %34
ret float %35
}

LLVM IR (-O2):
define float @blendBehaviour(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fmul float %0, %3
%8 = fmul float %1, %4
%9 = fmul float %2, %5
%10 = fadd float %7, %8
%11 = fadd float %10, %9
%12 = fadd float %0, %1
%13 = fadd float %12, %2
%14 = fdiv float %11, %13
ret float %14
}
int rtl838x_mac_port_ctrl(int p) { return (0xd560) + (p << 7); }


x86 assembly (clang, -O0):
<rtl838x_mac_port_ctrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
add    $0xd560,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtl838x_mac_port_ctrl>:
shl    $0x7,%edi
lea    0xd560(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rtl838x_mac_port_ctrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 7
%5 = add nsw i32 54624, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @rtl838x_mac_port_ctrl(i32 %0) {
%2 = shl i32 %0, 7
%3 = add nsw i32 %2, 54624
ret i32 %3
}
int my_foo(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @my_foo() {
ret i32 42
}

LLVM IR (-O2):
define i32 @my_foo() {
ret i32 42
}
/* Variables and functions */
char *place_commas_in_number_string(char *);
int /*<<< orphan*/ round_double(double);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
char *timlib_place_commas_in_dollars(double d) {
  char s[20];
  sprintf(s, "%.0lf", round_double(d));
  return place_commas_in_number_string(s);
}


x86 assembly (clang, -O0):
<timlib_place_commas_in_dollars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <round_double@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
lea    0xea4(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <place_commas_in_number_string@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timlib_place_commas_in_dollars>:
push   %rbx
sub    $0x20,%rsp
call   1030 <round_double@plt>
lea    0xebf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %eax,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <place_commas_in_number_string@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.0lf\00"
define i8* @timlib_place_commas_in_dollars(double %0) {
%2 = alloca double
%3 = alloca [20 x i8]
store double %0, double* %2
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = load double, double* %2
%6 = call i32 @round_double(double %5)
%7 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = call i8* @place_commas_in_number_string(i8* %8)
ret i8* %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.0lf\00"
define i8* @timlib_place_commas_in_dollars(double %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @round_double(double %0)
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i8* @place_commas_in_number_string(i8* %3)
ret i8* %6
}
void OCSP_CRLID_new(void) {}


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

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

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

LLVM IR (-O2):
define void @OCSP_CRLID_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GPIOPinTypeGPIOInput(int, int);
int /*<<< orphan*/ GPIOPinTypeGPIOOutput(int, int);
int /*<<< orphan*/ SysCtlPeripheralEnable(int);
void cs5463_init_gpio(void) {
  SysCtlPeripheralEnable(0x20000002);
  GPIOPinTypeGPIOOutput(0x40005000, 0x00000002 | 0x00000008);
  GPIOPinTypeGPIOInput(0x40005000, 0x00000004);
}


x86 assembly (clang, -O0):
<cs5463_init_gpio>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20000002,%edi
call   1030 <SysCtlPeripheralEnable@plt>
mov    $0x40005000,%edi
mov    $0xa,%esi
call   1050 <GPIOPinTypeGPIOOutput@plt>
mov    $0x40005000,%edi
mov    $0x4,%esi
call   1040 <GPIOPinTypeGPIOInput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs5463_init_gpio>:
push   %rax
mov    $0x20000002,%edi
call   1030 <SysCtlPeripheralEnable@plt>
mov    $0x40005000,%edi
mov    $0xa,%esi
call   1050 <GPIOPinTypeGPIOOutput@plt>
mov    $0x40005000,%edi
mov    $0x4,%esi
pop    %rax
jmp    1040 <GPIOPinTypeGPIOInput@plt>

LLVM IR (-O0):
define void @cs5463_init_gpio() {
%1 = call i32 @SysCtlPeripheralEnable(i32 536870914)
%2 = call i32 @GPIOPinTypeGPIOOutput(i32 1073762304, i32 10)
%3 = call i32 @GPIOPinTypeGPIOInput(i32 1073762304, i32 4)
ret void
}

LLVM IR (-O2):
define void @cs5463_init_gpio() {
%1 = tail call i32 @SysCtlPeripheralEnable(i32 536870914)
%2 = tail call i32 @GPIOPinTypeGPIOOutput(i32 1073762304, i32 10)
%3 = tail call i32 @GPIOPinTypeGPIOInput(i32 1073762304, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void error(int toExit, const char *message) {
  printf("%s", message);
  if (toExit == 1) {
    printf(" exiting\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    1160 <error+0x40>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%ebx
je     1148 <error+0x18>
pop    %rbx
ret
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [9 x i8] c" exiting\00"
define void @error(i32 %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = icmp eq i32 %0, 1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
ret void
}
int test_imm_27int32_mem(int *val) {
  return ((*val) & (0x27 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_27int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 39
%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_27int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 39
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ malloc(int);
int foo(int a, int **a1) {
  a = 1;
  int *temp = (int *)malloc(sizeof(int));
  *a1 = temp;
  return a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %rsi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i32*
store i32 %0, i32* %3
store i32** %1, i32*** %4
store i32 1, i32* %3
%6 = call i64 @malloc(i32 4)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32**, i32*** %4
store i32* %8, i32** %9
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32** nocapture writeonly %1) {
%3 = tail call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %1
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_bus(int sig) { printf("BUS\n"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"BUS\0A\00"
define void @catch_bus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c"BUS\00"
define void @catch_bus(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int ctz64(int /*<<< orphan*/);
int cto64(uint64_t val) { return ctz64(~val); }


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

x86 assembly (clang, -O2):
<cto64>:
not    %edi
jmp    1030 <ctz64@plt>

LLVM IR (-O0):
define i32 @cto64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = call i32 @ctz64(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @cto64(i32 %0) {
%2 = xor i32 %0, -1
%3 = tail call i32 @ctz64(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int rmdir(char *);
int main(int argc, char *argv[]) {
  int res;
  if (argc >= 2) {
    res = rmdir(argv[1]);
    if (-1 == res) {
      perror("rmdir");
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     117b <main+0x5b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <rmdir@plt>
mov    %eax,-0x14(%rbp)
mov    $0xffffffff,%eax
cmp    -0x14(%rbp),%eax
jne    1176 <main+0x56>
lea    0xe9b(%rip),%rdi
call   1040 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1182 <main+0x62>
jmp    117b <main+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cmp    $0x2,%edi
jl     1136 <main+0x16>
mov    0x8(%rsi),%rdi
call   1030 <rmdir@plt>
cmp    $0xffffffff,%eax
je     113a <main+0x1a>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xebf(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%ebx
jmp    1136 <main+0x16>

LLVM IR (-O0):
@.str = [6 x i8] c"rmdir\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 2
br i1 %8, label %9, label %19
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @rmdir(i8* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp eq i32 -1, %14
br i1 %15, label %16, label %18
16: ; preds = %9
%17 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %20
18: ; preds = %9
br label %19
19: ; preds = %18, %2
store i32 0, i32* %3
br label %20
20: ; preds = %19, %16
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [6 x i8] c"rmdir\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @rmdir(i8* %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %2, %4, %9
%12 = phi i32 [ 1, %9 ], [ 0, %4 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
long __infer_nondet_long_int();
long random(void) {
  long ret;
  ret = __infer_nondet_long_int();
  if (ret < 0)
    while (1)
      ;
  return ret;
}


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__infer_nondet_long_int@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1138 <random+0x28>
jmp    1133 <random+0x23>
jmp    1133 <random+0x23>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_long_int@plt>
test   %rax,%rax
js     1120 <random+0x10>
pop    %rcx
ret
nop
jmp    1120 <random+0x10>

LLVM IR (-O0):
define i64 @random() {
%1 = alloca i64
%2 = call i64 (...) @__infer_nondet_long_int()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
br label %6
6: ; preds = %5, %6
br label %6
7: ; preds = %0
%8 = load i64, i64* %1
ret i64 %8
}

LLVM IR (-O2):
define i64 @random() {
%1 = tail call i64 (...) @__infer_nondet_long_int()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0, %3
br label %3
4: ; preds = %0
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ getpid();
char *grab_full_cmd_name_of_pid(int /*<<< orphan*/, int *);
char *grab_my_full_cmd_name(int *sz) {
  return grab_full_cmd_name_of_pid(getpid(), sz);
}


x86 assembly (clang, -O0):
<grab_my_full_cmd_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <grab_full_cmd_name_of_pid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grab_my_full_cmd_name>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <grab_full_cmd_name_of_pid@plt>

LLVM IR (-O0):
define i8* @grab_my_full_cmd_name(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @getpid()
%4 = load i32*, i32** %2
%5 = call i8* @grab_full_cmd_name_of_pid(i32 %3, i32* %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @grab_my_full_cmd_name(i32* %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i8* @grab_full_cmd_name_of_pid(i32 %2, i32* %0)
ret i8* %3
}
void ToLower(char *szStr) {
  for (; *szStr; ++szStr)
    if (*szStr >= 'A' && *szStr <= 'Z')
      *szStr = *szStr + ('a' - 'A');
}


x86 assembly (clang, -O0):
<ToLower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115d <ToLower+0x5d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1147 <ToLower+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1147 <ToLower+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0x20,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    114c <ToLower+0x4c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <ToLower+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToLower>:
mov    (%rdi),%al
test   %al,%al
je     112a <ToLower+0x2a>
add    $0x1,%rdi
jmp    111b <ToLower+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <ToLower+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <ToLower+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <ToLower+0x10>
ret

LLVM IR (-O0):
define void @ToLower(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %25, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %28
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sge i32 %10, 65
br i1 %11, label %12, label %24
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %15, 90
br i1 %16, label %17, label %24
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = add nsw i32 %20, 32
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %2
store i8 %22, i8* %23
br label %24
24: ; preds = %17, %12, %7
br label %25
25: ; preds = %24
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %2
br label %3
28: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ToLower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
void i2d_RSAPublicKey(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_RSAPublicKey() {
ret void
}