#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*/ sscanf(char *, char const *, ...);
void uninitvar_sscanf(char *s, const char *f, int i, int *ip) {
  char *string;
  const char *format;
  int *pInteger;
  (void)sscanf(string, f);
  (void)sscanf(string, f, i);
  (void)sscanf(string, f, ip);
  (void)sscanf(s, format, &i);
  (void)sscanf(s, f, pInteger);
  (void)sscanf(s, f, &i);
  (void)sscanf(s, f, ip);
}


x86 assembly (clang, -O0):
<uninitvar_sscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_sscanf>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %edx,0x4(%rsp)
xor    %eax,%eax
call   1030 <sscanf@plt>
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <sscanf@plt>
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <sscanf@plt>
lea    0x4(%rsp),%rbp
mov    %r15,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   1030 <sscanf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <sscanf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1030 <sscanf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <sscanf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @uninitvar_sscanf(i8* nocapture %0, i8* nocapture %1, i32 %2, i32* %3) {
%5 = alloca i32
store i32 %2, i32* %5
%6 = tail call i32 (i8*, i8*, ...) @sscanf(i8* undef, i8* %1)
%7 = tail call i32 (i8*, i8*, ...) @sscanf(i8* undef, i8* %1, i32 %2)
%8 = tail call i32 (i8*, i8*, ...) @sscanf(i8* undef, i8* %1, i32* %3)
%9 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* undef, i32* %5)
%10 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* %1, i32* undef)
%11 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* %1, i32* %5)
%12 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* %1, i32* %3)
ret void
}