#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 const *, int);
void uninitvar_sprintf(char *S, char *Format, int Argument) {
  char *s1, *s2;
  const char *format1, *format2;
  int argument1, argument2;
  (void)sprintf(s1, format1, argument1);
  (void)sprintf(s2, Format, Argument);
  (void)sprintf(S, format2, Argument);
  (void)sprintf(S, Format, argument2);
  (void)sprintf(S, Format, Argument);
}


x86 assembly (clang, -O0):
<uninitvar_sprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x3c(%rbp),%edx
call   1030 <sprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x40(%rbp),%edx
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_sprintf>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1030 <sprintf@plt>
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <sprintf@plt>
mov    %rbp,%rdi
mov    %r14d,%edx
call   1030 <sprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1030 <sprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
define void @uninitvar_sprintf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%13 = load i8*, i8** %7
%14 = load i8*, i8** %9
%15 = load i32, i32* %11
%16 = call i32 @sprintf(i8* %13, i8* %14, i32 %15)
%17 = load i8*, i8** %8
%18 = load i8*, i8** %5
%19 = load i32, i32* %6
%20 = call i32 @sprintf(i8* %17, i8* %18, i32 %19)
%21 = load i8*, i8** %4
%22 = load i8*, i8** %10
%23 = load i32, i32* %6
%24 = call i32 @sprintf(i8* %21, i8* %22, i32 %23)
%25 = load i8*, i8** %4
%26 = load i8*, i8** %5
%27 = load i32, i32* %12
%28 = call i32 @sprintf(i8* %25, i8* %26, i32 %27)
%29 = load i8*, i8** %4
%30 = load i8*, i8** %5
%31 = load i32, i32* %6
%32 = call i32 @sprintf(i8* %29, i8* %30, i32 %31)
ret void
}

LLVM IR (-O2):
define void @uninitvar_sprintf(i8* nocapture writeonly %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) undef, i8* dereferenceable(1) undef, i32 undef)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) undef, i8* dereferenceable(1) %1, i32 %2)
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) undef, i32 %2)
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1, i32 undef)
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1, i32 %2)
ret void
}