#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*/ scanf(char const *, ...);
void pr9751() {
  int *i;
  char str[100];
  const char kFormat1[] = "%00d";
  scanf(kFormat1, i);
  scanf("%00d", i);
  const char kFormat2[] = "%[";
  scanf(kFormat2, str);
  scanf("%[", str);
  const char kFormat3[] = "%hu";
  scanf(kFormat3, &i);
  const char kFormat4[] = "%lp";
  scanf(kFormat4, &i);
}


x86 assembly (clang, -O0):
<pr9751>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0xedf(%rip),%eax
mov    %eax,-0x75(%rbp)
mov    0xeda(%rip),%al
mov    %al,-0x71(%rbp)
lea    -0x75(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    0xeb0(%rip),%ax
mov    %ax,-0x78(%rbp)
mov    0xea8(%rip),%al
mov    %al,-0x76(%rbp)
lea    -0x78(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
lea    -0x70(%rbp),%rsi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    0xe7f(%rip),%eax
mov    %eax,-0x7c(%rbp)
lea    -0x7c(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    0xe6b(%rip),%eax
mov    %eax,-0x80(%rbp)
lea    -0x80(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr9751>:
push   %r14
push   %rbx
sub    $0x88,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x64303025,0x8(%rsp)
64
lea    0xed2(%rip),%rbx
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1030 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <scanf@plt>
movb   $0x0,0x6(%rsp)
movw   $0x5b25,0x4(%rsp)
lea    0xeae(%rip),%r14
lea    0x4(%rsp),%rdi
lea    0x20(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
movl   $0x756825,0x14(%rsp)
lea    0x14(%rsp),%rdi
lea    0x18(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
movl   $0x706c25,0x10(%rsp)
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.pr9751.kFormat1 = [5 x i8] c"%00d\00"
@.str = [5 x i8] c"%00d\00"
@__const.pr9751.kFormat2 = [3 x i8] c"%[\00"
@.str.1 = [3 x i8] c"%[\00"
@__const.pr9751.kFormat3 = [4 x i8] c"%hu\00"
@__const.pr9751.kFormat4 = [4 x i8] c"%lp\00"
define void @pr9751() {
%1 = alloca i32*
%2 = alloca [100 x i8]
%3 = alloca [5 x i8]
%4 = alloca [3 x i8]
%5 = alloca [4 x i8]
%6 = alloca [4 x i8]
%7 = bitcast [5 x i8]* %3 to i8*
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%9 = load i32*, i32** %1
%10 = call i32 (i8*, ...) @scanf(i8* %8, i32* %9)
%11 = load i32*, i32** %1
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = bitcast [3 x i8]* %4 to i8*
%14 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%16 = call i32 (i8*, ...) @scanf(i8* %14, i8* %15)
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = bitcast [4 x i8]* %5 to i8*
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%21 = call i32 (i8*, ...) @scanf(i8* %20, i32** %1)
%22 = bitcast [4 x i8]* %6 to i8*
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%24 = call i32 (i8*, ...) @scanf(i8* %23, i32** %1)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%00d\00"
@.str.1 = [3 x i8] c"%[\00"
define void @pr9751() {
%1 = alloca i32*
%2 = alloca [100 x i8]
%3 = alloca [5 x i8]
%4 = alloca [3 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32** %1 to i8*
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @scanf(i8* %9, i32* undef)
%11 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* undef)
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%13 = call i32 (i8*, ...) @scanf(i8* %12, i8* %8)
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%15 = bitcast i32* %5 to i8*
store i32 7694373, i32* %5
%16 = call i32 (i8*, ...) @scanf(i8* %15, i32** %1)
%17 = bitcast i32* %6 to i8*
store i32 7367717, i32* %6
%18 = call i32 (i8*, ...) @scanf(i8* %17, i32** %1)
ret void
}