#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 c, temp;
  scanf("%c", &c);
  scanf("%c", &temp);
  char s[100];
  scanf("%s", s);
  scanf("%c", &temp);
  char sn[10000];
  scanf("%[^\n]%*c", sn);
  printf("%c\n", c);
  printf("%s\n", s);
  printf("%s\n", sn);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2780,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb7(%rip),%rdi
lea    -0x6(%rbp),%rsi
call   1040 <scanf@plt>
lea    -0x70(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1040 <scanf@plt>
lea    0xe97(%rip),%rdi
lea    -0x6(%rbp),%rsi
call   1040 <scanf@plt>
lea    -0x2780(%rbp),%rsi
lea    0xe86(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%esi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2780(%rbp),%rsi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2780,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x2790,%rsp
lea    0xebd(%rip),%rbx
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xe9c(%rip),%rdi
lea    0x10(%rsp),%r15
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xe80(%rip),%rdi
lea    0x80(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
movsbl 0xe(%rsp),%esi
lea    0xe6d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x2790,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [9 x i8] c"%[^\0A]%*c\00"
@.str.3 = [4 x i8] c"%c\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca [100 x i8]
%5 = alloca [10000 x i8]
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%11 = getelementptr inbounds [10000 x i8], [10000 x i8]* %5, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %16)
%18 = getelementptr inbounds [10000 x i8], [10000 x i8]* %5, i64 0, i64 0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [9 x i8] c"%[^\0A]%*c\00"
@.str.3 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca [100 x i8]
%4 = alloca [10000 x i8]
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%10 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %10)
%12 = load i8, i8* %1
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = call i32 @puts(i8* %7)
%16 = call i32 @puts(i8* %10)
ret i32 0
}