xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x28() {
  Assert_real((isgraph(40)),
              "/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_isgraph.c",
              205, ("isgraph should be 1 for ("));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x28>:
push   %rax
mov    $0x28,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xcd,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for (\00"
define void @t_isgraph_0x28() {
%1 = call i32 @isgraph(i32 40)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 205, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for (\00"
define void @t_isgraph_0x28() {
%1 = tail call i32 @isgraph(i32 40)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double geoProduct(double a1, double an, double r) {
  double result = 1.0;
  for (; a1 <= an; a1 *= r) {
    result *= a1;
  }
  return result;
}


x86 assembly (clang, -O0):
<geoProduct>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1157 <geoProduct+0x57>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1120 <geoProduct+0x20>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geoProduct>:
ucomisd %xmm0,%xmm1
jae    110f <geoProduct+0xf>
movsd  0xef2(%rip),%xmm0
ret
movapd %xmm0,%xmm3
movsd  0xee5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm3
ucomisd %xmm3,%xmm1
jae    1120 <geoProduct+0x20>
ret

LLVM IR (-O0):
define double @geoProduct(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
store double 1.000000e+00, double* %7
br label %8
8: ; preds = %16, %3
%9 = load double, double* %4
%10 = load double, double* %5
%11 = fcmp ole double %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load double, double* %4
%14 = load double, double* %7
%15 = fmul double %14, %13
store double %15, double* %7
br label %16
16: ; preds = %12
%17 = load double, double* %6
%18 = load double, double* %4
%19 = fmul double %18, %17
store double %19, double* %4
br label %8
20: ; preds = %8
%21 = load double, double* %7
ret double %21
}

LLVM IR (-O2):
define double @geoProduct(double %0, double %1, double %2) {
%4 = fcmp ugt double %0, %1
br i1 %4, label %11, label %5
5: ; preds = %3, %5
%6 = phi double [ %8, %5 ], [ 1.000000e+00, %3 ]
%7 = phi double [ %9, %5 ], [ %0, %3 ]
%8 = fmul double %7, %6
%9 = fmul double %7, %2
%10 = fcmp ugt double %9, %1
br i1 %10, label %11, label %5
11: ; preds = %5, %3
%12 = phi double [ 1.000000e+00, %3 ], [ %8, %5 ]
ret double %12
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t aes_r_con(uint32_t a) {
  uint32_t ans = 1;
  for (; a > 1; --a) {
    ans <<= 1;
    if (ans & 0x100 != 0) {
      ans ^= 0x11b;
    }
  }
  return ans;
}


x86 assembly (clang, -O0):
<aes_r_con>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    114e <aes_r_con+0x4e>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113b <aes_r_con+0x3b>
mov    -0x8(%rbp),%eax
xor    $0x11b,%eax
mov    %eax,-0x8(%rbp)
jmp    1140 <aes_r_con+0x40>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <aes_r_con+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_r_con>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     112a <aes_r_con+0x2a>
add    $0x1,%edi
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %eax,%eax
add    $0xffffffff,%edi
cmp    $0x2,%edi
ja     1120 <aes_r_con+0x20>
ret

LLVM IR (-O0):
define i32 @aes_r_con(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i32, i32* %3
%9 = shl i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %7
%14 = load i32, i32* %3
%15 = xor i32 %14, 283
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %7
br label %17
17: ; preds = %16
%18 = load i32, i32* %2
%19 = add nsw i32 %18, -1
store i32 %19, i32* %2
br label %4
20: ; preds = %4
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @aes_r_con(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = shl i32 %4, 1
%7 = add nsw i32 %5, -1
%8 = icmp ugt i32 %5, 2
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Type definitions */
struct msghdr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ diminuto_ipcl_packet_send_generic(int, struct msghdr const *,
                                                     int /*<<< orphan*/);
ssize_t diminuto_ipcl_packet_send(int fd, const struct msghdr *message) {
  return diminuto_ipcl_packet_send_generic(fd, message, 0);
}


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

x86 assembly (clang, -O2):
<diminuto_ipcl_packet_send>:
xor    %edx,%edx
jmp    1030 <diminuto_ipcl_packet_send_generic@plt>

LLVM IR (-O0):
%struct.msghdr = type { i32 }
define i32 @diminuto_ipcl_packet_send(i32 %0, %struct.msghdr* %1) {
%3 = alloca i32
%4 = alloca %struct.msghdr*
store i32 %0, i32* %3
store %struct.msghdr* %1, %struct.msghdr** %4
%5 = load i32, i32* %3
%6 = load %struct.msghdr*, %struct.msghdr** %4
%7 = call i32 @diminuto_ipcl_packet_send_generic(i32 %5, %struct.msghdr* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
define i32 @diminuto_ipcl_packet_send(i32 %0, %struct.msghdr* %1) {
%3 = tail call i32 @diminuto_ipcl_packet_send_generic(i32 %0, %struct.msghdr* %1, i32 0)
ret i32 %3
}
int *test(int *X, int Y) { return X + Y; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define i32* @test(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
ret i32* %8
}

LLVM IR (-O2):
define i32* @test(i32* readnone %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void esc_code_clear() {
  printf("%s%s", "\x1b[", "m");
  return;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [3 x i8] c"\1B[\00"
@.str.2 = [2 x i8] c"m\00"
define void @esc_code_clear() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [3 x i8] c"\1B[\00"
@.str.2 = [2 x i8] c"m\00"
define void @esc_code_clear() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void MMR3HeapRealloc(void) {}


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

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

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

LLVM IR (-O2):
define void @MMR3HeapRealloc() {
ret void
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int do_pipe(struct tcb *, int);
int sys_pipe2(struct tcb *tcp) { return do_pipe(tcp, 1); }


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

x86 assembly (clang, -O2):
<sys_pipe2>:
mov    $0x1,%esi
jmp    1030 <do_pipe@plt>

LLVM IR (-O0):
%struct.tcb = type { i32 }
define i32 @sys_pipe2(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 @do_pipe(%struct.tcb* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_pipe2(%struct.tcb* %0) {
%2 = tail call i32 @do_pipe(%struct.tcb* %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
scalar_t__ memcpy(int *, int *, int);
int copy_something(int *buf, int len) {
  int *kbuf;
  int ret;
  kbuf = (int *)malloc(sizeof(int) * 800);
  if (len > 800) {
    return -1;
  }
  ret = (int)memcpy(kbuf, buf, len);
  free(kbuf);
  return ret;
}


x86 assembly (clang, -O0):
<copy_something>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    $0xc80,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0x320,-0x14(%rbp)
jle    1166 <copy_something+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1188 <copy_something+0x58>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_something>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%r15
mov    $0xc80,%edi
call   1050 <malloc@plt>
mov    $0xffffffff,%ebx
cmp    $0x320,%ebp
jg     116e <copy_something+0x3e>
mov    %rax,%r14
mov    %rax,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @copy_something(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%8 = call i64 @malloc(i32 3200)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %6
%10 = load i32, i32* %5
%11 = icmp sgt i32 %10, 800
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 -1, i32* %3
br label %22
13: ; preds = %2
%14 = load i32*, i32** %6
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = call i64 @memcpy(i32* %14, i32* %15, i32 %16)
%18 = trunc i64 %17 to i32
store i32 %18, i32* %7
%19 = load i32*, i32** %6
%20 = call i32 @free(i32* %19)
%21 = load i32, i32* %7
store i32 %21, i32* %3
br label %22
22: ; preds = %13, %12
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @copy_something(i32* %0, i32 %1) {
%3 = tail call i64 @malloc(i32 3200)
%4 = inttoptr i64 %3 to i32*
%5 = icmp sgt i32 %1, 800
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i64 @memcpy(i32* %4, i32* %0, i32 %1)
%8 = trunc i64 %7 to i32
%9 = tail call i32 @free(i32* %4)
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %8, %6 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ lckpwdf();
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int lock_files() {
  if (lckpwdf() != 0) {
    fprintf(stderr, "Error locking files: %s\n", strerror(errno));
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<lock_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <lckpwdf@plt>
cmp    $0x0,%rax
je     1181 <lock_files+0x51>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x8(%rbp),%edi
mov    %rax,%rdx
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1188 <lock_files+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_files>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <lckpwdf@plt>
test   %rax,%rax
je     116b <lock_files+0x3b>
mov    0x2e98(%rip),%rax
mov    (%rax),%ebp
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea1(%rip),%rsi
mov    %ebp,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
jmp    1170 <lock_files+0x40>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Error locking files: %s\0A\00"
@errno = global i32 0
define i32 @lock_files() {
%1 = tail call i64 (...) @lckpwdf()
%2 = icmp eq i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %0, %3
%9 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %9
}
void fm2re(mask, dest) char *mask;
char *dest;
{
  char buf[128];
  gm2re(mask, buf);
  sprintf(dest, "^%s$", buf);
}


x86 assembly (clang, -O0):
<fm2re>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    $0x0,%al
call   1030 <gm2re@plt>
mov    -0x10(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    0xea9(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fm2re>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <gm2re@plt>
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"^%s$\00"
define void @fm2re(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [128 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @gm2re to i32 (i8*, i8*, ...)*)(i8* %6, i8* %7)
%9 = load i8*, i8** %4
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%11 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"^%s$\00"
define void @fm2re(i8* %0, i8* nocapture writeonly %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @gm2re to i32 (i8*, i8*, ...)*)(i8* %0, i8* %4)
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usleep(int);
int main() {
  printf("Blah\n");
  usleep(1000000);
  printf("Blih\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xf4240,%edi
call   1040 <usleep@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xf4240,%edi
call   1040 <usleep@plt>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Blah\0A\00"
@.str.1 = [6 x i8] c"Blih\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @usleep(i32 1000000)
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"Blah\00"
@str.2 = [5 x i8] c"Blih\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @usleep(i32 1000000)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int oz_forget_urb(struct urb *urb) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.urb = type opaque
define i32 @oz_forget_urb(%struct.urb* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ df_du(double);
double fmin(int /*<<< orphan*/, int);
double fminus(double u) { return fmin(df_du(u), 0.); }


x86 assembly (clang, -O0):
<fminus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <df_du@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <fmin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fminus>:
push   %rax
call   1040 <df_du@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <fmin@plt>

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

LLVM IR (-O2):
define double @fminus(double %0) {
%2 = tail call i32 @df_du(double %0)
%3 = tail call double @fmin(i32 %2, i32 0)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("hello world");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
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 i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("-9/7=%d\n", -9 / 7);
  printf("9/-7=%d\n", 9 / -7);
  printf("-9%7=%d\n", -9 % 7);
  printf("9%-7=%d\n", 9 % -7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"-9/7=%d\0A\00"
@.str.1 = [9 x i8] c"9/-7=%d\0A\00"
@.str.2 = [9 x i8] c"-9%7=%d\0A\00"
@.str.3 = [9 x i8] c"9%-7=%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 -1)
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 -1)
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 -2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 2)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"-9/7=%d\0A\00"
@.str.1 = [9 x i8] c"9/-7=%d\0A\00"
@.str.2 = [9 x i8] c"-9%7=%d\0A\00"
@.str.3 = [9 x i8] c"9%-7=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 -1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 -2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handle_signal(int signo) { printf("\n"); }


x86 assembly (clang, -O0):
<handle_signal>:
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):
<handle_signal>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @handle_signal(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
ret void
}
void ff_hevc_put_hevc_uni_w_epel_h4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_h4_10_sse4() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ UART_writeHexU8(int);
void UART_writeHexU32(uint32_t v) {
  UART_writeHexU8(v >> 24);
  UART_writeHexU8(v >> 16);
  UART_writeHexU8(v >> 8);
  UART_writeHexU8(v & 0xFF);
}


x86 assembly (clang, -O0):
<UART_writeHexU32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x18,%edi
call   1030 <UART_writeHexU8@plt>
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
call   1030 <UART_writeHexU8@plt>
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
call   1030 <UART_writeHexU8@plt>
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <UART_writeHexU8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART_writeHexU32>:
push   %rbx
mov    %edi,%ebx
sar    $0x18,%edi
call   1030 <UART_writeHexU8@plt>
mov    %ebx,%edi
sar    $0x10,%edi
call   1030 <UART_writeHexU8@plt>
mov    %ebx,%edi
sar    $0x8,%edi
call   1030 <UART_writeHexU8@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <UART_writeHexU8@plt>

LLVM IR (-O0):
define void @UART_writeHexU32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 24
%5 = call i32 @UART_writeHexU8(i32 %4)
%6 = load i32, i32* %2
%7 = ashr i32 %6, 16
%8 = call i32 @UART_writeHexU8(i32 %7)
%9 = load i32, i32* %2
%10 = ashr i32 %9, 8
%11 = call i32 @UART_writeHexU8(i32 %10)
%12 = load i32, i32* %2
%13 = and i32 %12, 255
%14 = call i32 @UART_writeHexU8(i32 %13)
ret void
}

LLVM IR (-O2):
define void @UART_writeHexU32(i32 %0) {
%2 = ashr i32 %0, 24
%3 = tail call i32 @UART_writeHexU8(i32 %2)
%4 = ashr i32 %0, 16
%5 = tail call i32 @UART_writeHexU8(i32 %4)
%6 = ashr i32 %0, 8
%7 = tail call i32 @UART_writeHexU8(i32 %6)
%8 = and i32 %0, 255
%9 = tail call i32 @UART_writeHexU8(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  int a = 0;
  if (a > 0)
    puts("First Condition");
  else if (a < 0)
    puts("Second Condition");
  else
    puts("Third Condition");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
jmp    116d <main+0x5d>
cmpl   $0x0,-0x8(%rbp)
jge    115c <main+0x4c>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
jmp    1168 <main+0x58>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
jmp    116d <main+0x5d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"First Condition\00"
@.str.1 = [17 x i8] c"Second Condition\00"
@.str.2 = [16 x i8] c"Third Condition\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %15
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %7
%13 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
br label %15
15: ; preds = %14, %5
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [16 x i8] c"Third Condition\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AfSrvOnOffset();
int /*<<< orphan*/ RamWrite32A(int, int);
int /*<<< orphan*/ RegWriteA(int, int);
void SrvConAF(unsigned char UcSwcCon) {
  if (UcSwcCon) {
    AfSrvOnOffset();
  } else {
    RegWriteA(0x01E0, 0x02);
    RamWrite32A(0x1504, 0x00000000);
    RamWrite32A(0x151E, 0x00000000);
  }
}


x86 assembly (clang, -O0):
<SrvConAF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1154 <SrvConAF+0x24>
mov    $0x0,%al
call   1030 <AfSrvOnOffset@plt>
jmp    117b <SrvConAF+0x4b>
mov    $0x1e0,%edi
mov    $0x2,%esi
call   1050 <RegWriteA@plt>
mov    $0x1504,%edi
xor    %esi,%esi
call   1040 <RamWrite32A@plt>
mov    $0x151e,%edi
xor    %esi,%esi
call   1040 <RamWrite32A@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SrvConAF>:
test   %edi,%edi
je     113b <SrvConAF+0xb>
xor    %eax,%eax
jmp    1030 <AfSrvOnOffset@plt>
push   %rax
mov    $0x1e0,%edi
mov    $0x2,%esi
call   1050 <RegWriteA@plt>
mov    $0x1504,%edi
xor    %esi,%esi
call   1040 <RamWrite32A@plt>
mov    $0x151e,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <RamWrite32A@plt>

LLVM IR (-O0):
define void @SrvConAF(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @AfSrvOnOffset()
br label %11
7: ; preds = %1
%8 = call i32 @RegWriteA(i32 480, i32 2)
%9 = call i32 @RamWrite32A(i32 5380, i32 0)
%10 = call i32 @RamWrite32A(i32 5406, i32 0)
br label %11
11: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @SrvConAF(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @AfSrvOnOffset()
br label %9
5: ; preds = %1
%6 = tail call i32 @RegWriteA(i32 480, i32 2)
%7 = tail call i32 @RamWrite32A(i32 5380, i32 0)
%8 = tail call i32 @RamWrite32A(i32 5406, i32 0)
br label %9
9: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ x;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ memcmp(long double *, long double *, int);
int main() {
  long double x, y;
  x = 0x1.fffffffffffff8p1022L;
  x *= 2;
  y = 0x1.fffffffffffff8p1023L;
  if (memcmp(&x, &y, sizeof(x)) != 0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
fldt   0xebb(%rip)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fadd   %st,%st(0)
fstpt  -0x20(%rbp)
fldt   0xeba(%rip)
fstpt  -0x30(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x10,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
je     117c <main+0x4c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
fldt   0xec6(%rip)
fld    %st(0)
fstpt  0x10(%rsp)
fstpt  (%rsp)
lea    0x10(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x10,%edx
call   1040 <memcmp@plt>
test   %rax,%rax
jne    1161 <main+0x31>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store i32 0, i32* %1
store x86_fp80 0xK43FDFFFFFFFFFFFFFC00, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = fmul x86_fp80 %4, 0xK40008000000000000000
store x86_fp80 %5, x86_fp80* %2
store x86_fp80 0xK43FEFFFFFFFFFFFFFC00, x86_fp80* %3
%6 = call i64 @memcmp(x86_fp80* %2, x86_fp80* %3, i32 16)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca x86_fp80
%2 = alloca x86_fp80
%3 = bitcast x86_fp80* %1 to i8*
%4 = bitcast x86_fp80* %2 to i8*
store x86_fp80 0xK43FEFFFFFFFFFFFFFC00, x86_fp80* %1
store x86_fp80 0xK43FEFFFFFFFFFFFFFC00, x86_fp80* %2
%5 = call i64 @memcmp(x86_fp80* %1, x86_fp80* %2, i32 16)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
%10 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_memoffs16_ax(unsigned short *memoffs16) {
  put8(0x66);
  put8(0xA3);
  put32((unsigned int)(memoffs16));
}


x86 assembly (clang, -O0):
<mov_memoffs16_ax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0xa3,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_memoffs16_ax>:
push   %rbx
mov    %rdi,%rbx
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0xa3,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_memoffs16_ax(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = call i32 @put8(i32 102)
%4 = call i32 @put8(i32 163)
%5 = load i16*, i16** %2
%6 = ptrtoint i16* %5 to i32
%7 = call i32 @put32(i32 %6)
ret void
}

LLVM IR (-O2):
define void @mov_memoffs16_ax(i16* %0) {
%2 = tail call i32 @put8(i32 102)
%3 = tail call i32 @put8(i32 163)
%4 = ptrtoint i16* %0 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @put32(i32 %5)
ret void
}
int main() {
  char arr[1];
  arr[0] = 1;
  return (int)arr[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x1,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
store i8 1, i8* %3
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
double Sleef_tan_u10(double x) { return __builtin_tan(x); }


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

x86 assembly (clang, -O2):
<Sleef_tan_u10>:
jmp    1030 <tan@plt>

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

LLVM IR (-O2):
define double @Sleef_tan_u10(double %0) {
%2 = tail call double @tan(double %0)
ret double %2
}
void usr1_handler(int signo) {}


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

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

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

LLVM IR (-O2):
define void @usr1_handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int somarpar(int *, int);
int main(void) {
  int vetor[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  printf("a soma dos numeros pares eh: %i\n", somarpar(vetor, 10));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <somarpar@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <somarpar@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.vetor = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [33 x i8] c"a soma dos numeros pares eh: %i\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @somarpar(i32* %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.vetor = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [33 x i8] c"a soma dos numeros pares eh: %i\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @somarpar(i32* %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int strlen(char *);
char *string_checkinput_newline(char *input) {
  if ((strlen(input) > 0) && (input[strlen(input) - 1] == '\n'))
    input[strlen(input) - 1] = '\0';
  return input;
}


x86 assembly (clang, -O0):
<string_checkinput_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jle    1179 <string_checkinput_newline+0x69>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1179 <string_checkinput_newline+0x69>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_checkinput_newline>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
jle    113d <string_checkinput_newline+0x2d>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    113d <string_checkinput_newline+0x2d>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @string_checkinput_newline(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %16
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = tail call i32 @strlen(i8* %0)
%13 = add nsw i32 %12, -1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
br label %16
16: ; preds = %11, %4, %1
ret i8* %0
}
/* Variables and functions */
scalar_t__ isafailure(int);
void massage_failure(int fail_hard, int current_ec, int *collect_ec) {
  if (fail_hard) {
    if (!(*collect_ec && isafailure(*collect_ec))) {
      *collect_ec = current_ec;
    }
  } else {
    *collect_ec = current_ec;
  }
}


x86 assembly (clang, -O0):
<massage_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115c <massage_failure+0x4c>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     114e <massage_failure+0x3e>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <isafailure@plt>
cmp    $0x0,%rax
jne    1157 <massage_failure+0x47>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1165 <massage_failure+0x55>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<massage_failure>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
test   %edi,%edi
je     112c <massage_failure+0x1c>
mov    (%rbx),%edi
test   %edi,%edi
je     112c <massage_failure+0x1c>
call   1030 <isafailure@plt>
test   %rax,%rax
jne    112e <massage_failure+0x1e>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @massage_failure(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* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %22
9: ; preds = %3
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i32*, i32** %6
%15 = load i32, i32* %14
%16 = call i64 @isafailure(i32 %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %13, %9
%19 = load i32, i32* %5
%20 = load i32*, i32** %6
store i32 %19, i32* %20
br label %21
21: ; preds = %18, %13
br label %25
22: ; preds = %3
%23 = load i32, i32* %5
%24 = load i32*, i32** %6
store i32 %23, i32* %24
br label %25
25: ; preds = %22, %21
ret void
}

LLVM IR (-O2):
define void @massage_failure(i32 %0, i32 %1, i32* nocapture %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = tail call i64 @isafailure(i32 %6)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3, %5, %8
store i32 %1, i32* %2
br label %12
12: ; preds = %11, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_wsr(char *, unsigned int);
void wsr(unsigned v) { __builtin_arm_wsr("1:2:3:4:5", v); }


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

x86 assembly (clang, -O2):
<wsr>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <__builtin_arm_wsr@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"1:2:3:4:5\00"
define void @wsr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__builtin_arm_wsr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"1:2:3:4:5\00"
define void @wsr(i32 %0) {
%2 = tail call i32 @__builtin_arm_wsr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ match_indirect(char **, void *);
bool match_star(char **p, void *bd) {
  while (match_indirect(p, bd))
    ;
  return true;
}


x86 assembly (clang, -O0):
<match_star>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <match_indirect@plt>
cmp    $0x0,%rax
je     113c <match_star+0x2c>
jmp    1120 <match_star+0x10>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_star>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <match_indirect@plt>
test   %rax,%rax
jne    1120 <match_star+0x10>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @match_star(i8** %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i64 @match_indirect(i8** %0, i8* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ my_task(double *, double *);
void one_unregistered_array_attrs(void) {
  double p[12];
  double q[23] __attribute__((heap_allocated, registered));
  my_task(p, q);
}


x86 assembly (clang, -O0):
<one_unregistered_array_attrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
lea    -0x60(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1030 <my_task@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_unregistered_array_attrs>:
sub    $0x118,%rsp
mov    %rsp,%rdi
lea    0x60(%rsp),%rsi
call   1030 <my_task@plt>
add    $0x118,%rsp
ret

LLVM IR (-O0):
define void @one_unregistered_array_attrs() {
%1 = alloca [12 x double]
%2 = alloca [23 x double]
%3 = getelementptr inbounds [12 x double], [12 x double]* %1, i64 0, i64 0
%4 = getelementptr inbounds [23 x double], [23 x double]* %2, i64 0, i64 0
%5 = call i32 @my_task(double* %3, double* %4)
ret void
}

LLVM IR (-O2):
define void @one_unregistered_array_attrs() {
%1 = alloca [12 x double]
%2 = alloca [23 x double]
%3 = bitcast [12 x double]* %1 to i8*
%4 = bitcast [23 x double]* %2 to i8*
%5 = getelementptr inbounds [12 x double], [12 x double]* %1, i64 0, i64 0
%6 = getelementptr inbounds [23 x double], [23 x double]* %2, i64 0, i64 0
%7 = call i32 @my_task(double* %5, double* %6)
ret void
}