#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;
  const char kFormat1[] = "%00d";
  scanf(kFormat1, i);
  scanf("%00d", i);
  const char kFormat2[] = "%[";
  scanf(kFormat2, &i);
  scanf("%[", &i);
}


x86 assembly (clang, -O0):
<pr9751>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xedd(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0xd(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x8(%rbp),%rsi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    0xeb3(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xeab(%rip),%al
mov    %al,-0xe(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
lea    0xe90(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr9751>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x64303025,0x8(%rsp)
64
lea    0xed5(%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    0xeb1(%rip),%r14
lea    0x4(%rsp),%rdi
lea    0x10(%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>
add    $0x18,%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"
define void @pr9751() {
%1 = alloca i32*
%2 = alloca [5 x i8]
%3 = alloca [3 x i8]
%4 = bitcast [5 x i8]* %2 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = load i32*, i32** %1
%7 = call i32 (i8*, ...) @scanf(i8* %5, i32* %6)
%8 = load i32*, i32** %1
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = bitcast [3 x i8]* %3 to i8*
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%12 = call i32 (i8*, ...) @scanf(i8* %11, i32** %1)
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), 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 [5 x i8]
%3 = alloca [3 x i8]
%4 = bitcast i32** %1 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = call i32 (i8*, ...) @scanf(i8* %5, i32* undef)
%7 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* undef)
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%9 = call i32 (i8*, ...) @scanf(i8* %8, i32** %1)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32** %1)
ret void
}