// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/setw.cc
// Function: main
int main()
{
	int i = -16;
	double d = 3.14159;
	
	// pad the first column to use a minimum of 12 positions in the output
	cout << "i: " << setw(12) << i << "next col" << '\n'
	     << "d: " << setw(12) << d << "next col" << '\n';
	
	// pad the first column and left-justify all columns
	cout << left 
	     << "i: " << setw(12) << i << "next col" << '\n'
	     << "d: " << setw(12) << d << "next col" << '\n'
	     << right;           // restore normal justification
	
	// pad the first column and right-justify all columns
	cout << right
	     << "i: " << setw(12) << i << "next col" << '\n'
	     << "d: " << setw(12) << d << "next col" << '\n';
	
	// pad the first column but put the padding internal to the field
	cout << internal
	     << "i: " << setw(12) << i << "next col" << '\n'
	     << "d: " << setw(12) << d << "next col" << '\n';
	
	// pad the first column, using # as the pad character
	cout << setfill('#')
	     << "i: " << setw(12) << i << "next col" << '\n'
	     << "d: " << setw(12) << d << "next col" << '\n'
	     << setfill(' ');   // restore the normal pad character

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x2df4(%rip), %rbx      # 0x3fd8
leaq 0xe25(%rip), %rsi       # 0x2010
movl $0x3, %edx
movq %rbx, %rdi
callq 0x1050
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl $0xc, %ecx
movq %rcx, 0x10(%rbx,%rax)
movq %rbx, %rdi
movl $0xfffffff0, %esi       # imm = 0xFFFFFFF0
callq 0x1080
movq %rax, %r12
leaq 0xdf4(%rip), %rsi       # 0x2014
movl $0x8, %edx
movq %rax, %rdi
movq %rsi, %r15
callq 0x1050
movb $0xa, %al
leaq -0x29(%rbp), %rsi
movb %al, (%rsi)
movb $0xa, %r14b
movl $0x1, %edx
movq %r12, %rdi
callq 0x1050
movq %rax, %r13
leaq 0xdcb(%rip), %rsi       # 0x201d
movl $0x3, %edx
movq %rax, %rdi
callq 0x1050
movq (%r13), %rax
movq -0x18(%rax), %rax
movl $0xc, %ecx
movq %rcx, 0x10(%r13,%rax)
movsd 0xd8f(%rip), %xmm0      # 0x2008
movq %r13, %rdi
callq 0x1070
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
movq %r15, %r12
movq %r15, %rsi
callq 0x1050
leaq -0x2a(%rbp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
movq %r13, %rdi
callq 0x1050
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl $0xffffff4f, %r15d      # imm = 0xFFFFFF4F
movl 0x18(%rbx,%rax), %ecx
andl %r15d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%rbx,%rax)
movl $0x3, %edx
movq %rbx, %rdi
leaq 0xd3b(%rip), %rsi       # 0x2010
callq 0x1050
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl $0xc, %ecx
movq %rcx, 0x10(%rbx,%rax)
movq %rbx, %rdi
movl $0xfffffff0, %esi       # imm = 0xFFFFFFF0
callq 0x1080
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x1050
leaq -0x2b(%rbp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
movq %r13, %rdi
callq 0x1050
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0xcec(%rip), %rsi       # 0x201d
callq 0x1050
movq (%r13), %rax
movq -0x18(%rax), %rax
movl $0xc, %ecx
movq %rcx, 0x10(%r13,%rax)
movq %r13, %rdi
movsd 0xcb5(%rip), %xmm0      # 0x2008
callq 0x1070
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x1050
leaq -0x2c(%rbp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
movq %r13, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl %r15d, %edx
movl $0x80, %esi
orl %esi, %edx
movl %edx, 0x18(%rax,%rcx)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl %r15d, %ecx
orl %esi, %ecx
movl %ecx, 0x18(%rbx,%rax)
movl $0x3, %edx
movq %rbx, %rdi
leaq 0xc55(%rip), %rsi       # 0x2010
callq 0x1050
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl $0xc, %r12d
movq %r12, 0x10(%rbx,%rax)
movq %rbx, %rdi
movl $0xfffffff0, %esi       # imm = 0xFFFFFFF0
callq 0x1080
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
leaq 0xc23(%rip), %r14       # 0x2014
movq %r14, %rsi
callq 0x1050
leaq -0x2d(%rbp), %rsi
movb $0xa, %al
movb %al, (%rsi)
movl $0x1, %edx
movq %r13, %rdi
callq 0x1050
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0xbfd(%rip), %rsi       # 0x201d
callq 0x1050
movq (%r13), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r13,%rax)
movq %r13, %rdi
movsd 0xbcb(%rip), %xmm0      # 0x2008
callq 0x1070
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
leaq -0x2e(%rbp), %rsi
movb $0xa, %al
movb %al, (%rsi)
movl $0x1, %edx
movq %r13, %rdi
movb $0xa, %r13b
callq 0x1050
movq (%rbx), %rax
movq -0x18(%rax), %rax
andl 0x18(%rbx,%rax), %r15d
orl $0x10, %r15d
movl %r15d, 0x18(%rbx,%rax)
movl $0x3, %edx
movq %rbx, %rdi
leaq 0xb7f(%rip), %rsi       # 0x2010
callq 0x1050
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%rbx,%rax)
movq %rbx, %rdi
movl $0xfffffff0, %esi       # imm = 0xFFFFFFF0
callq 0x1080
movq %rax, %r15
movl $0x8, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
leaq -0x2f(%rbp), %rsi
movb %r13b, (%rsi)
movl $0x1, %edx
movq %r15, %rdi
callq 0x1050
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0xb35(%rip), %rsi       # 0x201d
callq 0x1050
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r15,%rax)
movq %r15, %rdi
movsd 0xb04(%rip), %xmm0      # 0x2008
callq 0x1070
movq %rax, %r15
movl $0x8, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
leaq -0x30(%rbp), %rsi
movb %r13b, (%rsi)
movl $0x1, %edx
movq %r15, %rdi
callq 0x1050
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r14
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x1561
movq %r14, %rdi
movl $0x20, %esi
callq 0x1040
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x23, 0xe0(%r14)
leaq 0xaa0(%rip), %rsi       # 0x2010
movl $0x3, %edx
movq %rbx, %rdi
callq 0x1050
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%rbx,%rax)
movq %rbx, %rdi
movl $0xfffffff0, %esi       # imm = 0xFFFFFFF0
callq 0x1080
movq %rax, %r14
leaq 0xa74(%rip), %rbx       # 0x2014
movl $0x8, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1050
leaq -0x31(%rbp), %rsi
movb %r13b, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x1050
movq %rax, %r14
leaq 0xa4f(%rip), %rsi       # 0x201d
movl $0x3, %edx
movq %rax, %rdi
callq 0x1050
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
movsd 0xa19(%rip), %xmm0      # 0x2008
movq %r14, %rdi
callq 0x1070
movq %rax, %r14
movl $0x8, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1050
leaq -0x32(%rbp), %rsi
movb %r13b, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x1050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rbx
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x164d
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1040
movb %al, 0xe0(%rbx)
movb $0x1, 0xe1(%rbx)
movb $0x20, 0xe0(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq