#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char buddy[3][200];
  int i;
  printf("请输入联系人姓名");
  scanf("%50s", buddy[0]);
  printf("\n请输入联系人电话");
  scanf("%30s", buddy[1]);
  printf("\n请输入联系人地址");
  scanf("%1990s", buddy[2]);
  printf("\n请你输入的信息是:\n");
  for (i = 0; i < 3; i++)
    printf("%s\n", buddy[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x270,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x260(%rbp),%rsi
lea    0xecb(%rip),%rdi
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x260(%rbp),%rsi
add    $0xc8,%rsi
lea    0xec2(%rip),%rdi
call   1040 <scanf@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x260(%rbp),%rsi
add    $0x190,%rsi
lea    0xeb9(%rip),%rdi
call   1040 <scanf@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x264(%rbp)
cmpl   $0x3,-0x264(%rbp)
jge    1202 <main+0xe2>
movslq -0x264(%rbp),%rax
lea    -0x260(%rbp),%rsi
imul   $0xc8,%rax,%rax
add    %rax,%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x264(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x264(%rbp)
jmp    11bb <main+0x9b>
xor    %eax,%eax
add    $0x270,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x260,%rsp
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
mov    %rsp,%r14
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc8(%rsp),%r15
lea    0xebf(%rip),%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x190(%rsp),%rbx
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x260,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [25 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E8\81\94\E7\B3\BB\E4\BA\BA\E5\A7\93\E5\90\8D\00"
@.str.1 = [5 x i8] c"%50s\00"
@.str.2 = [26 x i8] c"\0A\E8\AF\B7\E8\BE\93\E5\85\A5\E8\81\94\E7\B3\BB\E4\BA\BA\E7\94\B5\E8\AF\9D\00"
@.str.3 = [5 x i8] c"%30s\00"
@.str.4 = [26 x i8] c"\0A\E8\AF\B7\E8\BE\93\E5\85\A5\E8\81\94\E7\B3\BB\E4\BA\BA\E5\9C\B0\E5\9D\80\00"
@.str.5 = [7 x i8] c"%1990s\00"
@.str.6 = [28 x i8] c"\0A\E8\AF\B7\E4\BD\A0\E8\BE\93\E5\85\A5\E7\9A\84\E4\BF\A1\E6\81\AF\E6\98\AF:\0A\00"
@.str.7 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [200 x i8]]
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [3 x [200 x i8]], [3 x [200 x i8]]* %2, i64 0, i64 0
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds [3 x [200 x i8]], [3 x [200 x i8]]* %2, i64 0, i64 1
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%13 = getelementptr inbounds [3 x [200 x i8]], [3 x [200 x i8]]* %2, i64 0, i64 2
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %3
br label %17
17: ; preds = %26, %0
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 3
br i1 %19, label %20, label %29
20: ; preds = %17
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [3 x [200 x i8]], [3 x [200 x i8]]* %2, i64 0, i64 %22
%24 = getelementptr inbounds [200 x i8], [200 x i8]* %23, i64 0, i64 0
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %24)
br label %26
26: ; preds = %20
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %17
29: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E8\81\94\E7\B3\BB\E4\BA\BA\E5\A7\93\E5\90\8D\00"
@.str.1 = [5 x i8] c"%50s\00"
@.str.2 = [26 x i8] c"\0A\E8\AF\B7\E8\BE\93\E5\85\A5\E8\81\94\E7\B3\BB\E4\BA\BA\E7\94\B5\E8\AF\9D\00"
@.str.3 = [5 x i8] c"%30s\00"
@.str.4 = [26 x i8] c"\0A\E8\AF\B7\E8\BE\93\E5\85\A5\E8\81\94\E7\B3\BB\E4\BA\BA\E5\9C\B0\E5\9D\80\00"
@.str.5 = [7 x i8] c"%1990s\00"
@str = [27 x i8] c"\0A\E8\AF\B7\E4\BD\A0\E8\BE\93\E5\85\A5\E7\9A\84\E4\BF\A1\E6\81\AF\E6\98\AF:\00"
define i32 @main() {
%1 = alloca [3 x [200 x i8]]
%2 = getelementptr inbounds [3 x [200 x i8]], [3 x [200 x i8]]* %1, i64 0, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%6 = getelementptr inbounds [3 x [200 x i8]], [3 x [200 x i8]]* %1, i64 0, i64 1, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%9 = getelementptr inbounds [3 x [200 x i8]], [3 x [200 x i8]]* %1, i64 0, i64 2, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %9)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%12 = call i32 @puts(i8* %2)
%13 = call i32 @puts(i8* %6)
%14 = call i32 @puts(i8* %9)
ret i32 0
}