xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EOVERFLOW;
long INT_MAX;
long INT_MIN;
int /*<<< orphan*/ errno;
int f_sum(int acc, int next) {
  long t_sum = acc + next;
  if (t_sum < INT_MIN || t_sum > INT_MAX)
    errno = EOVERFLOW;
  return acc + next;
}


x86 assembly (clang, -O0):
<f_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2eb7(%rip),%rcx
cmp    (%rcx),%rax
jl     113e <f_sum+0x3e>
mov    -0x10(%rbp),%rax
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
jle    1150 <f_sum+0x50>
mov    0x2eab(%rip),%rax
mov    (%rax),%ecx
mov    0x2e7a(%rip),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_sum>:
mov    %edi,%eax
add    %esi,%eax
movslq %eax,%rcx
mov    0x2eca(%rip),%rdx
cmp    %rcx,(%rdx)
jg     1120 <f_sum+0x20>
mov    0x2ec6(%rip),%rdx
cmp    %rcx,(%rdx)
jl     1120 <f_sum+0x20>
ret
mov    0x2ec9(%rip),%rcx
mov    (%rcx),%ecx
mov    0x2e98(%rip),%rdx
mov    %ecx,(%rdx)
ret

LLVM IR (-O0):
@INT_MIN = global i64 0
@INT_MAX = global i64 0
@EOVERFLOW = global i32 0
@errno = global i32 0
define i32 @f_sum(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = sext i32 %8 to i64
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = load i64, i64* @INT_MIN
%12 = icmp slt i64 %10, %11
br i1 %12, label %17, label %13
13: ; preds = %2
%14 = load i64, i64* %5
%15 = load i64, i64* @INT_MAX
%16 = icmp sgt i64 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13, %2
%18 = load i32, i32* @EOVERFLOW
store i32 %18, i32* @errno
br label %19
19: ; preds = %17, %13
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = add nsw i32 %20, %21
ret i32 %22
}

LLVM IR (-O2):
@INT_MIN = global i64 0
@INT_MAX = global i64 0
@EOVERFLOW = global i32 0
@errno = global i32 0
define i32 @f_sum(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sext i32 %3 to i64
%5 = load i64, i64* @INT_MIN
%6 = icmp sgt i64 %5, %4
%7 = load i64, i64* @INT_MAX
%8 = icmp slt i64 %7, %4
%9 = select i1 %6, i1 true, i1 %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* @EOVERFLOW
store i32 %11, i32* @errno
br label %12
12: ; preds = %2, %10
ret i32 %3
}
char *reverse(char str[]) {
  static int i = 0;
  static char rev[100];
  if (*str) {
    reverse(str + 1);
    rev[i++] = *str;
  }
  return rev;
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <reverse+0x4a>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <reverse@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%dl
mov    0x2efe(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2ef3(%rip)
movslq %eax,%rcx
lea    0x2ef9(%rip),%rax
mov    %dl,(%rax,%rcx,1)
lea    0x2eef(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rbx
cmpb   $0x0,(%rdi)
je     113e <reverse+0x2e>
mov    %rdi,%rbx
add    $0x1,%rdi
call   1030 <reverse@plt>
mov    (%rbx),%al
movslq 0x2f15(%rip),%rcx
lea    0x1(%rcx),%edx
mov    %edx,0x2f0c(%rip)
lea    0x2f15(%rip),%rdx
mov    %al,(%rcx,%rdx,1)
lea    0x2f0b(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@reverse.i = internal global i32 0
@reverse.rev = internal global [100 x i8] zeroinitializer
define i8* @reverse(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = call i8* @reverse(i8* %8)
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = load i32, i32* @reverse.i
%13 = add nsw i32 %12, 1
store i32 %13, i32* @reverse.i
%14 = sext i32 %12 to i64
%15 = getelementptr inbounds [100 x i8], [100 x i8]* @reverse.rev, i64 0, i64 %14
store i8 %11, i8* %15
br label %16
16: ; preds = %6, %1
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @reverse.rev, i64 0, i64 0)
}

LLVM IR (-O2):
@reverse.i = internal unnamed_addr global i32 0
@reverse.rev = internal global [100 x i8] zeroinitializer
define i8* @reverse(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1, %5
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @reverse.rev, i64 0, i64 0)
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i8* @reverse(i8* %6)
%8 = load i8, i8* %0
%9 = load i32, i32* @reverse.i
%10 = add nsw i32 %9, 1
store i32 %10, i32* @reverse.i
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds [100 x i8], [100 x i8]* @reverse.rev, i64 0, i64 %11
store i8 %8, i8* %12
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_a_dot(void) {
  fprintf(stderr, ".");
  fflush(stderr);
}


x86 assembly (clang, -O0):
<print_a_dot>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_a_dot>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c".\00"
define void @print_a_dot() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c".\00"
define void @print_a_dot() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
void packi32(uint8_t *buf, int32_t i) {
  uint32_t i2 = i;
  *buf++ = i2 >> 24;
  *buf++ = i2 >> 16;
  *buf++ = i2 >> 8;
  *buf++ = i2;
}


x86 assembly (clang, -O0):
<packi32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<packi32>:
mov    %esi,%eax
sar    $0x18,%eax
mov    %eax,(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
mov    %eax,0x4(%rdi)
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,0x8(%rdi)
mov    %esi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @packi32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = ashr i32 %7, 24
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i32 1
store i32* %10, i32** %3
store i32 %8, i32* %9
%11 = load i32, i32* %5
%12 = ashr i32 %11, 16
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %3
store i32 %12, i32* %13
%15 = load i32, i32* %5
%16 = ashr i32 %15, 8
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %3
store i32 %16, i32* %17
%19 = load i32, i32* %5
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i32 1
store i32* %21, i32** %3
store i32 %19, i32* %20
ret void
}

LLVM IR (-O2):
define void @packi32(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %0
%5 = ashr i32 %1, 16
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %5, i32* %4
%7 = ashr i32 %1, 8
%8 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %7, i32* %6
store i32 %1, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pic_enable();
void pic_init() { pic_enable(); }


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

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

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

LLVM IR (-O2):
define void @pic_init() {
%1 = tail call i32 (...) @pic_enable()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_X25;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ socket(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void test_x25() { socket(AF_X25, SOCK_DGRAM, 0); }


x86 assembly (clang, -O0):
<test_x25>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_x25>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_X25 = global i32 0
@SOCK_DGRAM = global i32 0
define void @test_x25() {
%1 = load i32, i32* @AF_X25
%2 = load i32, i32* @SOCK_DGRAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
ret void
}

LLVM IR (-O2):
@AF_X25 = global i32 0
@SOCK_DGRAM = global i32 0
define void @test_x25() {
%1 = load i32, i32* @AF_X25
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret void
}
int lockd_stop_vg(struct cmd_context *cmd, struct volume_group *vg) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
define i32 @lockd_stop_vg(%struct.cmd_context* nocapture readnone %0, %struct.volume_group* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int pretty_print_colour_state();
bool pretty_print_colour_get_state(void) { return pretty_print_colour_state(); }


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

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

LLVM IR (-O0):
define i32 @pretty_print_colour_get_state() {
%1 = call i32 (...) @pretty_print_colour_state()
ret i32 %1
}

LLVM IR (-O2):
define i32 @pretty_print_colour_get_state() {
%1 = tail call i32 (...) @pretty_print_colour_state()
ret i32 %1
}
int have7(int n) {
  while (n != 0) {
    if (n % 10 == 7)
      return 1;
    n = (n - n % 10) / 10;
  }
  return 0;
}


x86 assembly (clang, -O0):
<have7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1157 <have7+0x57>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x7,%edx
jne    1131 <have7+0x31>
movl   $0x1,-0x4(%rbp)
jmp    115e <have7+0x5e>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
sub    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1107 <have7+0x7>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<have7>:
xor    %eax,%eax
test   %edi,%edi
je     113e <have7+0x3e>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rdx
imul   $0x66666667,%rdx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rcx
add    %esi,%ecx
lea    (%rcx,%rcx,1),%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
cmp    $0x7,%edx
je     113f <have7+0x3f>
add    $0x9,%edi
cmp    $0x12,%edi
mov    %ecx,%edi
ja     1110 <have7+0x10>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @have7(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %3
%9 = srem i32 %8, 10
%10 = icmp eq i32 %9, 7
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %19
12: ; preds = %7
%13 = load i32, i32* %3
%14 = load i32, i32* %3
%15 = srem i32 %14, 10
%16 = sub nsw i32 %13, %15
%17 = sdiv i32 %16, 10
store i32 %17, i32* %3
br label %4
18: ; preds = %4
store i32 0, i32* %2
br label %19
19: ; preds = %18, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @have7(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %8
%4 = phi i32 [ %6, %8 ], [ %0, %1 ]
%5 = srem i32 %4, 10
%6 = sdiv i32 %4, 10
%7 = icmp eq i32 %5, 7
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = add i32 %4, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %3
11: ; preds = %3, %8, %1
%12 = phi i32 [ 0, %1 ], [ 0, %8 ], [ 1, %3 ]
ret i32 %12
}
float div(float x, float y) { return x / y; }


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @div(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fdiv float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @div(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
/* Variables and functions */
int maximum(int, int);
int main(void) {
  int x = maximum(42, 999);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @maximum(i32 42, i32 999)
store i32 %3, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @maximum(i32 42, i32 999)
ret i32 0
}
const char *cache_words_line_str(unsigned val) {
  switch (val) {
  case 2:
    return "8";
  default:
    return "Unknown";
  }
}


x86 assembly (clang, -O0):
<cache_words_line_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
jne    1128 <cache_words_line_str+0x28>
jmp    1118 <cache_words_line_str+0x18>
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1133 <cache_words_line_str+0x33>
lea    0xed3(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cache_words_line_str>:
cmp    $0x2,%edi
lea    0xef6(%rip),%rcx
lea    0xef1(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"8\00"
@.str.1 = [8 x i8] c"Unknown\00"
define i8* @cache_words_line_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 2, label %5
]
5: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %7
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [2 x i8] c"8\00"
@.str.1 = [8 x i8] c"Unknown\00"
define i8* @cache_words_line_str(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
void genbne_out() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ box(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ wnoutrefresh(int /*<<< orphan*/ *);
void wbrefresh(WINDOW *win) {
  box(win, 0, 0);
  wnoutrefresh(win);
}


x86 assembly (clang, -O0):
<wbrefresh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <box@plt>
mov    -0x8(%rbp),%rdi
call   1040 <wnoutrefresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wbrefresh>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
xor    %edx,%edx
call   1030 <box@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <wnoutrefresh@plt>

LLVM IR (-O0):
define void @wbrefresh(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @box(i32* %3, i32 0, i32 0)
%5 = load i32*, i32** %2
%6 = call i32 @wnoutrefresh(i32* %5)
ret void
}

LLVM IR (-O2):
define void @wbrefresh(i32* %0) {
%2 = tail call i32 @box(i32* %0, i32 0, i32 0)
%3 = tail call i32 @wnoutrefresh(i32* %0)
ret void
}
void f_omp_target_data(void) {
#pragma omp target data map(i)
  {
#pragma omp parallel
    ;
#pragma omp target
    ;
#pragma omp target data map(i)
    ;
#pragma omp target update to(i)
#pragma omp target data map(i)
    {
#pragma omp parallel
      ;
#pragma omp target
      ;
#pragma omp target data map(i)
      ;
#pragma omp target update to(i)
    }
  }
}


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

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

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

LLVM IR (-O2):
define void @f_omp_target_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int A, B, C, D, DIFERENCA;
  scanf("%d%d%d%d", &A, &B, &C, &D);
  DIFERENCA = ((A * B) - (C * D));
  printf("DIFERENCA = %d\n", DIFERENCA);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0x14(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
imul   0x14(%rsp),%esi
mov    0x8(%rsp),%eax
imul   0xc(%rsp),%eax
sub    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d%d%d%d\00"
@.str.1 = [16 x i8] c"DIFERENCA = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = mul nsw i32 %8, %9
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = mul nsw i32 %11, %12
%14 = sub nsw i32 %10, %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d%d%d%d\00"
@.str.1 = [16 x i8] c"DIFERENCA = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, %10
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = mul nsw i32 %14, %13
%16 = sub nsw i32 %12, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}
/* Type definitions */
struct timespec {
  double tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
double tsFloat(struct timespec time) {
  return ((double)time.tv_sec + (time.tv_nsec / 1000000000.0));
}


x86 assembly (clang, -O0):
<tsFloat>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x8(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xee0(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsFloat>:
cvtsi2sd %rdi,%xmm1
divsd  0xef3(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { double, i64 }
define double @tsFloat(double %0, i64 %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to { double, i64 }*
%5 = getelementptr inbounds { double, i64 }, { double, i64 }* %4, i32 0, i32 0
store double %0, double* %5
%6 = getelementptr inbounds { double, i64 }, { double, i64 }* %4, i32 0, i32 1
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%11 = load double, double* %10
%12 = fdiv double %11, 1.000000e+09
%13 = fadd double %9, %12
ret double %13
}

LLVM IR (-O2):
define double @tsFloat(double %0, i64 %1) {
%3 = sitofp i64 %1 to double
%4 = fdiv double %0, 1.000000e+09
%5 = fadd double %4, %3
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
void _main_() {
  write(1, "Hello Windows\n", 14);
  _exit(0);
}


x86 assembly (clang, -O0):
<_main_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xed0(%rip),%rsi
mov    $0xe,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_main_>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0xe,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Hello Windows\0A\00"
define void @_main_() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
%2 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello Windows\0A\00"
define void @_main_() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
%2 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
float math_sqrtf(float);
float call_sqrtf(float x) { return math_sqrtf(x); }


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

x86 assembly (clang, -O2):
<call_sqrtf>:
jmp    1030 <math_sqrtf@plt>

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

LLVM IR (-O2):
define float @call_sqrtf(float %0) {
%2 = tail call float @math_sqrtf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ SIZE_MAX;
int strnlowercmp(char const *, char const *, int /*<<< orphan*/);
int strlowercmp(const char *a, const char *b) {
  return strnlowercmp(a, b, SIZE_MAX);
}


x86 assembly (clang, -O0):
<strlowercmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
call   1030 <strnlowercmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlowercmp>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <strnlowercmp@plt>

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

LLVM IR (-O2):
@SIZE_MAX = global i32 0
define i32 @strlowercmp(i8* %0, i8* %1) {
%3 = load i32, i32* @SIZE_MAX
%4 = tail call i32 @strnlowercmp(i8* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int dangerous();
int main() { return dangerous(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @dangerous()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @dangerous()
ret i32 %1
}
int interpHistoryDec(int x) {
  if (x)
    return x - 1;
  else
    return 32 - 1;
}


x86 assembly (clang, -O0):
<interpHistoryDec>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     111f <interpHistoryDec+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <interpHistoryDec+0x26>
movl   $0x1f,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpHistoryDec>:
sub    $0x1,%edi
mov    $0x1f,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @interpHistoryDec(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = add nsw i32 %0, -1
%4 = select i1 %2, i32 31, i32 %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cmdline_show_help(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int cmdline_help(const char *param, void *extra_param) {
  cmdline_show_help(NULL);
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<cmdline_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <cmdline_show_help@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<cmdline_help>:
push   %rax
xor    %edi,%edi
call   1030 <cmdline_show_help@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @cmdline_help(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @cmdline_show_help(i32* null)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @cmdline_help(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @cmdline_show_help(i32* null)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void int_print(void *i) {
  if (i)
    printf("%d", *(int *)i);
}


x86 assembly (clang, -O0):
<int_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <int_print+0x29>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_print>:
test   %rdi,%rdi
je     1123 <int_print+0x13>
mov    (%rdi),%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @int_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @int_print(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
long Factorial(int);
long __eskel_Cnr(int n, int r) {
  return (Factorial(n) / (Factorial(n - r) * Factorial(r)));
}


x86 assembly (clang, -O0):
<__eskel_Cnr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Factorial@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <Factorial@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <Factorial@plt>
mov    -0x18(%rbp),%rcx
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
imul   %rdx,%rcx
cqto
idiv   %rcx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__eskel_Cnr>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %edi,%ebx
call   1030 <Factorial@plt>
mov    %rax,%r14
sub    %ebp,%ebx
mov    %ebx,%edi
call   1030 <Factorial@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <Factorial@plt>
mov    %rax,%rcx
imul   %rbx,%rcx
mov    %r14,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1150 <__eskel_Cnr+0x40>
mov    %r14,%rax
cqto
idiv   %rcx
jmp    1157 <__eskel_Cnr+0x47>
mov    %r14d,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @__eskel_Cnr(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 = call i64 @Factorial(i32 %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = sub nsw i32 %7, %8
%10 = call i64 @Factorial(i32 %9)
%11 = load i32, i32* %4
%12 = call i64 @Factorial(i32 %11)
%13 = mul nsw i64 %10, %12
%14 = sdiv i64 %6, %13
ret i64 %14
}

LLVM IR (-O2):
define i64 @__eskel_Cnr(i32 %0, i32 %1) {
%3 = tail call i64 @Factorial(i32 %0)
%4 = sub nsw i32 %0, %1
%5 = tail call i64 @Factorial(i32 %4)
%6 = tail call i64 @Factorial(i32 %1)
%7 = mul nsw i64 %6, %5
%8 = sdiv i64 %3, %7
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ __wdie(char *);
void *realloc(void *, size_t);
void *__wxrealloc(void *pointer, size_t size) {
  void *ptr = realloc(pointer, size);
  if (ptr)
    return ptr;
  __wdie("Out of memory.");
  return NULL;
}


x86 assembly (clang, -O0):
<__wxrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1159 <__wxrealloc+0x39>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116d <__wxrealloc+0x4d>
lea    0xea0(%rip),%rdi
call   1040 <__wdie@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wxrealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <__wxrealloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <__wdie@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory.\00"
define i8* @__wxrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = call i8* @realloc(i8* %7, i64 %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i8*, i8** %6
store i8* %13, i8** %3
br label %16
14: ; preds = %2
%15 = call i32 @__wdie(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i8* null, i8** %3
br label %16
16: ; preds = %14, %12
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory.\00"
define noalias i8* @__wxrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @__wdie(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar_fd(char const, int);
void ft_putstr_fd(char const *s, int fd) {
  if (!s)
    return;
  while (*s) {
    ft_putchar_fd(*s, fd);
    s++;
  }
}


x86 assembly (clang, -O0):
<ft_putstr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112f <ft_putstr_fd+0x1f>
jmp    1163 <ft_putstr_fd+0x53>
jmp    1134 <ft_putstr_fd+0x24>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <ft_putstr_fd+0x53>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0xc(%rbp),%esi
movsbl %al,%edi
call   1030 <ft_putchar_fd@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <ft_putstr_fd+0x24>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr_fd>:
push   %rbp
push   %rbx
push   %rax
test   %rdi,%rdi
je     1145 <ft_putstr_fd+0x35>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1145 <ft_putstr_fd+0x35>
mov    %esi,%ebp
add    $0x1,%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <ft_putchar_fd@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ft_putstr_fd+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ft_putstr_fd(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %4, %7
%8 = phi i8 [ %12, %7 ], [ %5, %4 ]
%9 = phi i8* [ %11, %7 ], [ %0, %4 ]
%10 = tail call i32 @ft_putchar_fd(i8 signext %8, i32 %1)
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %4, %2
ret void
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0, answr;
  printf("Enter a number to check if its prime: \n");
  scanf("%d", &n);
  answr = is_prime(n);
  printf("The answer is: %d\n", answr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <is_prime@plt>
lea    0xe8d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Enter a number to check if its prime: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"The answer is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @is_prime(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"The answer is: %d\0A\00"
@str = [39 x i8] c"Enter a number to check if its prime: \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @is_prime(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
int ls_cost_nm8_n_out(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @ls_cost_nm8_n_out() {
ret i32 2
}

LLVM IR (-O2):
define i32 @ls_cost_nm8_n_out() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char const *, scalar_t__);
scalar_t__ strlen(char const *);
char *strdel(char *s, const char *end) {
  memmove(s, end, strlen(end) + 1);
  return s;
}


x86 assembly (clang, -O0):
<strdel>:
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    %rax,%rdx
add    $0x1,%rdx
call   1040 <memmove@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdel>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <memmove@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdel(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @memmove(i8* %5, i8* %6, i64 %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @strdel(i8* returned %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @memmove(i8* %0, i8* %1, i64 %4)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
swap() { ol("XCHG AX,BX"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"XCHG AX,BX\00"
define i32 @swap() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [11 x i8] c"XCHG AX,BX\00"
define i32 @swap() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int ide_do_packet_command_pio(char *, char *, int);
int ide_unknown71(char *buf, int length) {
  char cmd[12] = {0x71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  return ide_do_packet_command_pio(cmd, buf, length);
}


x86 assembly (clang, -O0):
<ide_unknown71>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <ide_do_packet_command_pio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ide_unknown71>:
sub    $0x18,%rsp
mov    %esi,%edx
mov    %rdi,%rsi
mov    0xee9(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xed6(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <ide_do_packet_command_pio@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.ide_unknown71.cmd = <{ i8, [11 x i8] }> <{ i8 113, [11 x i8] zeroinitializer }>
define i32 @ide_unknown71(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [12 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = bitcast [12 x i8]* %5 to i8*
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @ide_do_packet_command_pio(i8* %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@__const.ide_unknown71.cmd = <{ i8, [11 x i8] }> <{ i8 113, [11 x i8] zeroinitializer }>
define i32 @ide_unknown71(i8* %0, i32 %1) {
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%5 = call i32 @ide_do_packet_command_pio(i8* %4, i8* %0, i32 %1)
ret i32 %5
}
long get_threshold_pps_by_speed_link(int speed) {
  long pps;
  return pps = speed * 1e+6 / 2 / 8 / 60;
}


x86 assembly (clang, -O0):
<get_threshold_pps_by_speed_link>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xf04(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xef0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xedc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xec8(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_threshold_pps_by_speed_link>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
divsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @get_threshold_pps_by_speed_link(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 1.000000e+06
%7 = fdiv double %6, 2.000000e+00
%8 = fdiv double %7, 8.000000e+00
%9 = fdiv double %8, 6.000000e+01
%10 = fptosi double %9 to i64
store i64 %10, i64* %3
ret i64 %10
}

LLVM IR (-O2):
define i64 @get_threshold_pps_by_speed_link(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 1.000000e+06
%4 = fmul double %3, 5.000000e-01
%5 = fmul double %4, 1.250000e-01
%6 = fdiv double %5, 6.000000e+01
%7 = fptosi double %6 to i64
ret i64 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
size_t wcsxfrm(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, size_t);
size_t wcsxfrm_l(wchar_t *restrict dest, const wchar_t *restrict src, size_t n,
                 locale_t locale) {
  return wcsxfrm(dest, src, n);
}


x86 assembly (clang, -O0):
<wcsxfrm_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <wcsxfrm@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsxfrm_l>:
jmp    1030 <wcsxfrm@plt>

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

LLVM IR (-O2):
define i64 @wcsxfrm_l(i32* noalias %0, i32* noalias %1, i64 %2, i32 %3) {
%5 = tail call i64 @wcsxfrm(i32* %0, i32* %1, i64 %2)
ret i64 %5
}
int enclave_syscall() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @enclave_syscall() {
ret i32 0
}
char *foo() { return "\\begin{"; }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\\begin{\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"\\begin{\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x30() {
  Assert_real((isascii(48)),
              "/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_isascii.c",
              245, ("isascii should be 1 for 0"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x30>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xf5,%edx
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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for 0\00"
define void @t_isascii_0x30() {
%1 = call i32 @isascii(i32 48)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 245, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for 0\00"
define void @t_isascii_0x30() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 245, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}