#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 */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int);
const char *roadmap_start_version() {
  static char version[64];
  static int done = 0;
  if (done)
    return version;
  sprintf(version, "%d.%d.%d.%d", (1), (2), (2), (2));
  done = (1);
  return version;
}


x86 assembly (clang, -O0):
<roadmap_start_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f61(%rip)
je     1135 <roadmap_start_version+0x25>
lea    0x2f14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116e <roadmap_start_version+0x5e>
lea    0x2f04(%rip),%rdi
lea    0xebd(%rip),%rsi
mov    $0x1,%edx
mov    $0x2,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <sprintf@plt>
movl   $0x1,0x2f1d(%rip)
lea    0x2ed6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_start_version>:
push   %rax
cmpb   $0x0,0x2f68(%rip)
jne    114a <roadmap_start_version+0x3a>
lea    0x2f1f(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x2,%r8d
mov    $0x2,%r9d
call   1030 <sprintf@plt>
movb   $0x1,0x2f36(%rip)
lea    0x2eef(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@roadmap_start_version.version = internal global [64 x i8] zeroinitializer
@roadmap_start_version.done = internal global i32 0
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define i8* @roadmap_start_version() {
%1 = alloca i8*
%2 = load i32, i32* @roadmap_start_version.done
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8* getelementptr inbounds ([64 x i8], [64 x i8]* @roadmap_start_version.version, i64 0, i64 0), i8** %1
br label %7
5: ; preds = %0
%6 = call i32 @sprintf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @roadmap_start_version.version, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 2, i32 2)
store i32 1, i32* @roadmap_start_version.done
store i8* getelementptr inbounds ([64 x i8], [64 x i8]* @roadmap_start_version.version, i64 0, i64 0), i8** %1
br label %7
7: ; preds = %5, %4
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@roadmap_start_version.version = internal global [64 x i8] zeroinitializer
@roadmap_start_version.done = internal unnamed_addr global i1 false
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define i8* @roadmap_start_version() {
%1 = load i1, i1* @roadmap_start_version.done
br i1 %1, label %4, label %2
2: ; preds = %0
%3 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @roadmap_start_version.version, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 2, i32 2)
store i1 true, i1* @roadmap_start_version.done
br label %4
4: ; preds = %0, %2
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @roadmap_start_version.version, i64 0, i64 0)
}