// File: /workspace/github_cpp_makefile_star2_O1/errantlinguist[P]Forecast/src/console_weather/writers/ForecastConsoleWriter.cpp
// Function: console_weather::writers::ForecastConsoleWriter::write(forecast_io::Forecast const&, std::ostream&)
void ForecastConsoleWriter::write(const forecast_io::Forecast& value, std::ostream& output)
{
	output << "Forecast for location at coordinates ";
	// FIXME: The coordinate values are always zero here
	const math::Coordinate location = value.getLocation();
	output << location << '\n';

	output << headerRowSeparator << '\n';

	// Timezone and offset
	const std::string timezone = value.getTimezone();
	output << "Timezone: \"" << timezone << "\" (Offset: ";
	const short offsetNumericValue = static_cast<const short>(value.getOffset());
	output << offsetNumericValue;
	output << " hrs.)\n";

	// Alerts
	const std::vector<forecast_io::Alert>& alerts = value.getAlerts();
	if (!alerts.empty())
	{
		output << alertsSectionHeader << '\n';
		write(alerts, output);
	}

	// Current forecast data
	output << currentWeatherSectionHeader << '\n';
	const forecast_io::SynchronicDataPoint& currentWeather = value.getCurrentWeather();
	synchronicDataPointWriter.write(currentWeather, output);
	output << '\n';

	// Flags
	output << flagsSectionHeader << '\n';
	flagsWriter.write(value.getFlags(), output);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10962(%rip), %rsi     # 0x2b31a
movl $0x25, %edx
movq %rbx, %rdi
callq 0x95c0
leaq 0x242ac(%rip), %rax     # 0x3ec78
addq $0x10, %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movups 0xa8(%r14), %xmm0
movups %xmm0, 0x8(%rsi)
movq %rbx, %rdi
callq 0x297e4
movb $0xa, %bpl
leaq 0x8(%rsp), %r12
movb %bpl, (%r12)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x95c0
movq 0x120(%r15), %rsi
movq 0x128(%r15), %rdx
movq %rbx, %rdi
callq 0x95c0
movb %bpl, (%r12)
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
movq %rax, %rdi
callq 0x95c0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0xc0(%r14), %rsi
movq 0xc8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x14268
leaq 0x108e0(%rip), %rsi     # 0x2b340
movl $0xb, %edx
movq %rbx, %rdi
callq 0x95c0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x95c0
leaq 0x108c6(%rip), %rsi     # 0x2b34c
movl $0xb, %edx
movq %rax, %rdi
callq 0x95c0
movsbl 0xb8(%r14), %esi
movq %rbx, %rdi
callq 0x92e0
leaq 0x108ae(%rip), %rsi     # 0x2b358
movl $0x7, %edx
movq %rbx, %rdi
callq 0x95c0
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x1aaf9
movq 0xc0(%r15), %rsi
movq 0xc8(%r15), %rdx
movq %rbx, %rdi
callq 0x95c0
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x95c0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1abda
movq 0xe0(%r15), %rsi
movq 0xe8(%r15), %rdx
movq %rbx, %rdi
callq 0x95c0
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x95c0
leaq 0xe0(%r14), %rsi
leaq 0x28(%r15), %rdi
movq %rbx, %rdx
callq 0x1ad4e
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x95c0
movq 0x100(%r15), %rsi
movq 0x108(%r15), %rdx
movq %rbx, %rdi
callq 0x95c0
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x95c0
addq $0x20, %r15
addq $0x18, %r14
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a4fc
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1aba4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x90a0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1abb7
jmp 0x1abb7
jmp 0x1abb7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1abd1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x90a0
movq %rbx, %rdi
callq 0x9390
nop