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

/* Variables and functions */
int /*<<< orphan*/ mktime(struct tm *);
void annee2nbsec(int a, time_t *n) {
  struct tm t;
  t.tm_sec = 0;
  t.tm_min = 0;
  t.tm_hour = 1;
  t.tm_mday = 1;
  t.tm_mon = 0;
  t.tm_year = a - 1900;
  t.tm_isdst = -1;
  *n = mktime(&t);
}


x86 assembly (clang, -O0):
<annee2nbsec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x1,-0x34(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x76c,%eax
mov    %eax,-0x30(%rbp)
movl   $0xffffffff,-0x2c(%rbp)
lea    -0x38(%rbp),%rdi
call   1030 <mktime@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<annee2nbsec>:
push   %rbx
sub    $0x30,%rsp
mov    %rsi,%rbx
xorps  %xmm0,%xmm0
movups %xmm0,0x20(%rsp)
movabs $0x100000001,%rax
mov    %rax,0x8(%rsp)
movq   $0x0,0x18(%rsp)
add    $0xfffff894,%edi
mov    %edi,0x10(%rsp)
movl   $0xffffffff,0x14(%rsp)
ff
lea    0x8(%rsp),%rdi
call   1030 <mktime@plt>
mov    %eax,(%rbx)
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i64, i64, i64 }
define void @annee2nbsec(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.tm
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 6
store i64 0, i64* %6
%7 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 5
store i64 0, i64* %7
%8 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
store i32 1, i32* %8
%9 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 1
store i32 1, i32* %9
%10 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 4
store i64 0, i64* %10
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1900
%13 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 2
store i32 %12, i32* %13
%14 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 3
store i32 -1, i32* %14
%15 = call i32 @mktime(%struct.tm* %5)
%16 = load i32*, i32** %4
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i64, i64, i64 }
define void @annee2nbsec(i32 %0, i32* nocapture writeonly %1) {
%3 = alloca %struct.tm
%4 = bitcast %struct.tm* %3 to i8*
%5 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 5
%6 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
%7 = bitcast i64* %5 to i8*
store i32 1, i32* %6
%8 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 1
store i32 1, i32* %8
%9 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 4
store i64 0, i64* %9
%10 = add nsw i32 %0, -1900
%11 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 2
store i32 %10, i32* %11
%12 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 3
store i32 -1, i32* %12
%13 = call i32 @mktime(%struct.tm* %3)
store i32 %13, i32* %1
ret void
}