#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
long long CalculateC1(long long, long long);
long long CalculateC2(int, int, int);
long long int CalculateNumberOfSetsWithEqualXOR(void) {
  long long int i = 0, ans = 0,
                c2 = CalculateC2(2, (int)(1e9 + 7) - 2, (int)(1e9 + 7));
  for (i = 0; i < 129; i++) {
    ans = (ans + CalculateC1(i, c2)) % (int)(1e9 + 7);
  }
  return ans;
}


x86 assembly (clang, -O0):
<CalculateNumberOfSetsWithEqualXOR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x2,%edi
mov    $0x3b9aca05,%esi
mov    $0x3b9aca07,%edx
call   1040 <CalculateC2@plt>
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x8(%rbp)
cmpq   $0x81,-0x8(%rbp)
jge    11a4 <CalculateNumberOfSetsWithEqualXOR+0x84>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <CalculateC1@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
mov    $0x3b9aca07,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1158 <CalculateNumberOfSetsWithEqualXOR+0x38>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalculateNumberOfSetsWithEqualXOR>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    $0x2,%edi
mov    $0x3b9aca05,%esi
mov    $0x3b9aca07,%edx
call   1040 <CalculateC2@plt>
mov    %rax,%r14
xor    %r15d,%r15d
movabs $0x89705f3112a28fe5,%r12
5f 70 89
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <CalculateC1@plt>
add    %rax,%rbx
mov    %rbx,%rax
imul   %r12
add    %rbx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x1d,%rdx
add    %rax,%rdx
imul   $0x3b9aca07,%rdx,%rax
sub    %rax,%rbx
add    $0x1,%r15
cmp    $0x81,%r15
jne    1150 <CalculateNumberOfSetsWithEqualXOR+0x30>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @CalculateNumberOfSetsWithEqualXOR() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
store i64 0, i64* %1
store i64 0, i64* %2
%4 = call i64 @CalculateC2(i32 2, i32 1000000005, i32 1000000007)
store i64 %4, i64* %3
store i64 0, i64* %1
br label %5
5: ; preds = %15, %0
%6 = load i64, i64* %1
%7 = icmp slt i64 %6, 129
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i64, i64* %2
%10 = load i64, i64* %1
%11 = load i64, i64* %3
%12 = call i64 @CalculateC1(i64 %10, i64 %11)
%13 = add nsw i64 %9, %12
%14 = srem i64 %13, 1000000007
store i64 %14, i64* %2
br label %15
15: ; preds = %8
%16 = load i64, i64* %1
%17 = add nsw i64 %16, 1
store i64 %17, i64* %1
br label %5
18: ; preds = %5
%19 = load i64, i64* %2
ret i64 %19
}

LLVM IR (-O2):
define i64 @CalculateNumberOfSetsWithEqualXOR() {
%1 = tail call i64 @CalculateC2(i32 2, i32 1000000005, i32 1000000007)
br label %2
2: ; preds = %0, %2
%3 = phi i64 [ 0, %0 ], [ %8, %2 ]
%4 = phi i64 [ 0, %0 ], [ %7, %2 ]
%5 = tail call i64 @CalculateC1(i64 %3, i64 %1)
%6 = add nsw i64 %5, %4
%7 = srem i64 %6, 1000000007
%8 = add nuw nsw i64 %3, 1
%9 = icmp eq i64 %8, 129
br i1 %9, label %10, label %2
10: ; preds = %2
ret i64 %7
}