#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double const, double const, double const,
                          char *, int const);
int /*<<< orphan*/ timestamp_to_iso8601str(char *, long const);
void output_gpx_trk_point(const long timestamp, const double latitude,
                          const double longitude, const double height,
                          const int speed) {
  char iso8601str[] = "2008-10-16T14:55:29Z";
  timestamp_to_iso8601str(iso8601str, timestamp);
  printf(" <trkpt lat=\"%f\" "
         "lon=\"%f\"><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>\n",
         latitude, longitude, height, iso8601str, speed);
}


x86 assembly (clang, -O0):
<output_gpx_trk_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %esi,-0x24(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xeb6(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0xeb1(%rip),%al
mov    %al,-0x2c(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <timestamp_to_iso8601str@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    -0x40(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_gpx_trk_point>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %esi,%ebx
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rsi
movaps 0xebb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movabs $0x5a39323a35353a,%rax
mov    %rax,0x2d(%rsp)
lea    0x20(%rsp),%r14
mov    %r14,%rdi
call   1030 <timestamp_to_iso8601str@plt>
lea    0xea8(%rip),%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.output_gpx_trk_point.iso8601str = [21 x i8] c"2008-10-16T14:55:29Z\00"
@.str = [81 x i8] c" <trkpt lat=\22%f\22 lon=\22%f\22><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>\0A\00"
define void @output_gpx_trk_point(i64 %0, double %1, double %2, double %3, i32 %4) {
%6 = alloca i64
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca [21 x i8]
store i64 %0, i64* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store i32 %4, i32* %10
%12 = bitcast [21 x i8]* %11 to i8*
%13 = getelementptr inbounds [21 x i8], [21 x i8]* %11, i64 0, i64 0
%14 = load i64, i64* %6
%15 = call i32 @timestamp_to_iso8601str(i8* %13, i64 %14)
%16 = load double, double* %7
%17 = load double, double* %8
%18 = load double, double* %9
%19 = getelementptr inbounds [21 x i8], [21 x i8]* %11, i64 0, i64 0
%20 = load i32, i32* %10
%21 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), double %16, double %17, double %18, i8* %19, i32 %20)
ret void
}

LLVM IR (-O2):
@__const.output_gpx_trk_point.iso8601str = [21 x i8] c"2008-10-16T14:55:29Z\00"
@.str = [81 x i8] c" <trkpt lat=\22%f\22 lon=\22%f\22><ele>%f</ele><time>%s</time><speed>%d</speed></trkpt>\0A\00"
define void @output_gpx_trk_point(i64 %0, double %1, double %2, double %3, i32 %4) {
%6 = alloca [21 x i8]
%7 = getelementptr inbounds [21 x i8], [21 x i8]* %6, i64 0, i64 0
%8 = call i32 @timestamp_to_iso8601str(i8* %7, i64 %0)
%9 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), double %1, double %2, double %3, i8* %7, i32 %4)
ret void
}