xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void cmac_shared_lock(void) {
  volatile uint32_t *bsr_set = (void *)0x50050074;
  volatile uint32_t *bsr_stat = (void *)0x5005007c;
  while ((*bsr_stat & 0xc0000000) != 0x40000000) {
    *bsr_set = 0x40000000;
  }
}


x86 assembly (clang, -O0):
<cmac_shared_lock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x50050074,%eax
mov    %rax,-0x8(%rbp)
mov    $0x5005007c,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0xc0000000,%eax
cmp    $0x40000000,%eax
je     113b <cmac_shared_lock+0x3b>
mov    -0x8(%rbp),%rax
movl   $0x40000000,(%rax)
jmp    1116 <cmac_shared_lock+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmac_shared_lock>:
mov    $0xc0000000,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x5005007c,%ecx
and    %eax,%ecx
cmp    $0x40000000,%ecx
je     112e <cmac_shared_lock+0x2e>
movl   $0x40000000,0x50050074
jmp    1110 <cmac_shared_lock+0x10>
ret

LLVM IR (-O0):
define void @cmac_shared_lock() {
%1 = alloca i32*
%2 = alloca i32*
store i32* inttoptr (i64 1342505076 to i32*), i32** %1
store i32* inttoptr (i64 1342505084 to i32*), i32** %2
br label %3
3: ; preds = %8, %0
%4 = load i32*, i32** %2
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -1073741824
%7 = icmp ne i32 %6, 1073741824
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = load i32*, i32** %1
store volatile i32 1073741824, i32* %9
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @cmac_shared_lock() {
%1 = load volatile i32, i32* inttoptr (i64 1342505084 to i32*)
%2 = and i32 %1, -1073741824
%3 = icmp eq i32 %2, 1073741824
br i1 %3, label %8, label %4
4: ; preds = %0, %4
store volatile i32 1073741824, i32* inttoptr (i64 1342505076 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1342505084 to i32*)
%6 = and i32 %5, -1073741824
%7 = icmp eq i32 %6, 1073741824
br i1 %7, label %8, label %4
8: ; preds = %4, %0
ret void
}
unsigned int bit(int b) { return (1UL << (b)); }


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

x86 assembly (clang, -O2):
<bit>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%rax
ret

LLVM IR (-O0):
define i32 @bit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = shl i64 1, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @bit(i32 %0) {
%2 = zext i32 %0 to i64
%3 = shl nuw i64 1, %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ standard_command(int, int, int /*<<< orphan*/, char **);
void one_variable_command(int opcode_byte, char **arguments) {
  standard_command(opcode_byte, 1, 0, arguments);
}


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

x86 assembly (clang, -O2):
<one_variable_command>:
mov    %rsi,%rcx
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <standard_command@plt>

LLVM IR (-O0):
define void @one_variable_command(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @standard_command(i32 %5, i32 1, i32 0, i8** %6)
ret void
}

LLVM IR (-O2):
define void @one_variable_command(i32 %0, i8** %1) {
%3 = tail call i32 @standard_command(i32 %0, i32 1, i32 0, i8** %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iscntrl(int);
isprint(int c) { return (!iscntrl(c)); }


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprint>:
push   %rax
call   1030 <iscntrl@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @iscntrl(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = tail call i32 @iscntrl(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int str_equals(char *str, char *str2) { return strcmp(str, str2) == 0; }


x86 assembly (clang, -O0):
<str_equals>:
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 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_equals>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @str_equals(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 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @str_equals(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void exchangeData(struct domain *theDomain, int dim) {}


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

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

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

LLVM IR (-O2):
%struct.domain = type opaque
define void @exchangeData(%struct.domain* nocapture %0, i32 %1) {
ret void
}
void ser_Kick(int index) {}


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

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

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

LLVM IR (-O2):
define void @ser_Kick(i32 %0) {
ret void
}
/* Type definitions */
typedef long uint64_t;
struct timeval {
  long tv_sec;
  long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t getTimeInMillis() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000L + tv.tv_usec / 1000L;
}


x86 assembly (clang, -O0):
<getTimeInMillis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTimeInMillis>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x8(%rsp),%rcx
movabs $0x20c49ba5e353f7cf,%rax
9b c4 20
imulq  0x10(%rsp)
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rdx,%rax
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @getTimeInMillis() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i64, i64* %3
%5 = mul nsw i64 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i64, i64* %6
%8 = sdiv i64 %7, 1000
%9 = add nsw i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @getTimeInMillis() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = sdiv i64 %8, 1000
%10 = add nsw i64 %9, %6
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Ayyappa\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Ayyappa\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))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"Ayyappa\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct rpc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ eval_rpci(double *, struct rpc *, double, double, double);
void rpc_projection(double ij[2], struct rpc *r, double lonlatheight[3]) {
  eval_rpci(ij, r, lonlatheight[0], lonlatheight[1], lonlatheight[2]);
}


x86 assembly (clang, -O0):
<rpc_projection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
call   1030 <eval_rpci@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpc_projection>:
movsd  (%rdx),%xmm0
movsd  0x8(%rdx),%xmm1
movsd  0x10(%rdx),%xmm2
jmp    1030 <eval_rpci@plt>

LLVM IR (-O0):
%struct.rpc = type { i32 }
define void @rpc_projection(double* %0, %struct.rpc* %1, double* %2) {
%4 = alloca double*
%5 = alloca %struct.rpc*
%6 = alloca double*
store double* %0, double** %4
store %struct.rpc* %1, %struct.rpc** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load %struct.rpc*, %struct.rpc** %5
%9 = load double*, double** %6
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = load double*, double** %6
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = load double*, double** %6
%16 = getelementptr inbounds double, double* %15, i64 2
%17 = load double, double* %16
%18 = call i32 @eval_rpci(double* %7, %struct.rpc* %8, double %11, double %14, double %17)
ret void
}

LLVM IR (-O2):
%struct.rpc = type { i32 }
define void @rpc_projection(double* %0, %struct.rpc* %1, double* nocapture %2) {
%4 = load double, double* %2
%5 = getelementptr inbounds double, double* %2, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %2, i64 2
%8 = load double, double* %7
%9 = tail call i32 @eval_rpci(double* %0, %struct.rpc* %1, double %4, double %6, double %8)
ret void
}
/* Variables and functions */
scalar_t__ is_str_equal(char const *, char const *);
int minitest_fail(char const *, char const *, int);
int minitest_pass(char const *);
int refute_str_equal(const char *expected, const char *actual, const char *msg,
                     const char *caller, int line) {
  if (is_str_equal(expected, actual)) {
    return minitest_pass(msg);
  } else {
    return minitest_fail(msg, caller, line);
  }
}


x86 assembly (clang, -O0):
<refute_str_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <is_str_equal@plt>
cmp    $0x0,%rax
je     1174 <refute_str_equal+0x44>
mov    -0x20(%rbp),%rdi
call   1030 <minitest_pass@plt>
mov    %eax,-0x4(%rbp)
jmp    1187 <refute_str_equal+0x57>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1040 <minitest_fail@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<refute_str_equal>:
push   %rbp
push   %r14
push   %rbx
mov    %r8d,%r14d
mov    %rcx,%rbx
mov    %rdx,%rbp
call   1050 <is_str_equal@plt>
mov    %rbp,%rdi
test   %rax,%rax
je     1153 <refute_str_equal+0x23>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <minitest_pass@plt>
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <minitest_fail@plt>

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

LLVM IR (-O2):
define i32 @refute_str_equal(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = tail call i64 @is_str_equal(i8* %0, i8* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @minitest_pass(i8* %2)
br label %12
10: ; preds = %5
%11 = tail call i32 @minitest_fail(i8* %2, i8* %3, i32 %4)
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}
/* Variables and functions */
scalar_t__ expl(long double);
int /*<<< orphan*/ link_failure_expl();
void test_expl(long double ld) {
  if (expl(ld) != expl(ld))
    link_failure_expl();
}


x86 assembly (clang, -O0):
<test_expl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expl@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_expl+0x43>
mov    $0x0,%al
call   1040 <link_failure_expl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_expl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1030 <expl@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1030 <expl@plt>
cmp    %rax,%rbx
jne    1151 <test_expl+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1040 <link_failure_expl@plt>

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

LLVM IR (-O2):
define void @test_expl(x86_fp80 %0) {
%2 = tail call i64 @expl(x86_fp80 %0)
%3 = tail call i64 @expl(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_expl()
br label %7
7: ; preds = %5, %1
ret void
}
int bpf_sk_storage_diag_put(struct bpf_sk_storage_diag *diag, struct sock *sk,
                            struct sk_buff *skb, int stg_array_type,
                            unsigned int *res_diag_size) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.bpf_sk_storage_diag = type opaque
%struct.sock = type opaque
%struct.sk_buff = type opaque
define i32 @bpf_sk_storage_diag_put(%struct.bpf_sk_storage_diag* %0, %struct.sock* %1, %struct.sk_buff* %2, i32 %3, i32* %4) {
%6 = alloca %struct.bpf_sk_storage_diag*
%7 = alloca %struct.sock*
%8 = alloca %struct.sk_buff*
%9 = alloca i32
%10 = alloca i32*
store %struct.bpf_sk_storage_diag* %0, %struct.bpf_sk_storage_diag** %6
store %struct.sock* %1, %struct.sock** %7
store %struct.sk_buff* %2, %struct.sk_buff** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
ret i32 0
}

LLVM IR (-O2):
%struct.bpf_sk_storage_diag = type opaque
%struct.sock = type opaque
%struct.sk_buff = type opaque
define i32 @bpf_sk_storage_diag_put(%struct.bpf_sk_storage_diag* nocapture readnone %0, %struct.sock* nocapture readnone %1, %struct.sk_buff* nocapture readnone %2, i32 %3, i32* nocapture readnone %4) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ prince_enc_dec(int /*<<< orphan*/ const *,
                                  int /*<<< orphan*/ const *,
                                  int /*<<< orphan*/ *, int, int, int);
void prince_decrypt(const uint8_t in_bytes[8], const uint8_t key_bytes[16],
                    uint8_t out_bytes[8], int num_half_rounds,
                    int old_key_schedule) {
  prince_enc_dec(in_bytes, key_bytes, out_bytes, 1, num_half_rounds,
                 old_key_schedule);
  uint64_t m16[2][16];
}


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

x86 assembly (clang, -O2):
<prince_decrypt>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    $0x1,%ecx
jmp    1030 <prince_enc_dec@plt>

LLVM IR (-O0):
define void @prince_decrypt(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca [2 x [16 x i32]]
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32*, i32** %6
%13 = load i32*, i32** %7
%14 = load i32*, i32** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 @prince_enc_dec(i32* %12, i32* %13, i32* %14, i32 1, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
define void @prince_decrypt(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = tail call i32 @prince_enc_dec(i32* %0, i32* %1, i32* %2, i32 1, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
size_t backslash_encode_size(size_t in_sz) { return 2 * in_sz + 1; }


x86 assembly (clang, -O0):
<backslash_encode_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
add    $0x1,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @backslash_encode_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 2, %3
%5 = add i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @backslash_encode_size(i64 %0) {
%2 = shl i64 %0, 1
%3 = or i64 %2, 1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xf7() {
  Assert_real((isdigit(247) == 0),
              "/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_isdigit.c",
              1240, ("isdigit should be 0 for 0xf7"));
}


x86 assembly (clang, -O0):
<t_isdigit_0xf7>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf7,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4d8,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0xf7>:
push   %rax
mov    $0xf7,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4d8,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xf7\00"
define void @t_isdigit_0xf7() {
%1 = call i64 @isdigit(i32 247)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1240, i8* getelementptr inbounds ([29 x i8], [29 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xf7\00"
define void @t_isdigit_0xf7() {
%1 = tail call i64 @isdigit(i32 247)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1240, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int test2(unsigned int b) { return ~(int)b; }


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

x86 assembly (clang, -O2):
<test2>:
mov    %edi,%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @test2(i32 %0) {
%2 = xor i32 %0, -1
ret i32 %2
}
/* Variables and functions */
int __dprintf(int, char const *, int *);
int dprintf(int fd, const char *format, ...) {
  return __dprintf(fd, format, (int *)&format + 1);
}


x86 assembly (clang, -O0):
<dprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <__dprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dprintf>:
push   %rax
mov    %rsi,(%rsp)
lea    0x4(%rsp),%rdx
call   1030 <__dprintf@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dprintf(i32 %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = bitcast i8** %4 to i32*
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = call i32 @__dprintf(i32 %5, i8* %6, i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @dprintf(i32 %0, i8* %1, ...) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = bitcast i8** %3 to i32*
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = call i32 @__dprintf(i32 %0, i8* %1, i32* %5)
ret i32 %6
}
long double fabsl(long double x) {
  long double res = 0.0L;
  asm volatile("fabs;" : "=t"(res) : "0"(x));
  return res;
}


x86 assembly (clang, -O0):
<fabsl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldz
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fabs
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabsl>:
fldt   0x8(%rsp)
fabs
ret

LLVM IR (-O0):
define x86_fp80 @fabsl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 asm sideeffect "fabs;", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @fabsl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm sideeffect "fabs;", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *c_strndup(char *buf, size_t size) {
  char *s = malloc(size + 1);
  if (!s)
    return NULL;
  strncpy(s, buf, size);
  s[size] = '\0';
  return s;
}


x86 assembly (clang, -O0):
<c_strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1159 <c_strndup+0x39>
movq   $0x0,-0x8(%rbp)
jmp    117e <c_strndup+0x5e>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_strndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x1(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114f <c_strndup+0x2f>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%rbx,%r14,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @c_strndup(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 i64, i64* %5
%8 = add i64 %7, 1
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %13, label %12
12: ; preds = %2
store i8* null, i8** %3
br label %22
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = load i8*, i8** %4
%16 = load i64, i64* %5
%17 = call i32 @strncpy(i8* %14, i8* %15, i64 %16)
%18 = load i8*, i8** %6
%19 = load i64, i64* %5
%20 = getelementptr inbounds i8, i8* %18, i64 %19
store i8 0, i8* %20
%21 = load i8*, i8** %6
store i8* %21, i8** %3
br label %22
22: ; preds = %13, %12
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @c_strndup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @strncpy(i8* %4, i8* %0, i64 %1)
%8 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %8
br label %9
9: ; preds = %2, %6
ret i8* %4
}
/* Variables and functions */
scalar_t__ INT_MIN;
unsigned int test6u(unsigned int x) {
  return (x ^ 0x1234) - (unsigned int)INT_MIN;
}


x86 assembly (clang, -O0):
<test6u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x1234,%eax
mov    0x2ed2(%rip),%rcx
mov    (%rcx),%rcx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6u>:
mov    %edi,%eax
xor    $0x1234,%eax
mov    0x2eda(%rip),%rcx
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@INT_MIN = global i64 0
define i32 @test6u(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, 4660
%5 = load i64, i64* @INT_MIN
%6 = trunc i64 %5 to i32
%7 = sub i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
@INT_MIN = global i64 0
define i32 @test6u(i32 %0) {
%2 = xor i32 %0, 4660
%3 = load i64, i64* @INT_MIN
%4 = trunc i64 %3 to i32
%5 = sub i32 %2, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DrawArc(double, int, int);
int /*<<< orphan*/ InitGraphics();
int /*<<< orphan*/ MovePen(double, double);
main() {
  InitGraphics();
  MovePen(1.0, 1.5);
  DrawArc(0.5, 90, 180);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <InitGraphics@plt>
movsd  0xec5(%rip),%xmm0
movsd  0xec5(%rip),%xmm1
call   1050 <MovePen@plt>
movsd  0xea8(%rip),%xmm0
mov    $0x5a,%edi
mov    $0xb4,%esi
call   1040 <DrawArc@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <InitGraphics@plt>
movsd  0xec0(%rip),%xmm0
movsd  0xec0(%rip),%xmm1
call   1050 <MovePen@plt>
movsd  0xebb(%rip),%xmm0
mov    $0x5a,%edi
mov    $0xb4,%esi
call   1040 <DrawArc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @InitGraphics()
%2 = call i32 @MovePen(double 1.000000e+00, double 1.500000e+00)
%3 = call i32 @DrawArc(double 5.000000e-01, i32 90, i32 180)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @InitGraphics()
%2 = tail call i32 @MovePen(double 1.000000e+00, double 1.500000e+00)
%3 = tail call i32 @DrawArc(double 5.000000e-01, i32 90, i32 180)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ calloc(int, size_t);
void *talloc_init(int /*<<< orphan*/, void *);
void *tzalloc(size_t size, void *parent) {
  return talloc_init(calloc(1, size + (sizeof(void *) * 3)), parent);
}


x86 assembly (clang, -O0):
<tzalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
add    $0x18,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <talloc_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tzalloc>:
push   %rbx
mov    %rsi,%rbx
lea    0x18(%rdi),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <talloc_init@plt>

LLVM IR (-O0):
define i8* @tzalloc(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = add i64 %5, 24
%7 = call i32 @calloc(i32 1, i64 %6)
%8 = load i8*, i8** %4
%9 = call i8* @talloc_init(i32 %7, i8* %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @tzalloc(i64 %0, i8* %1) {
%3 = add i64 %0, 24
%4 = tail call i32 @calloc(i32 1, i64 %3)
%5 = tail call i8* @talloc_init(i32 %4, i8* %1)
ret i8* %5
}
double julian_increment_minutes(double julian, int minutes) {
  double julian_increment;
  julian_increment = (double)minutes / 1440.0;
  return julian + julian_increment;
}


x86 assembly (clang, -O0):
<julian_increment_minutes>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xee7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<julian_increment_minutes>:
cvtsi2sd %edi,%xmm1
divsd  0xef4(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @julian_increment_minutes(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fdiv double %3, 1.440000e+03
%5 = fadd double %4, %0
ret double %5
}
void ble_rsp_test_phy_reset(const void *nul) {}


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

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

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

LLVM IR (-O2):
define void @ble_rsp_test_phy_reset(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int8_t stdlib_ndarray_get_ptr_bool(const uint8_t *idx, bool *out) {
  *out = *(bool *)idx;
  return 0;
}


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

x86 assembly (clang, -O2):
<stdlib_ndarray_get_ptr_bool>:
mov    (%rdi),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stdlib_ndarray_get_ptr_bool(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
store i32 %3, i32* %1
ret i32 0
}
int test_longlong() {
  int i;
  long long reds[3] = {0};
#pragma acc parallel loop
  for (i = 0; i < 4096; i++) {
    long long v;
    v = (long long)(i);
#pragma acc atomic
    reds[0] -= v;
#pragma acc atomic
    reds[1] = reds[1] - v;
  }
  for (i = 0; i < 2; i++) {
    if (reds[i] != -(4096 * (4096 - 1) / 2)) {
      return i + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<test_longlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1000,-0x8(%rbp)
jge    116d <test_longlong+0x5d>
movslq -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <test_longlong+0x1f>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11b2 <test_longlong+0xa2>
movslq -0x8(%rbp),%rax
cmpq   $0xffffffffff800800,-0x20(%rbp,%rax,8)
80 ff
je     119f <test_longlong+0x8f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11b9 <test_longlong+0xa9>
jmp    11a4 <test_longlong+0x94>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1174 <test_longlong+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_longlong() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x i64]
%4 = alloca i64
%5 = bitcast [3 x i64]* %3 to i8*
store i32 0, i32* %2
br label %6
6: ; preds = %21, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 4096
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
store i64 %11, i64* %4
%12 = load i64, i64* %4
%13 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 0
%14 = load i64, i64* %13
%15 = sub nsw i64 %14, %12
store i64 %15, i64* %13
%16 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 1
%17 = load i64, i64* %16
%18 = load i64, i64* %4
%19 = sub nsw i64 %17, %18
%20 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 1
store i64 %19, i64* %20
br label %21
21: ; preds = %9
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %6
24: ; preds = %6
store i32 0, i32* %2
br label %25
25: ; preds = %38, %24
%26 = load i32, i32* %2
%27 = icmp slt i32 %26, 2
br i1 %27, label %28, label %41
28: ; preds = %25
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 %30
%32 = load i64, i64* %31
%33 = icmp ne i64 %32, -8386560
br i1 %33, label %34, label %37
34: ; preds = %28
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
store i32 %36, i32* %1
br label %42
37: ; preds = %28
br label %38
38: ; preds = %37
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
br label %25
41: ; preds = %25
store i32 0, i32* %1
br label %42
42: ; preds = %41, %34
%43 = load i32, i32* %1
ret i32 %43
}

LLVM IR (-O2):
define i32 @test_longlong() {
ret i32 0
}
/* Type definitions */
struct ListNode {
  int dummy;
};

/* Variables and functions */
struct ListNode *deleteNode(struct ListNode *);
struct ListNode *shift(struct ListNode *head) {
  head = deleteNode(head);
  return head;
}


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

x86 assembly (clang, -O2):
<shift>:
jmp    1030 <deleteNode@plt>

LLVM IR (-O0):
%struct.ListNode = type { i32 }
define %struct.ListNode* @shift(%struct.ListNode* %0) {
%2 = alloca %struct.ListNode*
store %struct.ListNode* %0, %struct.ListNode** %2
%3 = load %struct.ListNode*, %struct.ListNode** %2
%4 = call %struct.ListNode* @deleteNode(%struct.ListNode* %3)
store %struct.ListNode* %4, %struct.ListNode** %2
%5 = load %struct.ListNode*, %struct.ListNode** %2
ret %struct.ListNode* %5
}

LLVM IR (-O2):
%struct.ListNode = type { i32 }
define %struct.ListNode* @shift(%struct.ListNode* %0) {
%2 = tail call %struct.ListNode* @deleteNode(%struct.ListNode* %0)
ret %struct.ListNode* %2
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ poke(int *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int b[10];
  poke(b, atoi(argv[1]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%esi
call   1030 <poke@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %rsp,%rdi
mov    %eax,%esi
call   1030 <poke@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @atoi(i8* %10)
%12 = call i32 @poke(i32* %7, i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [10 x i32]
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = call i32 @poke(i32* %5, i32 %8)
ret i32 0
}
void arm_begarg(int i, unsigned tar, unsigned arg1, unsigned arg2) {}


x86 assembly (clang, -O0):
<arm_begarg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @arm_begarg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @arm_begarg(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ feof(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
bool didReadErrorOccur(FILE *stream) {
  if (feof(stream) || ferror(stream)) {
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<didReadErrorOccur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%rax
jne    1152 <didReadErrorOccur+0x32>
mov    -0x10(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     115e <didReadErrorOccur+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1165 <didReadErrorOccur+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<didReadErrorOccur>:
push   %rbx
mov    %rdi,%rbx
call   1040 <feof@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <didReadErrorOccur+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <ferror@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @didReadErrorOccur(i32* nocapture %0) {
%2 = tail call i64 @feof(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @ferror(i32* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int test_long() {
  int i;
  long reds[3] = {0};
#pragma acc parallel loop
  for (i = 0; i < 4096; i++) {
    long v;
    v = (long)i - 10;
#pragma acc atomic
    reds[0] -= v;
#pragma acc atomic
    reds[1] = reds[1] - v;
  }
  for (i = 0; i < 2; i++) {
    if (reds[i] != -(4096 * (4096 - 1) / 2 - 10 * 4096)) {
      return i + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<test_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1000,-0x8(%rbp)
jge    1171 <test_long+0x61>
movslq -0x8(%rbp),%rax
sub    $0xa,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <test_long+0x1f>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11b6 <test_long+0xa6>
movslq -0x8(%rbp),%rax
cmpq   $0xffffffffff80a800,-0x20(%rbp,%rax,8)
80 ff
je     11a3 <test_long+0x93>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11bd <test_long+0xad>
jmp    11a8 <test_long+0x98>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1178 <test_long+0x68>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_long() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x i64]
%4 = alloca i64
%5 = bitcast [3 x i64]* %3 to i8*
store i32 0, i32* %2
br label %6
6: ; preds = %22, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 4096
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = sub nsw i64 %11, 10
store i64 %12, i64* %4
%13 = load i64, i64* %4
%14 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 0
%15 = load i64, i64* %14
%16 = sub nsw i64 %15, %13
store i64 %16, i64* %14
%17 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 1
%18 = load i64, i64* %17
%19 = load i64, i64* %4
%20 = sub nsw i64 %18, %19
%21 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 1
store i64 %20, i64* %21
br label %22
22: ; preds = %9
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %6
25: ; preds = %6
store i32 0, i32* %2
br label %26
26: ; preds = %39, %25
%27 = load i32, i32* %2
%28 = icmp slt i32 %27, 2
br i1 %28, label %29, label %42
29: ; preds = %26
%30 = load i32, i32* %2
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 %31
%33 = load i64, i64* %32
%34 = icmp ne i64 %33, -8345600
br i1 %34, label %35, label %38
35: ; preds = %29
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
store i32 %37, i32* %1
br label %43
38: ; preds = %29
br label %39
39: ; preds = %38
%40 = load i32, i32* %2
%41 = add nsw i32 %40, 1
store i32 %41, i32* %2
br label %26
42: ; preds = %26
store i32 0, i32* %1
br label %43
43: ; preds = %42, %35
%44 = load i32, i32* %1
ret i32 %44
}

LLVM IR (-O2):
define i32 @test_long() {
ret i32 0
}
/* Type definitions */
struct object {
  int dummy;
};
struct atom {
  int dummy;
};

/* Variables and functions */
struct atom *create_atom_from_string(char *);
int /*<<< orphan*/ map_cons(struct atom *, struct object *, struct object **);
int /*<<< orphan*/ pop_root_g();
int /*<<< orphan*/ push_root_g(struct object **);
void map_cons_s(char *key, struct object *value, struct object **map) {
  struct atom *atom;
  void *result;
  push_root_g(&value);
  atom = create_atom_from_string(key);
  pop_root_g();
  map_cons(atom, value, map);
}


x86 assembly (clang, -O0):
<map_cons_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
call   1060 <push_root_g@plt>
mov    -0x8(%rbp),%rdi
call   1050 <create_atom_from_string@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <pop_root_g@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <map_cons@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_cons_s>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,(%rsp)
mov    %rsp,%rdi
call   1060 <push_root_g@plt>
mov    %rbx,%rdi
call   1050 <create_atom_from_string@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <pop_root_g@plt>
mov    (%rsp),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <map_cons@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.object = type { i32 }
%struct.atom = type { i32 }
define void @map_cons_s(i8* %0, %struct.object* %1, %struct.object** %2) {
%4 = alloca i8*
%5 = alloca %struct.object*
%6 = alloca %struct.object**
%7 = alloca %struct.atom*
%8 = alloca i8*
store i8* %0, i8** %4
store %struct.object* %1, %struct.object** %5
store %struct.object** %2, %struct.object*** %6
%9 = call i32 @push_root_g(%struct.object** %5)
%10 = load i8*, i8** %4
%11 = call %struct.atom* @create_atom_from_string(i8* %10)
store %struct.atom* %11, %struct.atom** %7
%12 = call i32 (...) @pop_root_g()
%13 = load %struct.atom*, %struct.atom** %7
%14 = load %struct.object*, %struct.object** %5
%15 = load %struct.object**, %struct.object*** %6
%16 = call i32 @map_cons(%struct.atom* %13, %struct.object* %14, %struct.object** %15)
ret void
}

LLVM IR (-O2):
%struct.object = type { i32 }
%struct.atom = type { i32 }
define void @map_cons_s(i8* %0, %struct.object* %1, %struct.object** %2) {
%4 = alloca %struct.object*
store %struct.object* %1, %struct.object** %4
%5 = call i32 @push_root_g(%struct.object** %4)
%6 = call %struct.atom* @create_atom_from_string(i8* %0)
%7 = call i32 (...) @pop_root_g()
%8 = load %struct.object*, %struct.object** %4
%9 = call i32 @map_cons(%struct.atom* %6, %struct.object* %8, %struct.object** %2)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint32_t utf16_surrogate_pair_to_unichar(uint16_t lead, uint16_t trail) {
  return ((lead - 0xd800) << 10) + (trail - 0xdc00) + 0x10000;
}


x86 assembly (clang, -O0):
<utf16_surrogate_pair_to_unichar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xd800,%eax
shl    $0xa,%eax
mov    -0x8(%rbp),%ecx
sub    $0xdc00,%ecx
add    %ecx,%eax
add    $0x10000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf16_surrogate_pair_to_unichar>:
shl    $0xa,%edi
lea    (%rsi,%rdi,1),%eax
add    $0xfca02400,%eax
ret

LLVM IR (-O0):
define i32 @utf16_surrogate_pair_to_unichar(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 = sub nsw i32 %5, 55296
%7 = shl i32 %6, 10
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 56320
%10 = add nsw i32 %7, %9
%11 = add nsw i32 %10, 65536
ret i32 %11
}

LLVM IR (-O2):
define i32 @utf16_surrogate_pair_to_unichar(i32 %0, i32 %1) {
%3 = shl i32 %0, 10
%4 = add i32 %1, -56613888
%5 = add i32 %4, %3
ret i32 %5
}