#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 */
struct tm {
  int /*<<< orphan*/ tm_sec;
  int /*<<< orphan*/ tm_min;
  int /*<<< orphan*/ tm_hour;
  int /*<<< orphan*/ tm_mday;
  scalar_t__ tm_mon;
  scalar_t__ tm_year;
};

/* Variables and functions */
double astro_julday(scalar_t__, scalar_t__, int /*<<< orphan*/,
                    int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
double astro_julday_tm(struct tm *tm) {
  return astro_julday(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
                      tm->tm_hour, tm->tm_min, tm->tm_sec);
}


x86 assembly (clang, -O0):
<astro_julday_tm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x76c,%rdi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rsi
add    $0x1,%rsi
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    (%rax),%r9d
call   1030 <astro_julday@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astro_julday_tm>:
mov    $0x76c,%eax
add    0x18(%rdi),%rax
mov    0x10(%rdi),%rsi
add    $0x1,%rsi
mov    0xc(%rdi),%edx
mov    0x8(%rdi),%ecx
mov    (%rdi),%r9d
mov    0x4(%rdi),%r8d
mov    %rax,%rdi
jmp    1030 <astro_julday@plt>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i64, i64 }
define double @astro_julday_tm(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
%3 = load %struct.tm*, %struct.tm** %2
%4 = getelementptr inbounds %struct.tm, %struct.tm* %3, i32 0, i32 5
%5 = load i64, i64* %4
%6 = add nsw i64 %5, 1900
%7 = load %struct.tm*, %struct.tm** %2
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 4
%9 = load i64, i64* %8
%10 = add nsw i64 %9, 1
%11 = load %struct.tm*, %struct.tm** %2
%12 = getelementptr inbounds %struct.tm, %struct.tm* %11, i32 0, i32 3
%13 = load i32, i32* %12
%14 = load %struct.tm*, %struct.tm** %2
%15 = getelementptr inbounds %struct.tm, %struct.tm* %14, i32 0, i32 2
%16 = load i32, i32* %15
%17 = load %struct.tm*, %struct.tm** %2
%18 = getelementptr inbounds %struct.tm, %struct.tm* %17, i32 0, i32 1
%19 = load i32, i32* %18
%20 = load %struct.tm*, %struct.tm** %2
%21 = getelementptr inbounds %struct.tm, %struct.tm* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = call double @astro_julday(i64 %6, i64 %10, i32 %13, i32 %16, i32 %19, i32 %22)
ret double %23
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i64, i64 }
define double @astro_julday_tm(%struct.tm* nocapture %0) {
%2 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 5
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1900
%5 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 4
%6 = load i64, i64* %5
%7 = add nsw i64 %6, 1
%8 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 3
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%15 = load i32, i32* %14
%16 = tail call double @astro_julday(i64 %4, i64 %7, i32 %9, i32 %11, i32 %13, i32 %15)
ret double %16
}