// File: /workspace/github_cpp_makefile_star2_O1/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
movb $0x0, 0x4(%rdi)
movl $0x5, %eax
leal -0x4(%rax), %ecx
movb %cl, (%rbx,%rax)
incq %rax
cmpq $0x14, %rax
jne 0x6833
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 0x6848
xorl %eax, %eax
movb 0x4(%rbx), %cl
movb %cl, (%rbx,%rax)
incq %rax
cmpq $0x4, %rax
jne 0x6870
movl $0x4, %eax
movzbl (%rbx,%rax), %ecx
movb %al, 0x22(%rbx,%rcx)
incq %rax
cmpq $0x14, %rax
jne 0x6884
movq 0x6724(%rip), %r13      # 0xcfc0
cmpb $0x1, (%r13)
jne 0x6a54
leaq 0x3096(%rip), %r14      # 0x9944
leaq 0x2cc5(%rip), %r15      # 0x957a
xorl %ebp, %ebp
callq 0x41e0
movq %rax, %r12
callq 0x4250
movzbl (%rbx,%rbp), %r10d
movl $0x1000, %esi           # imm = 0x1000
movq %r12, %rdi
movq %r14, %rdx
movq %rax, %rcx
movq %r15, %r8
movl $0x70, %r9d
xorl %eax, %eax
pushq %r10
pushq %rbp
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
incq %rbp
cmpq $0x14, %rbp
jne 0x68b7
leaq 0x3059(%rip), %r14      # 0x997c
leaq 0x2c50(%rip), %r15      # 0x957a
xorl %ebp, %ebp
callq 0x41e0
movq %rax, %r12
callq 0x4250
movzbl 0x22(%rbx,%rbp), %r10d
movl $0x1000, %esi           # imm = 0x1000
movq %r12, %rdi
movq %r14, %rdx
movq %rax, %rcx
movq %r15, %r8
movl $0x73, %r9d
xorl %eax, %eax
pushq %r10
pushq %rbp
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
incq %rbp
cmpq $0x10, %rbp
jne 0x692c
callq 0x41e0
movq %rax, %r12
callq 0x4250
movq %rax, %r14
leaq 0x300b(%rip), %rdx      # 0x99b4
leaq 0x2bca(%rip), %r15      # 0x957a
movl $0x1000, %esi           # imm = 0x1000
movq %r12, %rdi
movq %rax, %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 0x22(%rbx), %r10
leaq 0x2ff4(%rip), %rdx      # 0x99fc
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
movq %r14, %rcx
movq %r15, %r8
movl $0x76, %r9d
xorl %eax, %eax
pushq %r10
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
movb $0x0, (%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop