#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*/ YYYYMMDDHHMMSS2SECS(char *, double *);
int /*<<< orphan*/ sprintf(char *, char *);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ strncat(char *, char *, int);
void YYMMDDHHMMSS2SECS(char *date, double *time) {
  char date2[14];
  int year;
  sscanf(date, "%2d", &year);
  if (year < 50)
    sprintf(date2, "20");
  else
    sprintf(date2, "19");
  strncat(date2, date, 12);
  YYYYMMDDHHMMSS2SECS(date2, time);
}


x86 assembly (clang, -O0):
<YYMMDDHHMMSS2SECS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea5(%rip),%rsi
lea    -0x24(%rbp),%rdx
call   1050 <sscanf@plt>
cmpl   $0x32,-0x24(%rbp)
jge    1183 <YYMMDDHHMMSS2SECS+0x43>
lea    -0x1e(%rbp),%rdi
lea    0xe8b(%rip),%rsi
call   1060 <sprintf@plt>
jmp    1193 <YYMMDDHHMMSS2SECS+0x53>
lea    -0x1e(%rbp),%rdi
lea    0xe79(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x1e(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0xc,%edx
call   1030 <strncat@plt>
lea    -0x1e(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <YYYYMMDDHHMMSS2SECS@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<YYMMDDHHMMSS2SECS>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeba(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1050 <sscanf@plt>
cmpl   $0x31,0xc(%rsp)
jg     1165 <YYMMDDHHMMSS2SECS+0x35>
movb   $0x0,0x14(%rsp)
movw   $0x3032,0x12(%rsp)
jmp    1171 <YYMMDDHHMMSS2SECS+0x41>
movb   $0x0,0x14(%rsp)
movw   $0x3931,0x12(%rsp)
lea    0x12(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0xc,%edx
call   1030 <strncat@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <YYYYMMDDHHMMSS2SECS@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%2d\00"
@.str.1 = [3 x i8] c"20\00"
@.str.2 = [3 x i8] c"19\00"
define void @YYMMDDHHMMSS2SECS(i8* %0, double* %1) {
%3 = alloca i8*
%4 = alloca double*
%5 = alloca [14 x i8]
%6 = alloca i32
store i8* %0, i8** %3
store double* %1, double** %4
%7 = load i8*, i8** %3
%8 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %6)
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 50
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = getelementptr inbounds [14 x i8], [14 x i8]* %5, i64 0, i64 0
%13 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %17
14: ; preds = %2
%15 = getelementptr inbounds [14 x i8], [14 x i8]* %5, i64 0, i64 0
%16 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %14, %11
%18 = getelementptr inbounds [14 x i8], [14 x i8]* %5, i64 0, i64 0
%19 = load i8*, i8** %3
%20 = call i32 @strncat(i8* %18, i8* %19, i32 12)
%21 = getelementptr inbounds [14 x i8], [14 x i8]* %5, i64 0, i64 0
%22 = load double*, double** %4
%23 = call i32 @YYYYMMDDHHMMSS2SECS(i8* %21, double* %22)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%2d\00"
@.str.1 = [3 x i8] c"20\00"
@.str.2 = [3 x i8] c"19\00"
define void @YYMMDDHHMMSS2SECS(i8* %0, double* %1) {
%3 = alloca [14 x i8]
%4 = alloca i32
%5 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 0
%6 = bitcast i32* %4 to i8*
%7 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %4)
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 50
br i1 %9, label %10, label %11
10: ; preds = %2
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %10
%13 = call i32 @strncat(i8* %5, i8* %0, i32 12)
%14 = call i32 @YYYYMMDDHHMMSS2SECS(i8* %5, double* %1)
ret void
}