void print_head_osm(int coordcount, double latmin, double latmax, double lonmin,
                    double lonmax) {
  printf("<?xml version='1.0' encoding='UTF-8'?>\n");
  printf("<osm version='0.6' generator='Routino'>\n");
  if (coordcount)
    printf("  <bounds minlat='%.6f' maxlat='%.6f' minlon='%.6f' maxlon='%.6f' "
           "/>\n",
           ((latmin) * (180.0 / 3.14159265358979323846)),
           ((latmax) * (180.0 / 3.14159265358979323846)),
           ((lonmin) * (180.0 / 3.14159265358979323846)),
           ((lonmax) * (180.0 / 3.14159265358979323846)));
}


x86 assembly (clang, -O0):
<print_head_osm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
je     1197 <print_head_osm+0x87>
movsd  0xea3(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe96(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xe89(%rip),%xmm2
mulsd  -0x20(%rbp),%xmm2
movsd  0xe7c(%rip),%xmm3
mulsd  -0x28(%rbp),%xmm3
lea    0xec9(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_head_osm>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    %edi,%ebx
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
test   %ebx,%ebx
je     119c <print_head_osm+0x7c>
movsd  0xe9e(%rip),%xmm4
movsd  (%rsp),%xmm0
mulsd  %xmm4,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm4,%xmm1
movsd  0x10(%rsp),%xmm2
mulsd  %xmm4,%xmm2
movsd  0x18(%rsp),%xmm3
mulsd  %xmm4,%xmm3
lea    0xe78(%rip),%rdi
mov    $0x4,%al
add    $0x20,%rsp
pop    %rbx
jmp    1040 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"<?xml version='1.0' encoding='UTF-8'?>\0A\00"
@.str.1 = [41 x i8] c"<osm version='0.6' generator='Routino'>\0A\00"
@.str.2 = [70 x i8] c" <bounds minlat='%.6f' maxlat='%.6f' minlon='%.6f' maxlon='%.6f' />\0A\00"
define void @print_head_osm(i32 %0, double %1, double %2, double %3, double %4) {
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 %0, i32* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* %6
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %5
%16 = load double, double* %7
%17 = fmul double %16, 0x404CA5DC1A63C1F8
%18 = load double, double* %8
%19 = fmul double %18, 0x404CA5DC1A63C1F8
%20 = load double, double* %9
%21 = fmul double %20, 0x404CA5DC1A63C1F8
%22 = load double, double* %10
%23 = fmul double %22, 0x404CA5DC1A63C1F8
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0), double %17, double %19, double %21, double %23)
br label %25
25: ; preds = %15, %5
ret void
}

LLVM IR (-O2):
@.str.2 = [70 x i8] c" <bounds minlat='%.6f' maxlat='%.6f' minlon='%.6f' maxlon='%.6f' />\0A\00"
@str = [39 x i8] c"<?xml version='1.0' encoding='UTF-8'?>\00"
@str.3 = [40 x i8] c"<osm version='0.6' generator='Routino'>\00"
define void @print_head_osm(i32 %0, double %1, double %2, double %3, double %4) {
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.3, i64 0, i64 0))
%8 = icmp eq i32 %0, 0
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = fmul double %1, 0x404CA5DC1A63C1F8
%11 = fmul double %2, 0x404CA5DC1A63C1F8
%12 = fmul double %3, 0x404CA5DC1A63C1F8
%13 = fmul double %4, 0x404CA5DC1A63C1F8
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0), double %10, double %11, double %12, double %13)
br label %15
15: ; preds = %9, %5
ret void
}