#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*/ acVersion;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char const *);
void print_version(const char *name) {
  const char *acType = "Release";
  char acVersion[60];
  snprintf(acVersion, sizeof(acVersion), "[%s %s %s]", "Mar 16 2022",
           "06:29:39", acType);
  printf("%s %s\n", name, acVersion);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%r9
mov    $0x3c,%esi
lea    0xebd(%rip),%rdx
lea    0xec1(%rip),%rcx
lea    0xec6(%rip),%r8
call   1040 <snprintf@plt>
mov    -0x8(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbx
lea    0xed7(%rip),%rdx
lea    0xedb(%rip),%rcx
lea    0xee0(%rip),%r8
lea    0xeba(%rip),%r9
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x3c,%esi
call   1040 <snprintf@plt>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Release\00"
@.str.1 = [11 x i8] c"[%s %s %s]\00"
@.str.2 = [12 x i8] c"Mar 16 2022\00"
@.str.3 = [9 x i8] c"06:29:39\00"
@.str.4 = [7 x i8] c"%s %s\0A\00"
define void @print_version(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [60 x i8]
store i8* %0, i8** %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %3
%7 = call i32 @snprintf(i8* %5, i32 60, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %2
%9 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Release\00"
@.str.1 = [11 x i8] c"[%s %s %s]\00"
@.str.2 = [12 x i8] c"Mar 16 2022\00"
@.str.3 = [9 x i8] c"06:29:39\00"
@.str.4 = [7 x i8] c"%s %s\0A\00"
define void @print_version(i8* %0) {
%2 = alloca [60 x i8]
%3 = getelementptr inbounds [60 x i8], [60 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 60, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %0, i8* %3)
ret void
}