// File: /workspace/github_cpp_makefile_star2_O3/hamikm[P]Raytracer/src/rgbcolor.hh
// Function: std::istream& operator>><double>(std::istream&, rgbcolor<double>&)
std::istream & operator>>(std::istream& is, rgbcolor<T> &col) {

	if(!is) { // If not ready...
		return is; // ...already failed, just return.
	}

	// Configure istream to throw an exception if the failbit gets set below.
	is.exceptions(std::ios_base::failbit);

	// Otherwise get the first char.
	char c;
	is >> c;
	if (c == '(') { // If it's the start of a color, then...

		// Set red component.
		T tmpcol;
		is >> tmpcol >> c;
		if (c != ',') { // If wasn't a comma after color, bad format.
			is.clear(std::ios_base::failbit);
		}
		col.setR(tmpcol);

		// Set green component.
		is >> tmpcol >> c;
		if (c != ',') { // If wasn't a comma after color, bad format.
			is.clear(std::ios_base::failbit);
		}
		col.setG(tmpcol);

		// Set red component.
		is >> tmpcol >> c;
		if (c != ')') { // If wasn't a comma after color, bad format.
			is.clear(std::ios_base::failbit);
		}
		col.setB(tmpcol);
	}
	else { // If first char wasn't (, put it back into the stream and return.
		is.putback(c);
		return is;
	}

	return is;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rdi
movl 0x20(%rbx,%rdi), %esi
testb $0x5, %sil
jne 0x4760
addq %rbx, %rdi
movl $0x4, 0x1c(%rdi)
callq 0x3280
leaq -0x19(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3210
movb (%r15), %al
cmpb $0x28, %al
jne 0x4755
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x3100
movq %rax, %rdi
movq %r15, %rsi
callq 0x3210
cmpb $0x2c, (%r15)
je 0x4679
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0x4, %esi
callq 0x3280
movsd -0x28(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x476e
movsd 0x4974(%rip), %xmm1     # 0x9008
ucomisd %xmm0, %xmm1
jb 0x476e
movsd %xmm0, (%r14)
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x3100
movq %rax, %rdi
movq %r15, %rsi
callq 0x3210
cmpb $0x2c, (%r15)
je 0x46d4
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0x4, %esi
callq 0x3280
movsd -0x28(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x478d
movsd 0x4919(%rip), %xmm1     # 0x9008
ucomisd %xmm0, %xmm1
jb 0x478d
movsd %xmm0, 0x8(%r14)
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x3100
movq %rax, %rdi
movq %r15, %rsi
callq 0x3210
cmpb $0x29, (%r15)
je 0x4730
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0x4, %esi
callq 0x3280
movsd -0x28(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x47ac
movsd 0x48c1(%rip), %xmm1     # 0x9008
ucomisd %xmm0, %xmm1
jb 0x47ac
movsd %xmm0, 0x10(%r14)
jmp 0x4760
movsbl %al, %esi
movq %rbx, %rdi
callq 0x32d0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4b2d(%rip), %rdi      # 0x92a2
leaq 0x4b37(%rip), %rsi      # 0x92b3
leaq 0x4b40(%rip), %rcx      # 0x92c3
movl $0x73, %edx
callq 0x30f0
leaq 0x4b5b(%rip), %rdi      # 0x92ef
leaq 0x4b18(%rip), %rsi      # 0x92b3
leaq 0x4b5e(%rip), %rcx      # 0x9300
movl $0x60, %edx
callq 0x30f0
leaq 0x4b79(%rip), %rdi      # 0x932c
leaq 0x4af9(%rip), %rsi      # 0x92b3
leaq 0x4b7c(%rip), %rcx      # 0x933d
movl $0x4d, %edx
callq 0x30f0
nop