// File: /workspace/github_cpp_makefile_star2_O1/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 0x25330
movq %rdi, %rbx
leaq 0x707a(%rip), %rcx      # 0x2c2bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdx), %rdi
callq 0x96f0
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
je 0x25327
movl %eax, %ebp
xorl %esi, %esi
testl %ebp, %ebp
setne %sil
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x25262
jmp 0x25327
addq $0x78, %rbx
movq %rbx, %rdi
movq %rdx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x25842
movq (%rdx), %rdi
callq 0x96c0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0xc420
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x253de
movq %rax, %r14
addq $0x28, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2530c
movq 0x8(%rbx), %rdi
movq (%r14), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x252c6
movq (%rdx), %rdi
callq 0x96f0
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
je 0x25327
movl %eax, %ebp
xorl %esi, %esi
testl %ebp, %ebp
setne %sil
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x252f0
jmp 0x25327
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25327
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x90a0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rsi, %r14
movl $0x10, %edi
callq 0x91c0
movq %rax, %rbx
leaq 0x1ab09(%rip), %rsi     # 0x3fe50
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x25906
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x90d0
xorl %ebp, %ebp
movq 0x19c7b(%rip), %rsi     # 0x3efe8
movq 0x19c54(%rip), %rdx     # 0x3efc8
movq %rbx, %rdi
callq 0x9370
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x253a2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x90a0
jmp 0x253a2
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x253d6
movq %rbx, %rdi
callq 0x9510
jmp 0x253d6
jmp 0x253b8
movq %rax, %r14
jmp 0x253d6
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x253d6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x90a0
movq %r14, %rdi
callq 0x9390