// File: /workspace/github_cpp_makefile_star2_O1/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 0x4768
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 0x475d
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x3100
movq %rax, %rdi
movq %r15, %rsi
callq 0x3210
cmpb $0x2c, (%r15)
je 0x4681
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 0x4776
movsd 0x496c(%rip), %xmm1     # 0x9008
ucomisd %xmm0, %xmm1
jb 0x4776
movsd %xmm0, (%r14)
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x3100
movq %rax, %rdi
movq %r15, %rsi
callq 0x3210
cmpb $0x2c, (%r15)
je 0x46dc
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 0x4795
movsd 0x4911(%rip), %xmm1     # 0x9008
ucomisd %xmm0, %xmm1
jb 0x4795
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 0x4738
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 0x47b4
movsd 0x48b9(%rip), %xmm1     # 0x9008
ucomisd %xmm0, %xmm1
jb 0x47b4
movsd %xmm0, 0x10(%r14)
jmp 0x4768
movsbl %al, %esi
movq %rbx, %rdi
callq 0x32d0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4b25(%rip), %rdi      # 0x92a2
leaq 0x4b2f(%rip), %rsi      # 0x92b3
leaq 0x4b38(%rip), %rcx      # 0x92c3
movl $0x73, %edx
callq 0x30f0
leaq 0x4b53(%rip), %rdi      # 0x92ef
leaq 0x4b10(%rip), %rsi      # 0x92b3
leaq 0x4b56(%rip), %rcx      # 0x9300
movl $0x60, %edx
callq 0x30f0
leaq 0x4b71(%rip), %rdi      # 0x932c
leaq 0x4af1(%rip), %rsi      # 0x92b3
leaq 0x4b74(%rip), %rcx      # 0x933d
movl $0x4d, %edx
callq 0x30f0
nop