#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 {
  void *tm_sec;
  void *tm_min;
  void *tm_hour;
  void *tm_mday;
  void *tm_mon;
  void *tm_year;
};

/* Variables and functions */
void *atoi(char *);
int /*<<< orphan*/ mktime(struct tm *);
char *strtok(char *, char *);
time_t convertedTime(char *d1, char *t1) {
  char *dateSave = d1;
  char *timeSave = t1;
  struct tm dataSave;
  char *dtok = strtok(dateSave, "-");
  dataSave.tm_year = atoi(dtok) - 1900;
  dataSave.tm_mon = atoi(strtok(NULL, "-")) - 1;
  dataSave.tm_mday = atoi(strtok(NULL, "-"));
  char *ttok = strtok(timeSave, ":");
  dataSave.tm_hour = atoi(ttok);
  dataSave.tm_min = atoi(strtok(NULL, ":"));
  dataSave.tm_sec = atoi(strtok(NULL, ":"));
  time_t abcd = mktime(&dataSave);
  return mktime(&dataSave);
}


x86 assembly (clang, -O0):
<convertedTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
call   1050 <atoi@plt>
add    $0xfffffffffffff894,%rax
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe7e(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe5e(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe44(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
call   1050 <atoi@plt>
mov    %rax,-0x40(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe23(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %rax,-0x48(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe07(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %rax,-0x50(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <mktime@plt>
mov    %eax,-0x64(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <mktime@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertedTime>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rsi,%r14
lea    0xecd(%rip),%r15
mov    %r15,%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %rax,%rbx
xor    %edi,%edi
mov    %r15,%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
movq   %rbx,%xmm0
movq   %rax,%xmm1
punpcklqdq %xmm0,%xmm1
paddq  0xe82(%rip),%xmm1
movdqu %xmm1,0x20(%rsp)
xor    %edi,%edi
mov    %r15,%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %rax,0x18(%rsp)
lea    0xe70(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %rax,0x10(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %rax,0x8(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <mktime@plt>
mov    %rbx,%rdi
call   1030 <mktime@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i8*, i8*, i8*, i8*, i8*, i8* }
@.str = [2 x i8] c"-\00"
@.str.1 = [2 x i8] c":\00"
define i32 @convertedTime(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.tm
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%11 = load i8*, i8** %3
store i8* %11, i8** %5
%12 = load i8*, i8** %4
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = call i8* @strtok(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %14, i8** %8
%15 = load i8*, i8** %8
%16 = call i8* @atoi(i8* %15)
%17 = getelementptr i8, i8* %16, i64 -1900
%18 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 5
store i8* %17, i8** %18
%19 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = call i8* @atoi(i8* %19)
%21 = getelementptr i8, i8* %20, i64 -1
%22 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 4
store i8* %21, i8** %22
%23 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = call i8* @atoi(i8* %23)
%25 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 3
store i8* %24, i8** %25
%26 = load i8*, i8** %6
%27 = call i8* @strtok(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i8* %27, i8** %9
%28 = load i8*, i8** %9
%29 = call i8* @atoi(i8* %28)
%30 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 2
store i8* %29, i8** %30
%31 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%32 = call i8* @atoi(i8* %31)
%33 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 1
store i8* %32, i8** %33
%34 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%35 = call i8* @atoi(i8* %34)
%36 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 0
store i8* %35, i8** %36
%37 = call i32 @mktime(%struct.tm* %7)
store i32 %37, i32* %10
%38 = call i32 @mktime(%struct.tm* %7)
ret i32 %38
}

LLVM IR (-O2):
%struct.tm = type { i8*, i8*, i8*, i8*, i8*, i8* }
@.str = [2 x i8] c"-\00"
@.str.1 = [2 x i8] c":\00"
define i32 @convertedTime(i8* %0, i8* %1) {
%3 = alloca %struct.tm
%4 = bitcast %struct.tm* %3 to i8*
%5 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i8* @atoi(i8* %5)
%7 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = tail call i8* @atoi(i8* %7)
%9 = insertelement <2 x i8*> poison, i8* %8, i64 0
%10 = insertelement <2 x i8*> %9, i8* %6, i64 1
%11 = getelementptr i8, <2 x i8*> %10, <2 x i64> <i64 -1, i64 -1900>
%12 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 4
%13 = bitcast i8** %12 to <2 x i8*>*
store <2 x i8*> %11, <2 x i8*>* %13
%14 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = tail call i8* @atoi(i8* %14)
%16 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 3
store i8* %15, i8** %16
%17 = tail call i8* @strtok(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = tail call i8* @atoi(i8* %17)
%19 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 2
store i8* %18, i8** %19
%20 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = tail call i8* @atoi(i8* %20)
%22 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 1
store i8* %21, i8** %22
%23 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = tail call i8* @atoi(i8* %23)
%25 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
store i8* %24, i8** %25
%26 = call i32 @mktime(%struct.tm* %3)
%27 = call i32 @mktime(%struct.tm* %3)
ret i32 %27
}