// File: errantlinguist[P]Forecast/src/forecast_io/parsers/NotifyingForecastParser.cpp
// Function: forecast_io::parsers::NotifyingForecastParser::parseAttribute(forecast_io::parsers::ForecastAttribute const&, json_object* const&)
void NotifyingForecastParser::parseAttribute(const ForecastAttribute& attribute,
		json_object* const & pValue)
{
	switch (attribute)
	{
	case ForecastAttribute::ALERTS:
	{
		alertsParser.parse(pValue);
		break;
	}
	case ForecastAttribute::CURRENTLY:
	{
		synchronicDataPointParser.parse(pValue);
		break;
	}
	case ForecastAttribute::DAILY:
	{
		// TODO: Implement parsing of "daily" data points
		break;
	}
	case ForecastAttribute::FLAGS:
	{
		flagParser.parse(pValue);
		break;
	}
	case ForecastAttribute::HOURLY:
	{
		// TODO: Implement parsing of "hourly" data points
		break;
	}
	case ForecastAttribute::LATITUDE:
	{
		const double latitude(json_object_get_double(pValue));
		for (listeners::ForecastDetailsListener* const & pListener : getListeners())
		{
			pListener->notifyLatitude(latitude);
		}
		break;
	}
	case ForecastAttribute::LONGITUDE:
	{
		const double longitude(json_object_get_double(pValue));
		for (listeners::ForecastDetailsListener* const & pListener : getListeners())
		{
			pListener->notifyLongitude(longitude);
		}
		break;
	}
	case ForecastAttribute::MINUTELY:
	{
		// TODO: Implement parsing of "minutely" data points
		break;
	}
	case ForecastAttribute::OFFSET:
	{
		const signed char offset(
				static_cast<signed char>(json_object_get_int64(pValue)));
		for (listeners::ForecastDetailsListener* const & pListener : getListeners())
		{
			pListener->notifyOffset(offset);
		}
		break;
	}
	case ForecastAttribute::TIMEZONE:
	{
		const std::string timezone(json_object_get_string(pValue));
		for (listeners::ForecastDetailsListener* const & pListener : getListeners())
		{
			pListener->notifyTimezone(timezone);
		}
		break;
	}
	default:
	{
		throw std::logic_error(
				createUndefinedAttributeErrorMessage(ForecastAttribute_NAME,
						attribute));
		break;
	}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x118(%rbp)
subq $0x9, %rax
ja 0x5c6e8
movq -0x118(%rbp), %rax
leaq 0xc0a9(%rip), %rcx      # 0x68450
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x120(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x18(%rbp), %rsi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x5c79c
movq -0x120(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x18(%rbp), %rsi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x5c79c
jmp 0x5c79c
movq -0x120(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rsi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x5c79c
jmp 0x5c79c
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xa5b0
movq -0x120(%rbp), %rdi
movsd %xmm0, -0x20(%rbp)
addq $0x10, %rdi
callq 0x5c8f0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5c910
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5c940
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x5c970
testb $0x1, %al
jne 0x5c45a
jmp 0x5c484
leaq -0x30(%rbp), %rdi
callq 0x5c9a0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movsd -0x20(%rbp), %xmm0
movq (%rdi), %rax
callq *0x10(%rax)
leaq -0x30(%rbp), %rdi
callq 0x5c9d0
jmp 0x5c447
jmp 0x5c79c
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xa5b0
movq -0x120(%rbp), %rdi
movsd %xmm0, -0x48(%rbp)
addq $0x10, %rdi
callq 0x5c8f0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5c910
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5c940
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x5c970
testb $0x1, %al
jne 0x5c4db
jmp 0x5c505
leaq -0x58(%rbp), %rdi
callq 0x5c9a0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq (%rax), %rdi
movsd -0x48(%rbp), %xmm0
movq (%rdi), %rax
callq *0x18(%rax)
leaq -0x58(%rbp), %rdi
callq 0x5c9d0
jmp 0x5c4c8
jmp 0x5c79c
jmp 0x5c79c
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xa5d0
movq -0x120(%rbp), %rdi
movb %al, -0x69(%rbp)
addq $0x10, %rdi
callq 0x5c8f0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x5c910
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0x5c940
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x5c970
testb $0x1, %al
jne 0x5c565
jmp 0x5c596
leaq -0x80(%rbp), %rdi
callq 0x5c9a0
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rdi
movb -0x69(%rbp), %cl
movq (%rdi), %rax
movsbl %cl, %esi
callq *0x28(%rax)
leaq -0x80(%rbp), %rdi
callq 0x5c9d0
jmp 0x5c54f
jmp 0x5c79c
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xa8e0
movq %rax, -0x130(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0xa770
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0xb0(%rbp), %rdi
callq 0xdcb0
jmp 0x5c5dd
leaq -0xb1(%rbp), %rdi
callq 0xa960
movq -0x120(%rbp), %rdi
addq $0x10, %rdi
callq 0x5c8f0
movq %rax, -0x138(%rbp)
jmp 0x5c602
movq -0x138(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x5c910
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x5c940
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x5c970
testb $0x1, %al
jne 0x5c652
jmp 0x5c6d7
leaq -0xd8(%rbp), %rdi
callq 0x5c9a0
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
leaq -0xb0(%rbp), %rsi
callq *%rax
jmp 0x5c681
jmp 0x5c683
leaq -0xd8(%rbp), %rdi
callq 0x5c9d0
jmp 0x5c636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0xb1(%rbp), %rdi
callq 0xa960
jmp 0x5c7a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xa978
jmp 0x5c7a5
leaq -0xb0(%rbp), %rdi
callq 0xa978
jmp 0x5c79c
movb $0x1, -0x109(%rbp)
movl $0x10, %edi
callq 0xa2d0
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rdx
leaq 0x41905(%rip), %rsi     # 0x9e010
leaq -0x108(%rbp), %rdi
callq 0x5ca00
jmp 0x5c719
movq -0x140(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0xa130
jmp 0x5c72e
movq -0x140(%rbp), %rdi
movb $0x0, -0x109(%rbp)
movq 0x408a5(%rip), %rsi     # 0x9cfe8
movq 0x4087e(%rip), %rdx     # 0x9cfc8
callq 0xa500
jmp 0x5c7b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x5c783
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xa978
testb $0x1, -0x109(%rbp)
jne 0x5c78e
jmp 0x5c79a
movq -0x140(%rbp), %rdi
callq 0xa6c0
jmp 0x5c7a5
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0xc0(%rbp), %rdi
callq 0xa520
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)