// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/manips.cc
// Function: main
int main()
{
	bool b;
	cout << "default bool values: " << true << " " << false
	     << "\nalpha bool values: " << boolalpha 
		 << true << " " << false << endl;
	
	bool bool_val = get_status();
	cout << boolalpha    // sets the internal state of cout
	     << bool_val
	     << noboolalpha; // resets the internal state to default formatting
	cout << endl;
	
	const int ival = 15, jval = 1024;  // const, so values never change
	
	cout << "default: " << 20 << " " << 1024 << endl;
	cout << "octal: " << oct << 20 << " " << 1024 << endl;
	cout << "hex: " << hex << 20 << " " << 1024 << endl;
	cout << "decimal: " << dec << 20 << " " << 1024 << endl;
	
	
	cout << showbase;    // show the base when printing integral values
	cout << "default: " << 20 << " " << 1024 << endl;
	cout << "in octal: " << oct  << 20 << " " << 1024 << endl;
	cout << "in hex: " << hex  << 20 << " " << 1024 << endl;
	cout << "in decimal: " << dec << 20 << " " << 1024 << endl;
	cout << noshowbase;  // reset the state of the stream
	
	cout << uppercase << showbase << hex
	     << "printed in hexadecimal: " << 20 << " " << 1024 
	     << nouppercase << noshowbase << dec << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x2dd2(%rip), %rbx      # 0x3fd8
leaq 0xdf7(%rip), %rsi       # 0x2004
movl $0x15, %edx
movq %rbx, %rdi
callq 0x1070
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1090
movq %rax, %r15
leaq 0xe27(%rip), %r14       # 0x2058
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r15, %rdi
xorl %esi, %esi
callq 0x1090
movq %rax, %r15
leaq 0xdc5(%rip), %rsi       # 0x201a
movl $0x14, %edx
movq %rax, %rdi
callq 0x1070
movq (%r15), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%r15,%rax)
movq %r15, %rdi
movl $0x1, %esi
callq 0x1090
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r15, %rdi
xorl %esi, %esi
callq 0x1090
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq (%rbx), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%rbx,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1090
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
andl $-0x2, 0x18(%rax,%rcx)
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq 0xd1c(%rip), %r15       # 0x202f
movl $0x9, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1070
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r12, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq 0xcbb(%rip), %rsi       # 0x203c
movl $0x7, %edx
movq %rbx, %rdi
callq 0x1070
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x40, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r12, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq 0xc46(%rip), %rsi       # 0x2047
movl $0x5, %edx
movq %rbx, %rdi
callq 0x1070
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r12, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq 0xbcf(%rip), %rsi       # 0x2050
movl $0x9, %edx
movq %rbx, %rdi
callq 0x1070
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r12, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl $0x200, %r12d           # imm = 0x200
orl %r12d, 0x18(%rbx,%rax)
movl $0x9, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1070
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq 0xabf(%rip), %rsi       # 0x2039
movl $0xa, %edx
movq %rbx, %rdi
callq 0x1070
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x40, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq 0xa4a(%rip), %rsi       # 0x2044
movl $0x8, %edx
movq %rbx, %rdi
callq 0x1070
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq 0x9d3(%rip), %rsi       # 0x204d
movl $0xc, %edx
movq %rbx, %rdi
callq 0x1070
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl $0xfffffdff, %r15d      # imm = 0xFFFFFDFF
andl %r15d, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rcx
orl $0x4000, 0x18(%rbx,%rcx) # imm = 0x4000
movq -0x18(%rax), %rcx
orl %r12d, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0x927(%rip), %rsi       # 0x205a
movl $0x18, %edx
movq %rbx, %rdi
callq 0x1070
movq %rbx, %rdi
movl $0x14, %esi
callq 0x10a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
movq %rbx, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rcx
andl $0xffffbfff, 0x18(%rbx,%rcx) # imm = 0xFFFFBFFF
movq -0x18(%rax), %rcx
andl %r15d, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq