#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;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *asctime(struct tm *);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void AppendHeader(FILE *fp, const char *method) {
  struct tm *timendate;
  time_t t;
  t = time(NULL);
  timendate = localtime(&t);
  fputs("-----------------------------------------------------\n", fp);
  fputs("PassBreaker scan initiated : ", fp);
  fputs(asctime(timendate), fp);
  fputs("-----------------------------------------------------\n", fp);
  fputs("Method   : ", fp);
  fputs(method, fp);
  fputs("\n\n", fp);
}


x86 assembly (clang, -O0):
<AppendHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe8c(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   1040 <asctime@plt>
mov    %rax,%rdi
mov    -0x8(%rbp),%rsi
call   1050 <fputs@plt>
mov    -0x8(%rbp),%rsi
lea    0xe57(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x8(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <fputs@plt>
mov    -0x8(%rbp),%rsi
lea    0xe8b(%rip),%rdi
call   1050 <fputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AppendHeader>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    %rax,%r12
lea    0xe83(%rip),%r15
mov    $0x36,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   1070 <fwrite@plt>
lea    0xe9e(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %r12,%rdi
call   1040 <asctime@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
mov    $0x36,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   1070 <fwrite@plt>
lea    0xe7b(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
lea    0xe63(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [55 x i8] c"-----------------------------------------------------\0A\00"
@.str.1 = [30 x i8] c"PassBreaker scan initiated : \00"
@.str.2 = [12 x i8] c"Method : \00"
@.str.3 = [3 x i8] c"\0A\0A\00"
define void @AppendHeader(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca %struct.tm*
%6 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
%7 = call i32 @time(i32* null)
store i32 %7, i32* %6
%8 = call %struct.tm* @localtime(i32* %6)
store %struct.tm* %8, %struct.tm** %5
%9 = load i32*, i32** %3
%10 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = load i32*, i32** %3
%12 = call i32 @fputs(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%13 = load %struct.tm*, %struct.tm** %5
%14 = call i8* @asctime(%struct.tm* %13)
%15 = load i32*, i32** %3
%16 = call i32 @fputs(i8* %14, i32* %15)
%17 = load i32*, i32** %3
%18 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32* %17)
%19 = load i32*, i32** %3
%20 = call i32 @fputs(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %19)
%21 = load i8*, i8** %4
%22 = load i32*, i32** %3
%23 = call i32 @fputs(i8* %21, i32* %22)
%24 = load i32*, i32** %3
%25 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %24)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [55 x i8] c"-----------------------------------------------------\0A\00"
@.str.1 = [30 x i8] c"PassBreaker scan initiated : \00"
@.str.2 = [12 x i8] c"Method : \00"
@.str.3 = [3 x i8] c"\0A\0A\00"
define void @AppendHeader(i32* nocapture %0, i8* nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
%7 = call i64 @fwrite(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i64 54, i64 1, i32* %0)
%8 = call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i64 29, i64 1, i32* %0)
%9 = call i8* @asctime(%struct.tm* %6)
%10 = call i32 @fputs(i8* %9, i32* %0)
%11 = call i64 @fwrite(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i64 54, i64 1, i32* %0)
%12 = call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i64 11, i64 1, i32* %0)
%13 = call i32 @fputs(i8* %1, i32* %0)
%14 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %0)
ret void
}