#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 */
scalar_t__ iTestIfValidDate8(unsigned char *);
int iTestIfValidTime(unsigned char *);
int /*<<< orphan*/ vMemcpy0(unsigned char *, unsigned char *, int);
int iTestIfValidDateTime(unsigned char *pszDateTime) {
  unsigned char szBuf[10];
  vMemcpy0(szBuf, pszDateTime, 8);
  if (iTestIfValidDate8(szBuf))
    return (1);
  vMemcpy0(szBuf, pszDateTime + 8, 6);
  return (iTestIfValidTime(szBuf));
}


x86 assembly (clang, -O0):
<iTestIfValidDateTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1040 <vMemcpy0@plt>
lea    -0x1a(%rbp),%rdi
call   1030 <iTestIfValidDate8@plt>
cmp    $0x0,%rax
je     116d <iTestIfValidDateTime+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    118f <iTestIfValidDateTime+0x5f>
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    $0x6,%edx
call   1040 <vMemcpy0@plt>
lea    -0x1a(%rbp),%rdi
call   1050 <iTestIfValidTime@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iTestIfValidDateTime>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
lea    0xe(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <vMemcpy0@plt>
mov    %r14,%rdi
call   1030 <iTestIfValidDate8@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1185 <iTestIfValidDateTime+0x55>
add    $0x8,%rbx
lea    0xe(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x6,%edx
call   1040 <vMemcpy0@plt>
mov    %r14,%rdi
call   1050 <iTestIfValidTime@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @iTestIfValidDateTime(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [10 x i8]
store i8* %0, i8** %3
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %3
%7 = call i32 @vMemcpy0(i8* %5, i8* %6, i32 8)
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%9 = call i64 @iTestIfValidDate8(i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %19
12: ; preds = %1
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 8
%16 = call i32 @vMemcpy0(i8* %13, i8* %15, i32 6)
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%18 = call i32 @iTestIfValidTime(i8* %17)
store i32 %18, i32* %2
br label %19
19: ; preds = %12, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @iTestIfValidDateTime(i8* %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @vMemcpy0(i8* %3, i8* %0, i32 8)
%5 = call i64 @iTestIfValidDate8(i8* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = getelementptr inbounds i8, i8* %0, i64 8
%9 = call i32 @vMemcpy0(i8* %3, i8* %8, i32 6)
%10 = call i32 @iTestIfValidTime(i8* %3)
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ 1, %1 ]
ret i32 %12
}