// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x2def(%rip), %rbx      # 0x3fd8
leaq 0xe14(%rip), %rsi       # 0x2004
movq %rbx, %rdi
callq 0x1050
pushq $0x1
popq %r15
movq %rax, %rdi
movl %r15d, %esi
callq 0x1070
leaq 0xe4a(%rip), %r14       # 0x2058
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
xorl %esi, %esi
callq 0x1070
leaq 0xdf0(%rip), %rsi       # 0x201a
movq %rax, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
orl $0x1, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0x1070
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
xorl %esi, %esi
callq 0x1070
movq %rax, %rdi
callq 0x1030
movq (%rbx), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%rbx,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1070
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
andl $-0x2, 0x18(%rax,%rcx)
movq %rbx, %rdi
callq 0x1030
leaq 0xd98(%rip), %r12       # 0x202f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1050
pushq $0x14
popq %r15
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq %rax, %rdi
callq 0x1030
leaq 0xd64(%rip), %rsi       # 0x203c
movq %rbx, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x40, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq %rax, %rdi
callq 0x1030
leaq 0xd20(%rip), %rsi       # 0x2047
movq %rbx, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq %rax, %rdi
callq 0x1030
leaq 0xcda(%rip), %rsi       # 0x2050
movq %rbx, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq %rax, %rdi
callq 0x1030
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl $0x200, %r13d           # imm = 0x200
orl %r13d, 0x18(%rbx,%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1050
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq %rax, %rdi
callq 0x1030
leaq 0xc2c(%rip), %rsi       # 0x2039
movq %rbx, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x40, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq %rax, %rdi
callq 0x1030
leaq 0xbe8(%rip), %rsi       # 0x2044
movq %rbx, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq %rax, %rdi
callq 0x1030
leaq 0xba2(%rip), %rsi       # 0x204d
movq %rbx, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq %rax, %rdi
callq 0x1030
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl $0xfffffdff, %r12d      # imm = 0xFFFFFDFF
andl %r12d, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rcx
orl $0x4000, 0x18(%rbx,%rcx) # imm = 0x4000
movq -0x18(%rax), %rcx
orl %r13d, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0xb27(%rip), %rsi       # 0x205a
movq %rbx, %rdi
callq 0x1050
movq %rax, %rdi
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rax, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
andl $0xffffbfff, 0x18(%rax,%rdx) # imm = 0xFFFFBFFF
movq -0x18(%rcx), %rdx
andl %r12d, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq