#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, ...);
const char *slog_version(int min) {
  static char verstr[128];
  if (min)
    sprintf(verstr, "%d.%d.%d", 1, 4, 70);
  else
    sprintf(verstr, "%d.%d build %d (%s)", 1, 4, 70, "Mar 16 2022");
  return verstr;
}


x86 assembly (clang, -O0):
<slog_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114f <slog_version+0x3f>
lea    0x2f14(%rip),%rdi
lea    0xecd(%rip),%rsi
mov    $0x1,%edx
mov    $0x4,%ecx
mov    $0x46,%r8d
mov    $0x0,%al
call   1030 <sprintf@plt>
jmp    117b <slog_version+0x6b>
lea    0x2eea(%rip),%rdi
lea    0xeac(%rip),%rsi
mov    $0x1,%edx
mov    $0x4,%ecx
mov    $0x46,%r8d
lea    0xea9(%rip),%r9
mov    $0x0,%al
call   1030 <sprintf@plt>
lea    0x2ebe(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slog_version>:
push   %rax
test   %edi,%edi
je     113c <slog_version+0x2c>
lea    0x2f24(%rip),%rdi
lea    0xedd(%rip),%rsi
mov    $0x1,%edx
mov    $0x4,%ecx
mov    $0x46,%r8d
xor    %eax,%eax
call   1030 <sprintf@plt>
jmp    1168 <slog_version+0x58>
lea    0x2efd(%rip),%rdi
lea    0xebf(%rip),%rsi
lea    0xecc(%rip),%r9
mov    $0x1,%edx
mov    $0x4,%ecx
mov    $0x46,%r8d
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0x2ed1(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@slog_version.verstr = internal global [128 x i8] zeroinitializer
@.str = [9 x i8] c"%d.%d.%d\00"
@.str.1 = [20 x i8] c"%d.%d build %d (%s)\00"
@.str.2 = [12 x i8] c"Mar 16 2022\00"
define i8* @slog_version(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, i8*, i32, i32, i32, ...) @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @slog_version.verstr, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 4, i32 70)
br label %9
7: ; preds = %1
%8 = call i32 (i8*, i8*, i32, i32, i32, ...) @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @slog_version.verstr, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 4, i32 70, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @slog_version.verstr, i64 0, i64 0)
}

LLVM IR (-O2):
@slog_version.verstr = internal global [128 x i8] zeroinitializer
@.str = [9 x i8] c"%d.%d.%d\00"
@.str.1 = [20 x i8] c"%d.%d build %d (%s)\00"
@.str.2 = [12 x i8] c"Mar 16 2022\00"
define i8* @slog_version(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, i8*, i32, i32, i32, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @slog_version.verstr, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 4, i32 70)
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, i8*, i32, i32, i32, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @slog_version.verstr, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 4, i32 70, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @slog_version.verstr, i64 0, i64 0)
}