// File: /workspace/github_cpp_makefile_star2_O2/chahk0129[P]hash_bench/./index/extendible_hash.h
// Function: Segment<char [32]>::Split()
Segment<Key_t>** Segment<Key_t>::Split(void){
    Segment<Key_t>** split = new Segment<Key_t>*[2];
#ifdef INPLACE
    split[0] = this;
#else
    split[0] = new Segment<Key_t>(local_depth+1);
#endif
    split[1] = new Segment<Key_t>(local_depth+1);

    auto pattern = ((size_t)1 << (sizeof(size_t)*8 - local_depth - 1));
    for (unsigned i = 0; i < kNumSlot; ++i) {
	size_t f_hash;
	if constexpr(sizeof(Key_t) > 8)
	    f_hash = hash_funcs[0](_[i].key, sizeof(Key_t), f_seed);
	else
	    f_hash = hash_funcs[0](&_[i].key, sizeof(Key_t), f_seed);

	if(f_hash & pattern){
	    if(!split[1]->Insert4split(_[i].key, _[i].value, (f_hash & kMask)*kNumPairPerCacheLine)){
#ifdef S_HASH
		size_t s_hash;
		if constexpr(sizeof(Key_t) > 8)
		    s_hash = hash_funcs[2](_[i].key, sizeof(Key_t), s_seed);
		else
		    s_hash = hash_funcs[2](&_[i].key, sizeof(Key_t), s_seed);
		if(!split[1]->Insert4split(_[i].key, _[i].value, (s_hash & kMask)*kNumPairPerCacheLine)){
		    cerr << "[" << __func__ << "]: something wrong -- need to adjust probing distance" << endl;
		}
#else
		cerr << "[" << __func__ << "]: something wrong -- need to adjust probing distance" << endl;
#endif
	    }
	}
#ifndef INPLACE
	else{
	    if(!split[0]->Insert4split(_[i].key, _[i].value, (f_hash & kMask)*kNumPairPerCacheLine)){
#ifdef S_HASH
		size_t s_hash;
		if constexpr(sizeof(Key_t) > 8)
		    s_hash = hash_funcs[2](_[i].key, sizeof(Key_t), s_seed);
		else
		    s_hash = hash_funcs[2](&_[i].key, sizeof(Key_t), s_seed);
		if(!split[0]->Insert4split(_[i].key, _[i].value, (s_hash & kMask)*kNumPairPerCacheLine)){
		    cerr << "[" << __func__ << "]: something wrong -- need to adjust probing distance" << endl;
		}
#else
		cerr << "[" << __func__ << "]: something wrong -- need to adjust probing distance" << endl;
#endif
	    }
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r15
movl $0xa040, %edi           # imm = 0xA040
callq 0x21e0
movq %rax, %rbx
movq 0xa000(%r14), %rsi
incq %rsi
movq %rax, %rdi
callq 0x7882
movq %rbx, 0x10(%rsp)
movq %rbx, (%r15)
movl $0xa040, %edi           # imm = 0xA040
callq 0x21e0
movq %rax, %r12
movq 0xa000(%r14), %rsi
incq %rsi
movq %rax, %rdi
callq 0x7882
movq %r15, 0x8(%rsp)
movq %r12, 0x8(%r15)
movb 0xa000(%r14), %cl
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
shrq %cl, %r15
xorl %ebx, %ebx
pushq $0x20
popq %r13
cmpq $0xa000, %rbx           # imm = 0xA000
je 0x8258
leaq (%r14,%rbx), %rbp
movl $0xc70697, %edx         # imm = 0xC70697
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2040
movzbl %al, %ecx
shll $0x2, %ecx
movq 0x20(%r14,%rbx), %rdx
testq %r15, %rax
je 0x8205
movq %r12, %rdi
jmp 0x820a
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x83ac
testb %al, %al
jne 0x824f
movq 0xbdcb(%rip), %rdi      # 0x13fe8
leaq 0x4180(%rip), %rsi      # 0xc3a4
callq 0x21d0
movq %rax, %rdi
leaq 0x4173(%rip), %rsi      # 0xc3a6
callq 0x21d0
movq %rax, %rdi
leaq 0x416a(%rip), %rsi      # 0xc3ac
callq 0x21d0
movq %rax, %rdi
callq 0x20c0
addq $0x28, %rbx
jmp 0x81d3
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r12, %rdi
jmp 0x827a
movq %rbx, %rdi
movq %rax, %r14
movl $0xa040, %esi           # imm = 0xA040
callq 0x21f0
movq %r14, %rdi
callq 0x2340