// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/is_lockfree/isLockfree.cpp
// Function: main
int main()
{
    std::atomic<A> a;
    std::atomic<B> b;
    std::atomic<C> c;

    std::cout << "sizeof int: " << sizeof(int) << '\n';
    std::cout << "sizeof int64_t: " << sizeof(int64_t) << '\n';
    std::cout << "minimum numeric limit of int: " << min_int << '\n'; 			
    std::cout << "maximum numeric limit of int: " << max_int << '\n';
    std::cout << "minimum numeric limit of min_int64_t: " << min_int64_t << '\n';			
    std::cout << "maximum numeric limit of max_int64_t: " << max_int64_t << '\n';
    std::cout << "size of struct A: " << sizeof(int) * size << '\n';
    std::cout << "size of struct B: " << sizeof(b) << '\n';
    std::cout << "size of struct C: " << sizeof(c) << '\n';

    std::cout << std::boolalpha
              << "std::atomic<A> with an array of " << size <<  " is lock free? "
              << std::atomic_is_lock_free(&a) << '\n'
              << "std::atomic<B> with two ints is lock free? "
              << std::atomic_is_lock_free(&b) << '\n'
	      << "std::atomic<C> with two int64_t is lock free? "
	      << std::atomic_is_lock_free(&c) << '\n';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq 0x2db7(%rip), %r14      # 0x3fd8
leaq 0xddc(%rip), %rsi       # 0x2004
movq %r14, %rdi
callq 0x1090
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0x1060
pushq $0xa
popq %rbx
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xdc2(%rip), %rsi       # 0x2011
movq %r14, %rdi
callq 0x1090
pushq $0x8
popq %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x1060
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xdab(%rip), %rsi       # 0x2022
movq %r14, %rdi
callq 0x1090
movq %rax, %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0x10d0
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xda4(%rip), %rsi       # 0x2041
movq %r14, %rdi
callq 0x1090
movq %rax, %rdi
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x10d0
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xd9d(%rip), %rsi       # 0x2060
movq %r14, %rdi
callq 0x1090
movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x1(%r12), %rsi
movq %rax, %rdi
callq 0x1080
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xd94(%rip), %rsi       # 0x2087
movq %r14, %rdi
callq 0x1090
movq %rax, %rdi
movq %r12, %rsi
callq 0x1080
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xd97(%rip), %rsi       # 0x20ae
movq %r14, %rdi
callq 0x1090
movl $0x190, %esi            # imm = 0x190
movq %rax, %rdi
callq 0x1060
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xd84(%rip), %rsi       # 0x20c1
movq %r14, %rdi
callq 0x1090
movq %rax, %rdi
movq %r15, %rsi
callq 0x1060
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xd73(%rip), %rsi       # 0x20d4
movq %r14, %rdi
callq 0x1090
pushq $0x10
popq %rsi
movq %rax, %rdi
callq 0x1060
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
movq (%r14), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%r14,%rax)
leaq 0xd55(%rip), %rsi       # 0x20e7
movq %r14, %rdi
callq 0x1090
pushq $0x64
popq %rsi
movq %rax, %rdi
callq 0x10d0
leaq 0xd78(%rip), %rsi       # 0x2124
movq %rax, %rdi
callq 0x1090
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x143a
movzbl %al, %esi
movq %r14, %rdi
callq 0x10c0
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xd2b(%rip), %rsi       # 0x2108
movq %rax, %rdi
callq 0x1090
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x10c0
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
leaq 0xd33(%rip), %rsi       # 0x2134
movq %rax, %rdi
callq 0x1090
movq %rax, %r14
movq %rsp, %rdi
callq 0x145e
movzbl %al, %esi
movq %r14, %rdi
callq 0x10c0
movq %rax, %rdi
movl %ebx, %esi
callq 0x10a0
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq