// File: /workspace/github_cpp_makefile_star2_O3/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 0x10946(%rip), %rsi     # 0x2b31a
movl $0x25, %edx
movq %rbx, %rdi
callq 0x95c0
leaq 0x24290(%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 0x295bc
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 0x1424a
leaq 0x108c4(%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 0x108aa(%rip), %rsi     # 0x2b34c
movl $0xb, %edx
movq %rax, %rdi
callq 0x95c0
movsbl 0xb8(%r14), %esi
movq %rbx, %rdi
callq 0x92e0
leaq 0x10892(%rip), %rsi     # 0x2b358
movl $0x7, %edx
movq %rbx, %rdi
callq 0x95c0
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x1ab15
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 0x1abf6
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 0x1ad6a
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 0x1a514
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1abc0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x90a0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1abd3
jmp 0x1abd3
jmp 0x1abd3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1abed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x90a0
movq %rbx, %rdi
callq 0x9390
nop