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

/* Variables and functions */
int /*<<< orphan*/ vsnprintf(char *, size_t, char *, int /*<<< orphan*/);
void uninivar_vsnprintf(char *S, size_t N, char *Format, va_list Arg) {
  char *s;
  size_t n;
  char *format;
  va_list arg;
  (void)vsnprintf(s, n, format, arg);
  (void)vsnprintf(s, N, Format, Arg);
  (void)vsnprintf(S, n, Format, Arg);
  (void)vsnprintf(S, N, format, Arg);
  (void)vsnprintf(S, N, Format, Arg);
  (void)vsnprintf(S, N, Format, arg);
}


x86 assembly (clang, -O0):
<uninivar_vsnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x3c(%rbp),%ecx
call   1030 <vsnprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <vsnprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <vsnprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <vsnprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <vsnprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x3c(%rbp),%ecx
call   1030 <vsnprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninivar_vsnprintf>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <vsnprintf@plt>
mov    %r15,%rsi
mov    %r14,%rdx
mov    %ebp,%ecx
call   1030 <vsnprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %ebp,%ecx
call   1030 <vsnprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %ebp,%ecx
call   1030 <vsnprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %ebp,%ecx
call   1030 <vsnprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <vsnprintf@plt>

LLVM IR (-O0):
define void @uninivar_vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%13 = load i8*, i8** %9
%14 = load i64, i64* %10
%15 = load i8*, i8** %11
%16 = load i32, i32* %12
%17 = call i32 @vsnprintf(i8* %13, i64 %14, i8* %15, i32 %16)
%18 = load i8*, i8** %9
%19 = load i64, i64* %6
%20 = load i8*, i8** %7
%21 = load i32, i32* %8
%22 = call i32 @vsnprintf(i8* %18, i64 %19, i8* %20, i32 %21)
%23 = load i8*, i8** %5
%24 = load i64, i64* %10
%25 = load i8*, i8** %7
%26 = load i32, i32* %8
%27 = call i32 @vsnprintf(i8* %23, i64 %24, i8* %25, i32 %26)
%28 = load i8*, i8** %5
%29 = load i64, i64* %6
%30 = load i8*, i8** %11
%31 = load i32, i32* %8
%32 = call i32 @vsnprintf(i8* %28, i64 %29, i8* %30, i32 %31)
%33 = load i8*, i8** %5
%34 = load i64, i64* %6
%35 = load i8*, i8** %7
%36 = load i32, i32* %8
%37 = call i32 @vsnprintf(i8* %33, i64 %34, i8* %35, i32 %36)
%38 = load i8*, i8** %5
%39 = load i64, i64* %6
%40 = load i8*, i8** %7
%41 = load i32, i32* %12
%42 = call i32 @vsnprintf(i8* %38, i64 %39, i8* %40, i32 %41)
ret void
}

LLVM IR (-O2):
define void @uninivar_vsnprintf(i8* nocapture %0, i64 %1, i8* nocapture %2, i32 %3) {
%5 = tail call i32 @vsnprintf(i8* undef, i64 undef, i8* undef, i32 undef)
%6 = tail call i32 @vsnprintf(i8* undef, i64 %1, i8* %2, i32 %3)
%7 = tail call i32 @vsnprintf(i8* %0, i64 undef, i8* %2, i32 %3)
%8 = tail call i32 @vsnprintf(i8* %0, i64 %1, i8* undef, i32 %3)
%9 = tail call i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3)
%10 = tail call i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 undef)
ret void
}