// File: /workspace/github_cpp_makefile_star2_O3/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 0x251f8
movq %rdi, %rbx
leaq 0x71b2(%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 0x251ef
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 0x2512a
jmp 0x251ef
addq $0x78, %rbx
movq %rbx, %rdi
movq %rdx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x25703
movq (%rdx), %rdi
callq 0x96c0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0xc40a
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x252a4
movq %rax, %r14
addq $0x28, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x251d4
movq 0x8(%rbx), %rdi
movq (%r14), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x2518e
movq (%rdx), %rdi
callq 0x96f0
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
je 0x251ef
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 0x251b8
jmp 0x251ef
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x251ef
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 0x1ac41(%rip), %rsi     # 0x3fe50
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x257c6
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x90d0
xorl %ebp, %ebp
movq 0x19db3(%rip), %rsi     # 0x3efe8
movq 0x19d8c(%rip), %rdx     # 0x3efc8
movq %rbx, %rdi
callq 0x9370
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25262
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x90a0
testb %bpl, %bpl
jne 0x2526c
jmp 0x2529b
movq %rax, %r14
movq %rbx, %rdi
callq 0x9510
jmp 0x2529b
jmp 0x2527d
movq %rax, %r14
jmp 0x2529b
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2529b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x90a0
movq %r14, %rdi
callq 0x9390
nop