// File: /workspace/github_cpp_makefile_star2_O3/UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::PerThreadMap::initialize(unsigned int)
void initialize(unsigned classSizePowerMax) {
					int i;

					// Initialize the classSize-to-bag mapping with sorted powers-of-two
					unsigned minClassSizePower = LOG2(BIBOP_MIN_BLOCK_SIZE);
					unsigned numClassSizePowers = BIBOP_NUM_BAGS + minClassSizePower - 1;
					classSizeToBag[minClassSizePower] = 0;
					for(i = minClassSizePower + 1; i <= numClassSizePowers; i++) {
							classSizeToBag[i] = classSizeToBag[i - 1] + 1;
					}

					// Shuffle the contents of the classSize-to-bag mapping,
					// which will randomize the bag ordering for the subheap
					for(i = numClassSizePowers; i >= minClassSizePower; i--) {
							unsigned j = getRandomNumber() % ((i - minClassSizePower) + 1);
							unsigned temp = classSizeToBag[i];
							classSizeToBag[i] = classSizeToBag[j + minClassSizePower];
							classSizeToBag[j + minClassSizePower] = temp;
					}
					for(i = 0; i < minClassSizePower; i++) {
							classSizeToBag[i] = classSizeToBag[minClassSizePower];
					}

					// Initialize the bag-to-classSize mapping
					for(i = minClassSizePower; i <= numClassSizePowers; i++) {
							bagToClassSize[classSizeToBag[i]] = i;
					}

					static bool isFirstThread = true;
					if(isFirstThread) {
							// DEBUG OUTPUT
							for(i = 0; i <= numClassSizePowers; i++) {
									PRDBG("classSizeToBag[%u] = %u", i, classSizeToBag[i]);
							}
							for(i = 0; i < BIBOP_NUM_BAGS; i++) {
									PRDBG("bagToClassSize[%u] = %u", i, bagToClassSize[i]);
							}
							PRDBG("num bags=%d, num class size powers = %d", BIBOP_NUM_BAGS, numClassSizePowers);
							PRDBG("&classSizeToBag = %p, &bagToClassSize = %p", classSizeToBag, bagToClassSize);
							isFirstThread = false;
					}
			}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movaps 0x2825(%rip), %xmm0     # 0x9070
movups %xmm0, 0x4(%rdi)
movl $0x13, %r14d
callq 0x40a0
leal -0x3(%r14), %ecx
xorl %edx, %edx
divl %ecx
movb (%rbx,%r14), %al
movb 0x4(%rdx,%rbx), %cl
movb %cl, (%rbx,%r14)
movb %al, 0x4(%rdx,%rbx)
decq %r14
cmpq $0x3, %r14
ja 0x6855
movdqu 0x4(%rbx), %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
movd %xmm0, (%rbx)
leaq 0x22(%rbx), %rdx
movl $0x4, %eax
movzbl (%rbx,%rax), %ecx
movb %al, 0x22(%rbx,%rcx)
incq %rax
cmpq $0x14, %rax
jne 0x6896
movq 0x6712(%rip), %rax      # 0xcfc0
cmpb $0x1, (%rax)
jne 0x6a5a
movq %rdx, (%rsp)
leaq 0x3092(%rip), %r15      # 0x9954
leaq 0x2cc1(%rip), %r12      # 0x958a
xorl %ebp, %ebp
callq 0x41e0
movq %rax, %r13
callq 0x4250
movq %rax, %r14
movzbl (%rbx,%rbp), %r10d
movl $0x1000, %esi           # imm = 0x1000
movq %r13, %rdi
movq %r15, %rdx
movq %rax, %rcx
movq %r12, %r8
movl $0x70, %r9d
xorl %eax, %eax
pushq %r10
pushq %rbp
callq 0x4490
addq $0x10, %rsp
callq 0x41e0
movq %rax, %r13
callq 0x41e0
movq %rax, %rdi
callq 0x4120
movl $0x2, %edi
movq %r13, %rsi
movq %rax, %rdx
callq 0x40f0
incq %rbp
cmpq $0x14, %rbp
jne 0x68cb
leaq 0x3052(%rip), %r15      # 0x998c
leaq 0x2c49(%rip), %r12      # 0x958a
xorl %ebp, %ebp
callq 0x41e0
movzbl 0x22(%rbx,%rbp), %r10d
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
movl $0x73, %r9d
xorl %eax, %eax
pushq %r10
pushq %rbp
callq 0x4490
addq $0x10, %rsp
callq 0x41e0
movq %rax, %r13
callq 0x41e0
movq %rax, %rdi
callq 0x4120
movl $0x2, %edi
movq %r13, %rsi
movq %rax, %rdx
callq 0x40f0
incq %rbp
cmpq $0x10, %rbp
jne 0x6943
callq 0x41e0
leaq 0x3017(%rip), %rdx      # 0x99c4
leaq 0x2bd6(%rip), %r15      # 0x958a
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
movq %r14, %rcx
movq %r15, %r8
movl $0x75, %r9d
xorl %eax, %eax
pushq $0x13
pushq $0x10
callq 0x4490
addq $0x10, %rsp
callq 0x41e0
movq %rax, %r12
callq 0x41e0
movq %rax, %rdi
callq 0x4120
movl $0x2, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x40f0
callq 0x41e0
leaq 0x3004(%rip), %rdx      # 0x9a0c
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
movq %r14, %rcx
movq %r15, %r8
movl $0x76, %r9d
xorl %eax, %eax
pushq (%rsp)
pushq %rbx
callq 0x4490
addq $0x10, %rsp
callq 0x41e0
movq %rax, %rbx
callq 0x41e0
movq %rax, %rdi
callq 0x4120
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x40f0
movq 0x6569(%rip), %rax      # 0xcfc0
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop