// File: /workspace/github_cpp_makefile_star2_O2/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)
pushq $0x5
popq %rax
cmpq $0x14, %rax
je 0x66fb
movb -0x1(%rbx,%rax), %cl
incb %cl
movb %cl, (%rbx,%rax)
incq %rax
jmp 0x66e7
pushq $0x13
popq %r14
cmpq $0x3, %r14
jbe 0x6727
callq 0x40b0
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
jmp 0x66ff
xorl %eax, %eax
cmpq $0x4, %rax
je 0x673a
movb 0x4(%rbx), %cl
movb %cl, (%rbx,%rax)
incq %rax
jmp 0x6729
leaq 0x22(%rbx), %rdx
pushq $0x4
popq %rax
cmpq $0x14, %rax
je 0x6754
movzbl (%rbx,%rax), %ecx
movb %al, 0x22(%rbx,%rcx)
incq %rax
jmp 0x6741
movq 0x7865(%rip), %rax      # 0xdfc0
cmpb $0x1, (%rax)
jne 0x68fe
movq %rdx, (%rsp)
leaq 0x2e0b(%rip), %r15      # 0x957a
pushq $0x70
popq %rbp
pushq $0x2
popq %r12
xorl %r14d, %r14d
cmpq $0x14, %r14
je 0x67de
callq 0x4200
movq %rax, %r13
callq 0x4280
movzbl (%rbx,%r14), %r10d
movl $0x1000, %esi           # imm = 0x1000
movq %r13, %rdi
leaq 0x31a4(%rip), %rdx      # 0x9944
movq %rax, %rcx
movq %r15, %r8
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
pushq %r14
callq 0x4560
popq %rcx
popq %rdx
callq 0x4200
movq %rax, %r13
callq 0x4200
movq %rax, %rdi
callq 0x4130
movl %r12d, %edi
movq %r13, %rsi
movq %rax, %rdx
callq 0x4100
incq %r14
jmp 0x6779
pushq $0x73
popq %rbp
pushq $0x2
popq %r13
xorl %r12d, %r12d
callq 0x4200
movq %rax, %r15
callq 0x4280
movq %rax, %r14
cmpq $0x10, %r12
je 0x6855
movzbl 0x22(%rbx,%r12), %r10d
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
leaq 0x3169(%rip), %rdx      # 0x997c
movq %r14, %rcx
leaq 0x2d5d(%rip), %r8       # 0x957a
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
pushq %r12
callq 0x4560
popq %rcx
popq %rdx
callq 0x4200
movq %rax, %r14
callq 0x4200
movq %rax, %rdi
callq 0x4130
movl %r13d, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4100
incq %r12
jmp 0x67e8
leaq 0x3158(%rip), %rdx      # 0x99b4
leaq 0x2d17(%rip), %r12      # 0x957a
pushq $0x75
popq %r9
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
pushq $0x13
pushq $0x10
callq 0x4560
popq %rcx
popq %rdx
callq 0x4200
movq %rax, %r15
callq 0x4200
movq %rax, %rdi
callq 0x4130
pushq $0x2
popq %rbp
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4100
callq 0x4200
leaq 0x3149(%rip), %rdx      # 0x99fc
pushq $0x76
popq %r9
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
pushq (%rsp)
pushq %rbx
callq 0x4560
popq %rcx
popq %rdx
callq 0x4200
movq %rax, %rbx
callq 0x4200
movq %rax, %rdi
callq 0x4130
movl %ebp, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4100
movq 0x76c5(%rip), %rax      # 0xdfc0
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop