#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*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int main(void) {
  int t, i, j;
  char strarry[30][80];
  printf("Please enter your words, end with an "
         "enpty line.:\n");
  for (t = 0; t < 30; t++) {
    printf("%d:", t);
    gets(strarry[t]);
    if (!*strarry[t])
      break;
  }
  for (i = 0; i < t; i++) {
    printf("%s", strarry[i]);
    putchar('\n');
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x970,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1e,-0x8(%rbp)
jge    11bc <main+0x8c>
mov    -0x8(%rbp),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x8(%rbp),%rax
lea    -0x970(%rbp),%rdi
imul   $0x50,%rax,%rax
add    %rax,%rdi
call   1050 <gets@plt>
movslq -0x8(%rbp),%rcx
lea    -0x970(%rbp),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
cmpb   $0x0,(%rax)
jne    11a9 <main+0x79>
jmp    11bc <main+0x8c>
jmp    11ae <main+0x7e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main+0x27>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1207 <main+0xd7>
movslq -0xc(%rbp),%rax
lea    -0x970(%rbp),%rsi
imul   $0x50,%rax,%rax
add    %rax,%rsi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c3 <main+0x93>
xor    %eax,%eax
add    $0x970,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x968,%rsp
lea    0xeb2(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%r14
lea    0xe9c(%rip),%r15
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1060 <gets@plt>
cmpb   $0x0,(%r14)
je     11a1 <main+0x61>
add    $0x1,%r12
add    $0x50,%r14
cmp    $0x1e,%r12
jne    1170 <main+0x30>
mov    $0x1e,%r12d
jmp    11a6 <main+0x66>
test   %r12d,%r12d
je     11d1 <main+0x91>
mov    %rsp,%rbx
lea    0xe54(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x50,%rbx
add    $0xffffffffffffffff,%r12
jne    11b0 <main+0x70>
xor    %eax,%eax
add    $0x968,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [51 x i8] c"Please enter your words, end with an enpty line.:\0A\00"
@.str.1 = [4 x i8] c"%d:\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [30 x [80 x i8]]
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %7
7: ; preds = %26, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 30
br i1 %9, label %10, label %29
10: ; preds = %7
%11 = load i32, i32* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [30 x [80 x i8]], [30 x [80 x i8]]* %5, i64 0, i64 %14
%16 = getelementptr inbounds [80 x i8], [80 x i8]* %15, i64 0, i64 0
%17 = call i32 @gets(i8* %16)
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [30 x [80 x i8]], [30 x [80 x i8]]* %5, i64 0, i64 %19
%21 = getelementptr inbounds [80 x i8], [80 x i8]* %20, i64 0, i64 0
%22 = load i8, i8* %21
%23 = icmp ne i8 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %10
br label %29
25: ; preds = %10
br label %26
26: ; preds = %25
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %7
29: ; preds = %24, %7
store i32 0, i32* %3
br label %30
30: ; preds = %41, %29
%31 = load i32, i32* %3
%32 = load i32, i32* %2
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %44
34: ; preds = %30
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [30 x [80 x i8]], [30 x [80 x i8]]* %5, i64 0, i64 %36
%38 = getelementptr inbounds [80 x i8], [80 x i8]* %37, i64 0, i64 0
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %38)
%40 = call i32 @putchar(i8 signext 10)
br label %41
41: ; preds = %34
%42 = load i32, i32* %3
%43 = add nsw i32 %42, 1
store i32 %43, i32* %3
br label %30
44: ; preds = %30
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d:\00"
@.str.2 = [3 x i8] c"%s\00"
@str = [50 x i8] c"Please enter your words, end with an enpty line.:\00"
define i32 @main() {
%1 = alloca [30 x [80 x i8]]
%2 = getelementptr inbounds [30 x [80 x i8]], [30 x [80 x i8]]* %1, i64 0, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %0, %12
%5 = phi i64 [ 0, %0 ], [ %13, %12 ]
%6 = trunc i64 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [30 x [80 x i8]], [30 x [80 x i8]]* %1, i64 0, i64 %5, i64 0
%9 = call i32 @gets(i8* %8)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %4
%13 = add nuw nsw i64 %5, 1
%14 = icmp eq i64 %13, 30
br i1 %14, label %18, label %4
15: ; preds = %4
%16 = trunc i64 %5 to i32
%17 = icmp eq i32 %16, 0
br i1 %17, label %28, label %18
18: ; preds = %12, %15
%19 = phi i64 [ %5, %15 ], [ 30, %12 ]
%20 = and i64 %19, 4294967295
br label %21
21: ; preds = %18, %21
%22 = phi i64 [ 0, %18 ], [ %26, %21 ]
%23 = getelementptr inbounds [30 x [80 x i8]], [30 x [80 x i8]]* %1, i64 0, i64 %22, i64 0
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %23)
%25 = call i32 @putchar(i8 signext 10)
%26 = add nuw nsw i64 %22, 1
%27 = icmp eq i64 %26, %20
br i1 %27, label %28, label %21
28: ; preds = %21, %15
ret i32 0
}