#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*/ timestr;
struct tm {
  int dummy;
};
struct stat {
  scalar_t__ st_size;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned long long,
                           char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
void print_file_info_(FILE *dst, struct stat *sb, struct tm *tm) {
  char timestr[64];
  strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S", tm);
  fprintf(dst, "(%7Lu bytes, from %s)\n", (unsigned long long)sb->st_size,
          timestr);
}


x86 assembly (clang, -O0):
<print_file_info_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x40,%esi
lea    0xeb8(%rip),%rdx
call   1040 <strftime@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    -0x60(%rbp),%rcx
lea    0xeaf(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_file_info_>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%rcx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xec7(%rip),%rdx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x40,%esi
call   1040 <strftime@plt>
mov    (%rbx),%rdx
lea    0xebf(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rcx
call   1030 <fprintf@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
@.str.1 = [23 x i8] c"(%7Lu bytes, from %s)\0A\00"
define void @print_file_info_(i32* %0, %struct.stat* %1, %struct.tm* %2) {
%4 = alloca i32*
%5 = alloca %struct.stat*
%6 = alloca %struct.tm*
%7 = alloca [64 x i8]
store i32* %0, i32** %4
store %struct.stat* %1, %struct.stat** %5
store %struct.tm* %2, %struct.tm** %6
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%9 = load %struct.tm*, %struct.tm** %6
%10 = call i32 @strftime(i8* %8, i32 64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %9)
%11 = load i32*, i32** %4
%12 = load %struct.stat*, %struct.stat** %5
%13 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 0
%14 = load i64, i64* %13
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%16 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64 %14, i8* %15)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i64 }
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
@.str.1 = [23 x i8] c"(%7Lu bytes, from %s)\0A\00"
define void @print_file_info_(i32* nocapture %0, %struct.stat* nocapture %1, %struct.tm* %2) {
%4 = alloca [64 x i8]
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%6 = call i32 @strftime(i8* %5, i32 64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %2)
%7 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64 %8, i8* %5)
ret void
}