// File: /workspace/github_cpp_makefile_star2_O2/errantlinguist[P]Forecast/src/forecast_io/parsers/NotifyingFlagParser.cpp
// Function: forecast_io::parsers::NotifyingFlagParser::parseAttribute(forecast_io::parsers::FlagsAttribute const&, json_object* const&)
void NotifyingFlagParser::parseAttribute(const FlagsAttribute& attribute,
		json_object* const & pValue)
{
	switch (attribute)
	{
	case FlagsAttribute::DARKSKY_UNAVAILABLE:
	{
		const bool darkskyUnavailable = bool(json_object_get_boolean(pValue));
		for (listeners::FlagListener* const & pListener : getListeners())
		{
			pListener->notifyDarkskyUnavailable(darkskyUnavailable);
		}
		break;
	}
	case FlagsAttribute::METNO_LICENSE:
	{
		const bool metnoLicense = bool(json_object_get_boolean(pValue));
		for (listeners::FlagListener* const & pListener : getListeners())
		{
			pListener->notifyMetnoLicense(metnoLicense);
		}
		break;
	}
	case FlagsAttribute::SOURCES:
	{
		json::insertJsonStringArrayValues(sources, pValue);
		break;
	}
	case FlagsAttribute::UNITS:
	{
		const std::string unitsStr(json_object_get_string(pValue));
		const math::MeasurementSystem& measurementSystem =
				parseMeasurementSystem(unitsStr);
		for (listeners::FlagListener* const & pListener : getListeners())
		{
			pListener->notifyUnits(measurementSystem);
		}
		break;
	}
	default:
		throw std::logic_error(
				createUndefinedAttributeErrorMessage(FlagsAttribute_NAME,
						attribute));
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl (%rsi), %eax
cmpq $0x3, %rax
ja 0x1db08
movq %rdi, %rbx
leaq 0x67f4(%rip), %rcx      # 0x2422c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdx), %rdi
callq 0x96f0
movl %eax, %ebp
addq $0x28, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1daff
xorl %esi, %esi
testl %ebp, %ebp
setne %sil
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x1da4f
addq $0x78, %rbx
movq %rbx, %rdi
movq %rdx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1de5f
movq (%rdx), %rdi
callq 0x96b0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0xb070
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1db90
movq %rax, %r14
addq $0x28, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1daf5
movq 0x8(%rbx), %rdi
movq (%r14), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x1dab4
movq (%rdx), %rdi
callq 0x96f0
movl %eax, %ebp
addq $0x28, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1daff
xorl %esi, %esi
testl %ebp, %ebp
setne %sil
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
jmp 0x1dad9
leaq 0x10(%rsp), %rdi
callq 0x9710
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rsi, %r14
pushq $0x10
popq %rdi
callq 0x91e0
movq %rax, %rbx
leaq 0x1c333(%rip), %rsi     # 0x39e50
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x1def4
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x90d0
xorl %ebp, %ebp
movq 0x1b4a5(%rip), %rsi     # 0x38fe8
movq 0x1b47e(%rip), %rdx     # 0x38fc8
movq %rbx, %rdi
callq 0x9390
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x9710
testb %bpl, %bpl
jne 0x1db69
jmp 0x1db87
movq %rax, %r14
movq %rbx, %rdi
callq 0x9530
jmp 0x1db87
jmp 0x1db7a
movq %rax, %r14
jmp 0x1db87
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x9710
movq %r14, %rdi
callq 0x93b0
nop