#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 */
char *julian_to_hhmm(double);
char *julian_to_yyyy_mm_dd(double);
double julian_yyyy_mm_dd_time_hhmm_to_julian(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int test1(char *begin_time) {
  char *date_yyyy_mm_dd;
  char *time_hhmm;
  double begin_julian;
  begin_julian =
      julian_yyyy_mm_dd_time_hhmm_to_julian("2000-08-14", begin_time);
  printf("got begin_julian = %lf\n", begin_julian);
  date_yyyy_mm_dd = julian_to_yyyy_mm_dd(begin_julian);
  printf("got date_yyyy_mm_dd = %s\n", date_yyyy_mm_dd);
  time_hhmm = julian_to_hhmm(begin_julian);
  printf("got time_hhmm = %s\n", time_hhmm);
  return 1;
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1050 <julian_yyyy_mm_dd_time_hhmm_to_julian@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
call   1060 <julian_to_yyyy_mm_dd@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
call   1030 <julian_to_hhmm@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rax
mov    %rdi,%rsi
lea    0xeb5(%rip),%rdi
call   1050 <julian_yyyy_mm_dd_time_hhmm_to_julian@plt>
movsd  %xmm0,(%rsp)
lea    0xeaf(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1060 <julian_to_yyyy_mm_dd@plt>
lea    0xeaf(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1030 <julian_to_hhmm@plt>
lea    0xeae(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"2000-08-14\00"
@.str.1 = [24 x i8] c"got begin_julian = %lf\0A\00"
@.str.2 = [26 x i8] c"got date_yyyy_mm_dd = %s\0A\00"
@.str.3 = [20 x i8] c"got time_hhmm = %s\0A\00"
define i32 @test1(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call double @julian_yyyy_mm_dd_time_hhmm_to_julian(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
store double %7, double* %5
%8 = load double, double* %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = load double, double* %5
%11 = call i8* @julian_to_yyyy_mm_dd(double %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%14 = load double, double* %5
%15 = call i8* @julian_to_hhmm(double %14)
store i8* %15, i8** %4
%16 = load i8*, i8** %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* %16)
ret i32 1
}

LLVM IR (-O2):
@.str = [11 x i8] c"2000-08-14\00"
@.str.1 = [24 x i8] c"got begin_julian = %lf\0A\00"
@.str.2 = [26 x i8] c"got date_yyyy_mm_dd = %s\0A\00"
@.str.3 = [20 x i8] c"got time_hhmm = %s\0A\00"
define i32 @test1(i8* %0) {
%2 = tail call double @julian_yyyy_mm_dd_time_hhmm_to_julian(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), double %2)
%4 = tail call i8* @julian_to_yyyy_mm_dd(double %2)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%6 = tail call i8* @julian_to_hhmm(double %2)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* %6)
ret i32 1
}