// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]tundra/unittest/Test_Pow2.cpp
// Function: Pow2_Basic_Test::TestBody()
TEST(Pow2, Basic)
{
  EXPECT_EQ(0, NextPowerOfTwo(0));
  EXPECT_EQ(1, NextPowerOfTwo(1));
  EXPECT_EQ(2, NextPowerOfTwo(2));
  EXPECT_EQ(4, NextPowerOfTwo(3));
  EXPECT_EQ(4, NextPowerOfTwo(4));
  EXPECT_EQ(8, NextPowerOfTwo(5));
  EXPECT_EQ(8, NextPowerOfTwo(7));
  EXPECT_EQ(8, NextPowerOfTwo(8));
  EXPECT_EQ(128, NextPowerOfTwo(126));
  EXPECT_EQ(65536, NextPowerOfTwo(65500));
  EXPECT_EQ(0x80000000, NextPowerOfTwo(0x78a1987a));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0x10(%rsp), %rbx
andl $0x0, (%rbx)
xorl %edi, %edi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x16d97(%rip), %rsi     # 0x45b08
leaq 0x18979(%rip), %rdx     # 0x476f1
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2ede8
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2eda7
movq (%rax), %r8
jmp 0x2edae
leaq 0x1b0f9(%rip), %r8      # 0x49ea7
leaq 0x18925(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x8
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x1, (%rbx)
pushq $0x1
popq %rdi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x16333(%rip), %rsi     # 0x45147
leaq 0x188e8(%rip), %rdx     # 0x47703
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2ee8b
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2ee4a
movq (%rax), %r8
jmp 0x2ee51
leaq 0x1b056(%rip), %r8      # 0x49ea7
leaq 0x18882(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x9
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x2, (%rbx)
pushq $0x2
popq %rdi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x19cb2(%rip), %rsi     # 0x48b69
leaq 0x18857(%rip), %rdx     # 0x47715
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2ef2e
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2eeed
movq (%rax), %r8
jmp 0x2eef4
leaq 0x1afb3(%rip), %r8      # 0x49ea7
leaq 0x187df(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0xa
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x4, (%rbx)
pushq $0x3
popq %rdi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x18094(%rip), %rsi     # 0x46fee
leaq 0x187c6(%rip), %rdx     # 0x47727
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2efd1
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2ef90
movq (%rax), %r8
jmp 0x2ef97
leaq 0x1af10(%rip), %r8      # 0x49ea7
leaq 0x1873c(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0xb
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x4, (%rbx)
pushq $0x4
popq %rdi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x17ff1(%rip), %rsi     # 0x46fee
leaq 0x18735(%rip), %rdx     # 0x47739
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2f074
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f033
movq (%rax), %r8
jmp 0x2f03a
leaq 0x1ae6d(%rip), %r8      # 0x49ea7
leaq 0x18699(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0xc
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x8, (%rbx)
pushq $0x5
popq %rdi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x186e3(%rip), %rsi     # 0x47783
leaq 0x186a4(%rip), %rdx     # 0x4774b
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2f117
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f0d6
movq (%rax), %r8
jmp 0x2f0dd
leaq 0x1adca(%rip), %r8      # 0x49ea7
leaq 0x185f6(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0xd
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x8, (%rbx)
pushq $0x7
popq %rdi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x18640(%rip), %rsi     # 0x47783
leaq 0x18613(%rip), %rdx     # 0x4775d
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2f1ba
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f179
movq (%rax), %r8
jmp 0x2f180
leaq 0x1ad27(%rip), %r8      # 0x49ea7
leaq 0x18553(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0xe
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x8, (%rbx)
pushq $0x8
popq %rdi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x1859d(%rip), %rsi     # 0x47783
leaq 0x18582(%rip), %rdx     # 0x4776f
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2f25d
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f21c
movq (%rax), %r8
jmp 0x2f223
leaq 0x1ac84(%rip), %r8      # 0x49ea7
leaq 0x184b0(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0xf
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x80, (%rbx)
pushq $0x7e
popq %rdi
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x184f8(%rip), %rsi     # 0x47781
leaq 0x184f5(%rip), %rdx     # 0x47785
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2f300
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f2bf
movq (%rax), %r8
jmp 0x2f2c6
leaq 0x1abe1(%rip), %r8      # 0x49ea7
leaq 0x1840d(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x10000, (%rbx)        # imm = 0x10000
movl $0xffdc, %edi           # imm = 0xFFDC
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x1846b(%rip), %rsi     # 0x47799
leaq 0x1846a(%rip), %rdx     # 0x4779f
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2f537
cmpb $0x0, (%r14)
jne 0x2f3a5
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f364
movq (%rax), %r8
jmp 0x2f36b
leaq 0x1ab3c(%rip), %r8      # 0x49ea7
leaq 0x18368(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x11
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
leaq 0x10(%rsp), %rbx
movl $0x80000000, (%rbx)     # imm = 0x80000000
movl $0x78a1987a, %edi       # imm = 0x78A1987A
callq 0x3417d
leaq 0x8(%rsp), %r8
movl %eax, (%r8)
leaq 0x183e2(%rip), %rsi     # 0x477b5
leaq 0x183e6(%rip), %rdx     # 0x477c0
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x28dd2
cmpb $0x0, (%r14)
jne 0x2f44a
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f409
movq (%rax), %r8
jmp 0x2f410
leaq 0x1aa97(%rip), %r8      # 0x49ea7
leaq 0x182c3(%rip), %rdx     # 0x476da
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x12
popq %rcx
callq 0x104f8
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x20(%rsp), %rdi
callq 0x2295e
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x2f496
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
jmp 0x2f496
jmp 0x2f4b6
jmp 0x2f4a7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x10558
jmp 0x2f4aa
jmp 0x2f4b6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
jmp 0x2f4b9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2295e
movq %rbx, %rdi
callq 0xdbf0
nop