#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 dummy;
};

/* Variables and functions */
int blog_new_blog_entry(void *, char const *, char const *, char const *,
                        char const *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ memset(struct tm *, int /*<<< orphan*/, int);
int /*<<< orphan*/ mktime(struct tm *);
int /*<<< orphan*/ strptime(char const *, char *, struct tm *);
int blog_new_blog_entry_sd(void *dbhndl, const char *link, const char *title,
                           const char *content, const char *author,
                           const char *category, const char *date) {
  struct tm tm;
  time_t time;
  memset(&tm, 0, sizeof(struct tm));
  strptime(date, "%Y-%m-%d %H:%M:%S", &tm);
  time = mktime(&tm);
  return (blog_new_blog_entry(dbhndl, link, title, content, author, category,
                              time));
}


x86 assembly (clang, -O0):
<blog_new_blog_entry_sd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    0x10(%rbp),%rdi
lea    0xe81(%rip),%rsi
lea    -0x38(%rbp),%rdx
call   1060 <strptime@plt>
lea    -0x38(%rbp),%rdi
call   1040 <mktime@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    -0x3c(%rbp),%eax
mov    %eax,(%rsp)
call   1050 <blog_new_blog_entry@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blog_new_blog_entry_sd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,0x8(%rsp)
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0x10(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    0xe83(%rip),%rsi
mov    0x50(%rsp),%rdi
mov    %r14,%rdx
call   1060 <strptime@plt>
mov    %r14,%rdi
call   1040 <mktime@plt>
mov    %eax,(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    0x8(%rsp),%r9
call   1050 <blog_new_blog_entry@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i32 @blog_new_blog_entry_sd(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca %struct.tm
%16 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%17 = call i32 @memset(%struct.tm* %15, i32 0, i32 4)
%18 = load i8*, i8** %14
%19 = call i32 @strptime(i8* %18, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %15)
%20 = call i32 @mktime(%struct.tm* %15)
store i32 %20, i32* %16
%21 = load i8*, i8** %8
%22 = load i8*, i8** %9
%23 = load i8*, i8** %10
%24 = load i8*, i8** %11
%25 = load i8*, i8** %12
%26 = load i8*, i8** %13
%27 = load i32, i32* %16
%28 = call i32 @blog_new_blog_entry(i8* %21, i8* %22, i8* %23, i8* %24, i8* %25, i8* %26, i32 %27)
ret i32 %28
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i32 @blog_new_blog_entry_sd(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca %struct.tm
%9 = bitcast %struct.tm* %8 to i8*
%10 = call i32 @memset(%struct.tm* %8, i32 0, i32 4)
%11 = call i32 @strptime(i8* %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
%12 = call i32 @mktime(%struct.tm* %8)
%13 = call i32 @blog_new_blog_entry(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i32 %12)
ret i32 %13
}