// File: /workspace/github_cpp_makefile_star2_O2/KinderRiven[P]rdma_demo/server.cc
// Function: main
int main(int argc, char** argv)
{
    rdma_context_t _ctx;
    memset(&_ctx, 0, sizeof(_ctx));
    _ctx.num_qps = 1;
    _ctx.ib_buf_size = 2UL * 1024 * 1024;

    rdma_init(&_ctx);
    connect_qpair(&_ctx);

#if 1
    int tmp;
    printf("[addr:%llx][data:%llx]\n", (uint64_t*)_ctx.local_qp->addr, *(uint64_t*)_ctx.local_qp->addr);
    while (true) {
        scanf("%d", &tmp);
        if (tmp) {
            printf("[addr:%llx][data:%llx]\n", (uint64_t*)_ctx.local_qp->addr, *(uint64_t*)_ctx.local_qp->addr);
        } else {
            break;
        }
    }
#endif
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x688, %rsp            # imm = 0x688
leaq -0x678(%rbp), %rbx
movl $0x588, %edx            # imm = 0x588
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x1, 0x570(%rbx)
movq $0x200000, 0x578(%rbx) # imm = 0x200000
leaq 0xf5e(%rip), %rdi       # 0x2348
callq 0x11d0
leaq -0xf0(%rbp), %r14
andl $0x0, (%r14)
movq %r14, %rdi
callq 0x11a0
movl (%r14), %esi
testl %esi, %esi
je 0x1c76
movq %rax, %rbx
leaq 0xc4c(%rip), %rdi       # 0x2063
xorl %eax, %eax
callq 0x1050
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x1100
movq %rax, -0x670(%rbp)
testq %rax, %rax
je 0x1c7f
movq %rbx, %rdi
callq 0x10d0
leaq 0xc3b(%rip), %rdi       # 0x2083
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
leaq -0x248(%rbp), %rdx
movq -0x428(%rdx), %rdi
cmpq $-0x1, 0x140(%rdi)
jne 0x148a
cmpq $0x288, -0x8(%rdi)      # imm = 0x288
jb 0x148a
movq -0x140(%rdi), %rax
testq %rax, %rax
je 0x148a
pushq $0x1
popq %rsi
pushq $0x34
popq %rcx
callq *%rax
jmp 0x14a8
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rdx)
movupd %xmm0, 0x10(%rdx)
movupd %xmm0, (%rdx)
andl $0x0, 0x30(%rdx)
pushq $0x1
popq %rsi
callq 0x11f0
testl %eax, %eax
jne 0x1c88
leaq 0xeb5(%rip), %rdi       # 0x236c
callq 0x11d0
leaq -0x118(%rbp), %rbx
movzwl -0x10e(%rbx), %esi
leaq 0xbcf(%rip), %rdi       # 0x20a0
xorl %eax, %eax
callq 0x1050
movq -0x558(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x1c91
leaq 0xe86(%rip), %rdi       # 0x2382
callq 0x11d0
leaq 0xba7(%rip), %rdi       # 0x20af
xorl %eax, %eax
callq 0x1050
leaq 0xb9f(%rip), %r14       # 0x20b5
pushq $0x3a
popq %r15
xorl %ebx, %ebx
cmpq $0x10, %rbx
je 0x1546
movzbl -0x118(%rbp,%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
testb $0x1, %bl
je 0x1541
movl %r15d, %edi
callq 0x1190
incq %rbx
jmp 0x151c
pushq $0xa
popq %rdi
callq 0x1190
leaq 0xb5a(%rip), %rdi       # 0x20af
xorl %eax, %eax
callq 0x1050
leaq -0x210(%rbp), %rsi
movq -0x460(%rsi), %rdi
callq 0x11c0
testl %eax, %eax
jne 0x1c9a
leaq 0xe19(%rip), %rdi       # 0x2397
callq 0x11d0
movl -0x1a8(%rbp), %esi
leaq 0xb2a(%rip), %rdi       # 0x20ba
xorl %eax, %eax
callq 0x1050
movl -0x190(%rbp), %esi
movl -0x18c(%rbp), %edx
leaq 0xb23(%rip), %rdi       # 0x20cd
xorl %eax, %eax
callq 0x1050
movl -0x1a0(%rbp), %esi
leaq 0xb31(%rip), %rdi       # 0x20ef
xorl %eax, %eax
callq 0x1050
movl -0x188(%rbp), %eax
movl $0x100000, %ecx         # imm = 0x100000
cltd
idivl %ecx
movq -0x1c0(%rbp), %rdx
shrq $0x1e, %rdx
leaq 0xb1f(%rip), %rdi       # 0x2104
movl %eax, %esi
xorl %eax, %eax
callq 0x1050
leaq 0xe43(%rip), %rdi       # 0x2438
callq 0x11d0
movq -0x670(%rbp), %rdi
callq 0x1070
movq %rax, -0x668(%rbp)
testq %rax, %rax
je 0x1ca3
leaq 0xe40(%rip), %rdi       # 0x245d
callq 0x11d0
movq -0x670(%rbp), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10e0
movq %rax, -0x658(%rbp)
testq %rax, %rax
je 0x1cac
leaq 0xe22(%rip), %rdi       # 0x2471
callq 0x11d0
xorpd %xmm0, %xmm0
leaq -0xf0(%rbp), %r15
movapd %xmm0, 0x30(%r15)
movapd %xmm0, (%r15)
movapd %xmm0, 0x10(%r15)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x34(%r15)
movq -0x658(%rbp), %rax
movq %rax, 0x8(%r15)
movq %rax, 0x10(%r15)
movapd 0x97b(%rip), %xmm0      # 0x2010
movapd %xmm0, 0x20(%r15)
leaq 0xaa8(%rip), %r12       # 0x214a
leaq 0xabe(%rip), %r13       # 0x2167
xorl %r14d, %r14d
movslq -0x108(%rbp), %rax
cmpq %rax, %r14
jge 0x1705
movq -0x668(%rbp), %rdi
movq %r15, %rsi
callq 0x1180
movq %rax, -0x650(%rbp,%r14,8)
testq %rax, %rax
je 0x1c57
movl -0x108(%rbp), %edx
movq %r12, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq 0x1050
movq -0x650(%rbp,%r14,8), %rax
movl 0x34(%rax), %esi
movq %r13, %rdi
xorl %eax, %eax
callq 0x1050
incq %r14
jmp 0x16ac
leaq 0xdab(%rip), %rdi       # 0x24b7
callq 0x11d0
movq -0x100(%rbp), %r14
movq %r14, %rdi
callq 0x1030
movq %rax, -0x678(%rbp)
movabsq $0x4452206f6c6c6548, %rcx # imm = 0x4452206F6C6C6548
movq %rcx, (%rax)
movl $0x21414d, 0x8(%rax)    # imm = 0x21414D
leaq 0xa41(%rip), %rdi       # 0x2183
movq %r14, %rsi
xorl %eax, %eax
callq 0x1050
movq -0x678(%rbp), %rsi
movq -0x668(%rbp), %rdi
movq -0x100(%rbp), %rdx
pushq $0x7
popq %rcx
callq 0x10f0
movq %rax, -0x660(%rbp)
testq %rax, %rax
je 0x1cb5
leaq 0xd4f(%rip), %rdi       # 0x24cf
callq 0x11d0
movq -0x660(%rbp), %rax
movl 0x24(%rax), %esi
movl 0x28(%rax), %edx
leaq 0xa02(%rip), %rdi       # 0x219b
xorl %eax, %eax
callq 0x1050
movq -0x660(%rbp), %rax
movsd 0x18(%rax), %xmm1
unpcklps 0x86d(%rip), %xmm1      # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
movq 0x10(%rax), %rsi
subpd 0x871(%rip), %xmm1      # 0x2030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x86d(%rip), %xmm0      # 0x2040
leaq 0x9da(%rip), %rdi       # 0x21b4
movb $0x1, %al
callq 0x1050
leaq 0xaee(%rip), %rdi       # 0x22d6
callq 0x11d0
xorpd %xmm0, %xmm0
leaq -0x6a8(%rbp), %rdx
andq $0x0, 0x28(%rdx)
movupd %xmm0, 0x8(%rdx)
movupd %xmm0, 0x18(%rdx)
movl $0x1, 0x8(%rdx)
movq $0x1, (%rdx)
leaq 0x9bb(%rip), %rsi       # 0x21d7
leaq -0x40(%rbp), %r12
xorl %edi, %edi
movq %r12, %rcx
callq 0x1150
testl %eax, %eax
jne 0x1cbe
leaq 0xac3(%rip), %rdi       # 0x22fc
callq 0x11d0
pushq $-0x1
popq %rbx
movl %ebx, %r15d
movq (%r12), %r12
testq %r12, %r12
je 0x18a0
movl 0x4(%r12), %edi
movl 0x8(%r12), %esi
movl 0xc(%r12), %edx
callq 0x1080
movl %eax, %r15d
testl %eax, %eax
js 0x1889
movq 0x18(%r12), %rsi
movl 0x10(%r12), %edx
movl %r15d, %edi
callq 0x1060
testl %eax, %eax
je 0x188f
movl %r15d, %edi
callq 0x1200
movl %ebx, %r15d
addq $0x28, %r12
jmp 0x1844
leaq 0x946(%rip), %rdi       # 0x21dc
movl %r15d, %esi
xorl %eax, %eax
callq 0x1050
movq -0x40(%rbp), %rdi
callq 0x1160
pushq $0x5
popq %rsi
movl %r15d, %edi
callq 0x1110
testl %eax, %eax
jne 0x1cc7
leaq 0xa4c(%rip), %rdi       # 0x230f
callq 0x11d0
leaq -0x44(%rbp), %rdx
movl $0x10, (%rdx)
leaq -0x54(%rbp), %rsi
movl %r15d, %edi
callq 0x1090
movl %eax, %ebx
leaq 0x90f(%rip), %rdi       # 0x21f6
movl %eax, %esi
xorl %eax, %eax
callq 0x1050
movl %ebx, -0xf8(%rbp)
pushq $0x22
popq %r14
movq %r14, %rdi
callq 0x1170
movq %rax, %r15
movq %rax, -0x120(%rbp)
movl %ebx, %edi
movq %rax, %rsi
movq %r14, %rdx
callq 0x130c
leaq 0x8e9(%rip), %rdi       # 0x2209
movq %rax, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1050
movq (%r15), %rsi
movl 0x8(%r15), %edx
leaq 0x8e5(%rip), %rdi       # 0x2220
xorl %eax, %eax
callq 0x1050
movzwl 0x10(%r15), %esi
movl 0xc(%r15), %edx
leaq 0x8e9(%rip), %rdi       # 0x223b
xorl %eax, %eax
callq 0x1050
leaq 0x8f5(%rip), %rdi       # 0x2255
xorl %eax, %eax
callq 0x1050
movq %r15, -0x38(%rbp)
addq $0x12, %r15
leaq 0x73f(%rip), %r14       # 0x20b5
pushq $0x3a
popq %r13
xorl %r12d, %r12d
cmpq $0x10, %r12
je 0x19a5
movzbl (%r15,%r12), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
testb $0x1, %r12b
je 0x19a0
movl %r13d, %edi
callq 0x1190
incq %r12
jmp 0x197d
leaq 0x971(%rip), %rdi       # 0x231d
callq 0x11d0
pushq $0x22
popq %r14
movq %r14, %rdi
callq 0x1170
movq %rax, %r13
movq %rax, -0x128(%rbp)
movq -0x678(%rbp), %rax
movq %rax, (%r13)
movq -0x660(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, 0x8(%r13)
movq -0x650(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, 0xc(%r13)
movzwl -0x226(%rbp), %eax
movw %ax, 0x10(%r13)
leaq 0x12(%r13), %r12
leaq -0x118(%rbp), %rax
movupd (%rax), %xmm0
movupd %xmm0, 0x12(%r13)
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1352
leaq 0x83d(%rip), %rdi       # 0x2260
movq %rax, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1050
movq (%r13), %rsi
movl 0x8(%r13), %edx
leaq 0x7e1(%rip), %rdi       # 0x2220
xorl %eax, %eax
callq 0x1050
movzwl 0x10(%r13), %esi
movl 0xc(%r13), %edx
leaq 0x7e5(%rip), %rdi       # 0x223b
xorl %eax, %eax
callq 0x1050
leaq 0x7f1(%rip), %rdi       # 0x2255
xorl %eax, %eax
callq 0x1050
leaq 0x643(%rip), %rbx       # 0x20b5
pushq $0x3a
popq %r14
xorl %r13d, %r13d
cmpq $0x10, %r13
je 0x1aa1
movzbl (%r12,%r13), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1050
testb $0x1, %r13b
je 0x1a9c
movl %r14d, %edi
callq 0x1190
incq %r13
jmp 0x1a79
leaq 0x875(%rip), %rdi       # 0x231d
callq 0x11d0
movq -0x650(%rbp), %r14
leaq -0xf0(%rbp), %rbx
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x1
popq %rax
movl %eax, (%rbx)
movb $0x1, %al
movb %al, 0x81(%rbx)
movl $0x7, 0x20(%rbx)
pushq $0x39
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11e0
movl %eax, %r14d
movl %eax, %edi
callq 0x10a0
leaq 0x77b(%rip), %rdi       # 0x2278
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1050
movq -0x650(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movl 0xc(%rax), %r13d
movzwl 0x10(%rax), %r14d
leaq -0xf0(%rbp), %r12
movl $0x90, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x2, (%r12)
pushq $0x1
popq %rax
movl %eax, 0x8(%r12)
movl %r13d, 0x1c(%r12)
movw $0x1201, 0x7f(%r12)     # imm = 0x1201
movw %r14w, 0x50(%r12)
movw $0x101, 0x55(%r12)      # imm = 0x101
movupd (%r15), %xmm0
movupd %xmm0, 0x38(%r12)
movw $0x102, 0x4c(%r12)      # imm = 0x102
movq -0x30(%rbp), %rdi
movq %r12, %rsi
movl $0x129181, %edx         # imm = 0x129181
callq 0x11e0
movl %eax, %r14d
movl %eax, %edi
callq 0x10a0
leaq 0x6ff(%rip), %rdi       # 0x2298
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1050
movq -0x650(%rbp), %r14
leaq -0xf0(%rbp), %r15
movl $0x90, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x3, (%r15)
movw $0x60c, 0x82(%r15)      # imm = 0x60C
movb $0x1, %al
movb %al, 0x7e(%r15)
movq %r14, %rdi
movq %r15, %rsi
movl $0x12e01, %edx          # imm = 0x12E01
callq 0x11e0
movl %eax, %r14d
movl %eax, %edi
callq 0x10a0
leaq 0x6bc(%rip), %rdi       # 0x22b7
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1050
leaq 0x439(%rip), %r14       # 0x2048
leaq 0x44a(%rip), %r15       # 0x2060
movq -0x128(%rbp), %rax
movq (%rax), %rsi
movq (%rsi), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1120
cmpl $0x0, -0xf0(%rbp)
jne 0x1c16
xorl %eax, %eax
addq $0x688, %rsp            # imm = 0x688
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1040
movl (%rax), %edi
callq 0x10a0
leaq 0x4c2(%rip), %rdi       # 0x212c
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
jmp 0x1cd3
leaq 0x79c(%rip), %rdi       # 0x2419
jmp 0x1cce
leaq 0x778(%rip), %rdi       # 0x23fe
jmp 0x1cce
leaq 0x755(%rip), %rdi       # 0x23e4
jmp 0x1cce
leaq 0x733(%rip), %rdi       # 0x23cb
jmp 0x1cce
leaq 0x70e(%rip), %rdi       # 0x23af
jmp 0x1cce
leaq 0x7f5(%rip), %rdi       # 0x249f
jmp 0x1cce
leaq 0x7d3(%rip), %rdi       # 0x2486
jmp 0x1cce
leaq 0x825(%rip), %rdi       # 0x24e1
jmp 0x1cce
leaq 0x66c(%rip), %rdi       # 0x2331
jmp 0x1cce
leaq 0x651(%rip), %rdi       # 0x231f
callq 0x11d0
pushq $0x1
popq %rdi
callq 0x1140