xunge/DecIR huggingface dataset:
/* Variables and functions */
int send(int, char *, int, int /*<<< orphan*/);
int send_socket(int sockfd, char *buffer, int to_send) {
  int sent = 0;
  if ((sockfd != -1) && buffer && (to_send > 0)) {
    sent = send(sockfd, buffer, to_send, 0);
  }
  return sent;
}


x86 assembly (clang, -O0):
<send_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     115c <send_socket+0x4c>
cmpq   $0x0,-0x10(%rbp)
je     115c <send_socket+0x4c>
cmpl   $0x0,-0x14(%rbp)
jle    115c <send_socket+0x4c>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_socket>:
cmp    $0xffffffff,%edi
je     1125 <send_socket+0x15>
test   %rsi,%rsi
je     1125 <send_socket+0x15>
test   %edx,%edx
jle    1125 <send_socket+0x15>
xor    %ecx,%ecx
jmp    1030 <send@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @send_socket(i32 %0, i8* %1, i32 %2) {
%4 = icmp ne i32 %0, -1
%5 = icmp ne i8* %1, null
%6 = and i1 %4, %5
%7 = icmp sgt i32 %2, 0
%8 = and i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i32 @send(i32 %0, i8* %1, i32 %2, i32 0)
br label %11
11: ; preds = %9, %3
%12 = phi i32 [ %10, %9 ], [ 0, %3 ]
ret i32 %12
}
extern double adding(double a, double b, double c) { return a + b + c; }


x86 assembly (clang, -O0):
<adding>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<adding>:
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @adding(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fadd double %7, %8
%10 = load double, double* %6
%11 = fadd double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @adding(double %0, double %1, double %2) {
%4 = fadd double %0, %1
%5 = fadd double %4, %2
ret double %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void dns_buf_set_rcode(uint8_t *buf, uint8_t code) {
  buf[3] &= 0xF0;
  buf[3] |= code;
}


x86 assembly (clang, -O0):
<dns_buf_set_rcode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xf0,%ecx
mov    %ecx,0xc(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     0xc(%rax),%ecx
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_buf_set_rcode>:
mov    $0xf0,%eax
and    0xc(%rdi),%eax
or     %esi,%eax
mov    %eax,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @dns_buf_set_rcode(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = load i32, i32* %3
%5 = and i32 %4, 240
%6 = or i32 %5, %1
store i32 %6, i32* %3
ret void
}
void osd_clone_update_pan(int pan) {}


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

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

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

LLVM IR (-O2):
define void @osd_clone_update_pan(i32 %0) {
ret void
}
void test_31_2(int *mem) { __atomic_or_fetch(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_31_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
or     %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    114b <test_31_2+0x4b>
jmp    1122 <test_31_2+0x22>
mov    -0x18(%rbp),%ecx
mov    -0x24(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_31_2>:
lock orl $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test_31_2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32 1, i32* %3
%6 = load i32, i32* %3
%7 = atomicrmw or i32* %5, i32 %6 acq_rel
%8 = or i32 %7, %6
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test_31_2(i32* nocapture %0) {
%2 = atomicrmw or i32* %0, i32 1 acq_rel
ret void
}
void drawItemList() {}


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

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

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

LLVM IR (-O2):
define void @drawItemList() {
ret void
}
/* Type definitions */
struct mntent {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int addmntent(FILE *fp __attribute__((unused)),
              const struct mntent *mnt __attribute__((unused))) {
  return 1;
}


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

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

LLVM IR (-O0):
%struct.mntent = type { i32 }
define i32 @addmntent(i32* %0, %struct.mntent* %1) {
%3 = alloca i32*
%4 = alloca %struct.mntent*
store i32* %0, i32** %3
store %struct.mntent* %1, %struct.mntent** %4
ret i32 1
}

LLVM IR (-O2):
%struct.mntent = type { i32 }
define i32 @addmntent(i32* nocapture readnone %0, %struct.mntent* nocapture readnone %1) {
ret i32 1
}
int getTTyStat(int fd, void *sg, int sz) { return -1; }


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

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

LLVM IR (-O0):
define i32 @getTTyStat(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
ret i32 -1
}

LLVM IR (-O2):
define i32 @getTTyStat(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int mystrlen(uint8_t *in_buf) {
  int c = 0;
  while (in_buf[c] != 0)
    c++;
  return c;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1130 <mystrlen+0x30>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <mystrlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mystrlen(i64* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i64, i64* %0, i64 %3
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
int roadmap_locator_no_download(int fips) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @roadmap_locator_no_download(i32 %0) {
ret i32 0
}
/* Variables and functions */
long double __qacos(long double);
long double __q_acos(long double *arg) { return (__qacos(*arg)); }


x86 assembly (clang, -O0):
<__q_acos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <__qacos@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__q_acos>:
sub    $0x18,%rsp
fldt   (%rdi)
fstpt  (%rsp)
call   1030 <__qacos@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define x86_fp80 @__q_acos(x86_fp80* nocapture %0) {
%2 = load x86_fp80, x86_fp80* %0
%3 = tail call x86_fp80 @__qacos(x86_fp80 %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x37() {
  Assert_real((isprint(55)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              280, ("isprint should be 1 for 7"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for 7\00"
define void @t_isprint_0x37() {
%1 = tail call i32 @isprint(i32 55)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 280, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a();
void b2() { a(); }


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

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

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

LLVM IR (-O2):
define void @b2() {
%1 = tail call i32 (...) @a()
ret void
}
void reset_keyboard(void) {}


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

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

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

LLVM IR (-O2):
define void @reset_keyboard() {
ret void
}
/* Variables and functions */
int trio_fpclassify_and_signbit(double, int *);
__attribute__((visibility("default"))) int trio_fpclassify(double number) {
  int dummy;
  return trio_fpclassify_and_signbit(number, &dummy);
}


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

x86 assembly (clang, -O2):
<trio_fpclassify>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <trio_fpclassify_and_signbit@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @trio_fpclassify(double %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @trio_fpclassify_and_signbit(double %0, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ handle_62(int /*<<< orphan*/);
int gen_62(void) {
  handle_62(0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @gen_62() {
%1 = tail call i32 @handle_62(i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *);
void appaserver_user_update(FILE *update_pipe,
                            char *injection_escaped_encrypted_password,
                            char *login_name) {
  fprintf(update_pipe, "%s^password^%s\n", login_name,
          injection_escaped_encrypted_password);
}


x86 assembly (clang, -O0):
<appaserver_user_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appaserver_user_update>:
mov    %rsi,%rcx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"%s^password^%s\0A\00"
define void @appaserver_user_update(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %6
%9 = load i8*, i8** %5
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s^password^%s\0A\00"
define void @appaserver_user_update(i32* nocapture %0, i8* %1, i8* %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ int2hex_result;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
char *Int_To_Hex(uint64_t int2hex) {
  static char int2hex_result[800] = "\0";
  memset(int2hex_result, 0, sizeof(int2hex_result));
  sprintf(int2hex_result, "%02lX", int2hex);
  return int2hex_result;
}


x86 assembly (clang, -O0):
<Int_To_Hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0x2f0e(%rip),%rdi
xor    %esi,%esi
mov    $0x320,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%edx
lea    0x2ef8(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ee5(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int_To_Hex>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x2f13(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x320,%edx
call   1030 <memset@plt>
lea    0xebd(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1040 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@Int_To_Hex.int2hex_result = internal global [800 x i8] zeroinitializer
@.str = [6 x i8] c"%02lX\00"
define i8* @Int_To_Hex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @memset(i8* getelementptr inbounds ([800 x i8], [800 x i8]* @Int_To_Hex.int2hex_result, i64 0, i64 0), i32 0, i32 800)
%4 = load i32, i32* %2
%5 = call i32 @sprintf(i8* getelementptr inbounds ([800 x i8], [800 x i8]* @Int_To_Hex.int2hex_result, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i8* getelementptr inbounds ([800 x i8], [800 x i8]* @Int_To_Hex.int2hex_result, i64 0, i64 0)
}

LLVM IR (-O2):
@Int_To_Hex.int2hex_result = internal global [800 x i8] zeroinitializer
@.str = [6 x i8] c"%02lX\00"
define i8* @Int_To_Hex(i32 %0) {
%2 = tail call i32 @memset(i8* getelementptr inbounds ([800 x i8], [800 x i8]* @Int_To_Hex.int2hex_result, i64 0, i64 0), i32 0, i32 800)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([800 x i8], [800 x i8]* @Int_To_Hex.int2hex_result, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([800 x i8], [800 x i8]* @Int_To_Hex.int2hex_result, i64 0, i64 0)
}
int intcmp(int *a, int *b) { return (*a > *b) ? 1 : 0; }


x86 assembly (clang, -O0):
<intcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovg  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcmp>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

LLVM IR (-O0):
define i32 @intcmp(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = icmp sgt i32 %6, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @intcmp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp sgt i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ show_state_filter(int /*<<< orphan*/);
__attribute__((always_)) void show_state(void) { show_state_filter(0); }


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

x86 assembly (clang, -O2):
<show_state>:
xor    %edi,%edi
jmp    1030 <show_state_filter@plt>

LLVM IR (-O0):
define void @show_state() {
%1 = call i32 @show_state_filter(i32 0)
ret void
}

LLVM IR (-O2):
define void @show_state() {
%1 = tail call i32 @show_state_filter(i32 0)
ret void
}
/* Variables and functions */
double fabs(scalar_t__);
scalar_t__ pow(double, double);
int main(int argc, char const *argv[]) {
  if (fabs(pow(2.5, 2.5) - 9.882117688) < 0.01) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm1
movaps %xmm1,%xmm0
call   1040 <pow@plt>
cvtsi2sd %rax,%xmm0
movsd  0xeb5(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xe94(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1182 <main+0x62>
movl   $0x0,-0x4(%rbp)
jmp    1189 <main+0x69>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movaps %xmm0,%xmm1
call   1040 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xec7(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
movsd  0xebd(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @pow(double 2.500000e+00, double 2.500000e+00)
%7 = sitofp i64 %6 to double
%8 = fsub double %7, 0x4023C3A4EDFA5DC3
%9 = fptosi double %8 to i64
%10 = call double @fabs(i64 %9)
%11 = fcmp olt double %10, 1.000000e-02
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %14
13: ; preds = %2
store i32 1, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @pow(double 2.500000e+00, double 2.500000e+00)
%4 = sitofp i64 %3 to double
%5 = fadd double %4, 0xC023C3A4EDFA5DC3
%6 = fptosi double %5 to i64
%7 = tail call double @fabs(i64 %6)
%8 = fcmp uge double %7, 1.000000e-02
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_line_to(int /*<<< orphan*/, float, float);
void g2_line_to_(float *dev, float *x, float *y) {
  g2_line_to(dtoi(*dev), *x, *y);
}


x86 assembly (clang, -O0):
<g2_line_to_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
call   1040 <g2_line_to@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_line_to_>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <dtoi@plt>
movss  (%rbx),%xmm0
movss  (%r14),%xmm1
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <g2_line_to@plt>

LLVM IR (-O0):
define void @g2_line_to_(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = call i32 @dtoi(float %8)
%10 = load float*, float** %5
%11 = load float, float* %10
%12 = load float*, float** %6
%13 = load float, float* %12
%14 = call i32 @g2_line_to(i32 %9, float %11, float %13)
ret void
}

LLVM IR (-O2):
define void @g2_line_to_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = tail call i32 @dtoi(float %4)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = tail call i32 @g2_line_to(i32 %5, float %6, float %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
void c_pomp_destroy_lock_(omp_lock_t *s) { (void)0; }


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

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

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

LLVM IR (-O2):
define void @c_pomp_destroy_lock_(i32* nocapture %0) {
ret void
}
int mkstemp(path)
char *path;
{
  int fd;
  return (_gettemp(path, &fd) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkstemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <_gettemp@plt>
cmp    $0x0,%eax
je     113f <mkstemp+0x2f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114c <mkstemp+0x3c>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    114c <mkstemp+0x3c>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemp>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <_gettemp@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkstemp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i32*, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, ...)*)(i8* %4, i32* %3)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %7
%11 = phi i32 [ %8, %7 ], [ -1, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i8*, i32*, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, ...)*)(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 0
%6 = load i32, i32* %2
%7 = select i1 %5, i32 -1, i32 %6
ret i32 %7
}
void XAllPlanes() {}


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

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

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

LLVM IR (-O2):
define void @XAllPlanes() {
ret void
}
int helloworld(int a) { return a + 2; }


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

x86 assembly (clang, -O2):
<helloworld>:
lea    0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @helloworld(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int opt_version(char *opt) {
  if (strcmp(opt, "-V") == 0)
    return 1;
  if (strcmp(opt, "--version") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<opt_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <opt_version+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_version+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <opt_version+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_version+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_version>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <opt_version+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"-V\00"
@.str.1 = [10 x i8] c"--version\00"
define i32 @opt_version(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ atoi(char *);
char *getenv(char const *);
int getenv_byte(const char *v, char *y) {
  char *x = getenv(v);
  if (!x)
    return 0;
  *y = (char)atoi(x);
  return 1;
}


x86 assembly (clang, -O0):
<getenv_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1154 <getenv_byte+0x34>
movl   $0x0,-0x4(%rbp)
jmp    116c <getenv_byte+0x4c>
mov    -0x20(%rbp),%rdi
call   1040 <atoi@plt>
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getenv_byte>:
push   %rbx
mov    %rsi,%rbx
call   1030 <getenv@plt>
test   %rax,%rax
je     113f <getenv_byte+0x1f>
mov    %rax,%rdi
call   1040 <atoi@plt>
mov    %al,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @getenv_byte(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = tail call i8* @getenv(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i64 @atoi(i8* %3)
%7 = trunc i64 %6 to i8
store i8 %7, i8* %1
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %9
}
int ml_perms(int n1, int n2) { return 0; }


x86 assembly (clang, -O0):
<ml_perms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ml_perms(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool mp2vgop_get_closedgop(const uint8_t *p_mp2vgop) {
  return !!(p_mp2vgop[7] & 0x40);
}


x86 assembly (clang, -O0):
<mp2vgop_get_closedgop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
and    $0x40,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vgop_get_closedgop>:
mov    0x1c(%rdi),%eax
shr    $0x6,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @mp2vgop_get_closedgop(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 7
%5 = load i32, i32* %4
%6 = and i32 %5, 64
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mp2vgop_get_closedgop(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 7
%3 = load i32, i32* %2
%4 = lshr i32 %3, 6
%5 = and i32 %4, 1
ret i32 %5
}
int right(int i) { return (i << 1) + 1; }


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

x86 assembly (clang, -O2):
<right>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @right(i32 %0) {
%2 = shl i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
void llama_quit(void) {}


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

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

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

LLVM IR (-O2):
define void @llama_quit() {
ret void
}
/* Variables and functions */
float pi_even(double, float);
float pi(float num_its) { return pi_even(0.0, num_its); }


x86 assembly (clang, -O0):
<pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
xorps  %xmm0,%xmm0
call   1030 <pi_even@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pi>:
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
jmp    1030 <pi_even@plt>

LLVM IR (-O0):
define float @pi(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @pi_even(double 0.000000e+00, float %3)
ret float %4
}

LLVM IR (-O2):
define float @pi(float %0) {
%2 = tail call float @pi_even(double 0.000000e+00, float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgpop2(void) { gen("popq\t%rcx"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"popq\09%rcx\00"
define void @cgpop2() {
%1 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"popq\09%rcx\00"
define void @cgpop2() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
long double test_fdiml(long double x, long double y) {
  return __builtin_fdiml(x, y);
}


x86 assembly (clang, -O0):
<test_fdiml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <fdiml@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fdiml>:
jmp    1030 <fdiml@plt>

LLVM IR (-O0):
define x86_fp80 @test_fdiml(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call x86_fp80 @fdiml(x86_fp80 %5, x86_fp80 %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @test_fdiml(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @fdiml(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, void *, size_t);
size_t memcopy(void *dest, void *src, size_t offset, size_t len, size_t max) {
  if (len <= (max - offset)) {
    memcpy(&((char *)dest)[offset], src, len);
    return (len);
  }
  return 0;
}


x86 assembly (clang, -O0):
<memcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    -0x20(%rbp),%rcx
cmp    %rcx,%rax
ja     1163 <memcopy+0x53>
mov    -0x10(%rbp),%rdi
add    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116b <memcopy+0x5b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcopy>:
push   %rbx
sub    %rdx,%r8
cmp    %rcx,%r8
jae    111d <memcopy+0xd>
xor    %ebx,%ebx
jmp    112b <memcopy+0x1b>
mov    %rcx,%rbx
add    %rdx,%rdi
mov    %rcx,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @memcopy(i8* %0, i8* %1, i64 %2, i64 %3, i64 %4) {
%6 = sub i64 %4, %2
%7 = icmp ult i64 %6, %3
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = getelementptr inbounds i8, i8* %0, i64 %2
%10 = tail call i32 @memcpy(i8* %9, i8* %1, i64 %3)
br label %11
11: ; preds = %5, %8
%12 = phi i64 [ %3, %8 ], [ 0, %5 ]
ret i64 %12
}
int convert_to_grayscale(unsigned int rgba) {
  int r, g, b, a, rgb, mask = 0xff;
  b = (rgba >> 0) & mask;
  g = (rgba >> 8) & mask;
  r = (rgba >> 16) & mask;
  a = (rgba >> 24) & mask;
  rgb = (r + g + b) / 3;
  return (a << 24) + (rgb << 16) + (rgb << 8) + (rgb << 0);
}


x86 assembly (clang, -O0):
<convert_to_grayscale>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xff,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x0,%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x18,%eax
mov    -0x18(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%ecx
shl    $0x0,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_to_grayscale>:
mov    %edi,%ecx
movzbl %cl,%eax
movzbl %ch,%edx
mov    %edi,%esi
shr    $0x10,%esi
movzbl %sil,%esi
and    $0xff000000,%ecx
add    %eax,%edx
add    %esi,%edx
imul   $0xaaab,%edx,%eax
shr    $0x11,%eax
imul   $0x10100,%eax,%edx
or     %ecx,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @convert_to_grayscale(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %2
store i32 255, i32* %8
%9 = load i32, i32* %2
%10 = lshr i32 %9, 0
%11 = load i32, i32* %8
%12 = and i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %2
%14 = lshr i32 %13, 8
%15 = load i32, i32* %8
%16 = and i32 %14, %15
store i32 %16, i32* %4
%17 = load i32, i32* %2
%18 = lshr i32 %17, 16
%19 = load i32, i32* %8
%20 = and i32 %18, %19
store i32 %20, i32* %3
%21 = load i32, i32* %2
%22 = lshr i32 %21, 24
%23 = load i32, i32* %8
%24 = and i32 %22, %23
store i32 %24, i32* %6
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = add nsw i32 %25, %26
%28 = load i32, i32* %5
%29 = add nsw i32 %27, %28
%30 = sdiv i32 %29, 3
store i32 %30, i32* %7
%31 = load i32, i32* %6
%32 = shl i32 %31, 24
%33 = load i32, i32* %7
%34 = shl i32 %33, 16
%35 = add nsw i32 %32, %34
%36 = load i32, i32* %7
%37 = shl i32 %36, 8
%38 = add nsw i32 %35, %37
%39 = load i32, i32* %7
%40 = shl i32 %39, 0
%41 = add nsw i32 %38, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @convert_to_grayscale(i32 %0) {
%2 = and i32 %0, 255
%3 = lshr i32 %0, 8
%4 = and i32 %3, 255
%5 = lshr i32 %0, 16
%6 = and i32 %5, 255
%7 = and i32 %0, -16777216
%8 = add nuw nsw i32 %4, %2
%9 = add nuw nsw i32 %8, %6
%10 = trunc i32 %9 to i16
%11 = udiv i16 %10, 3
%12 = zext i16 %11 to i32
%13 = mul nuw nsw i32 %12, 65792
%14 = or i32 %7, %12
%15 = add i32 %14, %13
ret i32 %15
}
/* Type definitions */
struct map {
  int dummy;
};

/* Variables and functions */
void *map_ipop(struct map *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void *map_pop(struct map *m, char *key) {
  return map_ipop(m, key, strlen(key));
}


x86 assembly (clang, -O0):
<map_pop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <map_ipop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_pop>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <map_ipop@plt>

LLVM IR (-O0):
%struct.map = type { i32 }
define i8* @map_pop(%struct.map* %0, i8* %1) {
%3 = alloca %struct.map*
%4 = alloca i8*
store %struct.map* %0, %struct.map** %3
store i8* %1, i8** %4
%5 = load %struct.map*, %struct.map** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @map_ipop(%struct.map* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
%struct.map = type { i32 }
define i8* @map_pop(%struct.map* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @map_ipop(%struct.map* %0, i8* %1, i32 %3)
ret i8* %4
}
char *langRomTypeGameMaster2() { return "Game Master 2 (SRAM)"; }


x86 assembly (clang, -O0):
<langRomTypeGameMaster2>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"Game Master 2 (SRAM)\00"
define i8* @langRomTypeGameMaster2() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"Game Master 2 (SRAM)\00"
define i8* @langRomTypeGameMaster2() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ktell(char *);
int /*<<< orphan*/ memory_init();
int /*<<< orphan*/ shell_init();
int /*<<< orphan*/ shell_start();
int /*<<< orphan*/ terminal_init();
void kmain(void) {
  terminal_init();
  shell_init();
  memory_init();
  ktell("AndromedOS loaded successfully!");
  shell_start();
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <terminal_init@plt>
mov    $0x0,%al
call   1060 <shell_init@plt>
mov    $0x0,%al
call   1030 <memory_init@plt>
lea    0xe90(%rip),%rdi
call   1070 <ktell@plt>
mov    $0x0,%al
call   1040 <shell_start@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmain>:
push   %rax
xor    %eax,%eax
call   1050 <terminal_init@plt>
xor    %eax,%eax
call   1060 <shell_init@plt>
xor    %eax,%eax
call   1030 <memory_init@plt>
lea    0xe93(%rip),%rdi
call   1070 <ktell@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <shell_start@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"AndromedOS loaded successfully!\00"
define void @kmain() {
%1 = call i32 (...) @terminal_init()
%2 = call i32 (...) @shell_init()
%3 = call i32 (...) @memory_init()
%4 = call i32 @ktell(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @shell_start()
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"AndromedOS loaded successfully!\00"
define void @kmain() {
%1 = tail call i32 (...) @terminal_init()
%2 = tail call i32 (...) @shell_init()
%3 = tail call i32 (...) @memory_init()
%4 = tail call i32 @ktell(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @shell_start()
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ ui32Base;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int _PWMGenValid(int);
void PWMDeadBandDisable(uint32_t ui32Base, uint32_t ui32Gen) {
  ASSERT((ui32Base == 0x40028000) || (ui32Base == 0x40029000));
  ASSERT(_PWMGenValid(ui32Gen));
  (*((volatile uint32_t *)(((ui32Base) + (ui32Gen)) + 0x00000028))) &=
      ~(0x00000001);
}


x86 assembly (clang, -O0):
<PWMDeadBandDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x40028000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     114d <PWMDeadBandDisable+0x2d>
cmpl   $0x40029000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    -0x8(%rbp),%edi
call   1030 <_PWMGenValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x28,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMDeadBandDisable>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40028000,%eax
sete   %dil
call   1040 <ASSERT@plt>
mov    %r14d,%edi
call   1030 <_PWMGenValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
lea    (%rbx,%r14,1),%eax
add    $0x28,%eax
cltq
andl   $0xfffffffe,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @PWMDeadBandDisable(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 = icmp eq i32 %5, 1073905664
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1073909760
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = call i32 @_PWMGenValid(i32 %14)
%16 = call i32 @ASSERT(i32 %15)
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = add nsw i32 %17, %18
%20 = add nsw i32 %19, 40
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
%23 = load volatile i32, i32* %22
%24 = and i32 %23, -2
store volatile i32 %24, i32* %22
ret void
}

LLVM IR (-O2):
define void @PWMDeadBandDisable(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073905664
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = tail call i32 @_PWMGenValid(i32 %1)
%8 = tail call i32 @ASSERT(i32 %7)
%9 = add i32 %0, 40
%10 = add i32 %9, %1
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = and i32 %13, -2
store volatile i32 %14, i32* %12
ret void
}