#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 BUFSIZ;
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int len, count;
  int i, j, fc, nc;
  char outbuf[BUFSIZ];
  setbuf(stdout, outbuf);
  if (argc >= 2)
    len = atoi(argv[1]);
  else
    len = 79;
  if (argc >= 3)
    count = atoi(argv[2]);
  else
    count = 200;
  fc = ' ';
  for (i = 0; i < count; i++) {
    if (++fc == 0177)
      fc = ' ';
    nc = fc;
    for (j = 0; j < len; j++) {
      putchar(nc);
      if (++nc == 0177)
        nc = ' ';
    }
    putchar('\n');
  }
  (void)fflush(stdout);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x38(%rbp)
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
call   1040 <setbuf@plt>
cmpl   $0x2,-0x8(%rbp)
jl     11bb <main+0x6b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    11c2 <main+0x72>
movl   $0x4f,-0x14(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     11e1 <main+0x91>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    11e8 <main+0x98>
movl   $0xc8,-0x18(%rbp)
movl   $0x20,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1283 <main+0x133>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmp    $0x7f,%eax
jne    121b <main+0xcb>
movl   $0x20,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    126b <main+0x11b>
mov    -0x28(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmp    $0x7f,%eax
jne    1258 <main+0x108>
movl   $0x20,-0x28(%rbp)
jmp    125d <main+0x10d>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1228 <main+0xd8>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11f6 <main+0xa6>
mov    0x2d4e(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %edi,%r12d
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rsi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
call   1040 <setbuf@plt>
mov    $0x4f,%r13d
movl   $0xc8,-0x2c(%rbp)
cmp    $0x2,%r12d
jl     11c1 <main+0x71>
mov    0x8(%r15),%rdi
call   1060 <atoi@plt>
mov    %eax,%r13d
cmp    $0x2,%r12d
je     11c1 <main+0x71>
mov    0x10(%r15),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x2c(%rbp)
test   %eax,%eax
jle    122d <main+0xdd>
xor    %r15d,%r15d
mov    $0x20,%ebx
mov    $0x20,%r14d
mov    %r13d,-0x30(%rbp)
jmp    11f8 <main+0xa8>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
cmp    -0x2c(%rbp),%r15d
mov    -0x30(%rbp),%r13d
je     122d <main+0xdd>
add    $0x1,%r14d
cmp    $0x7f,%r14d
cmove  %ebx,%r14d
test   %r13d,%r13d
jle    11e0 <main+0x90>
mov    -0x30(%rbp),%r13d
mov    %r14d,%r12d
movsbl %r12b,%edi
call   1030 <putchar@plt>
add    $0x1,%r12d
cmp    $0x7f,%r12d
cmove  %ebx,%r12d
add    $0xffffffff,%r13d
jne    1210 <main+0xc0>
jmp    11e0 <main+0x90>
mov    0x2da4(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@BUFSIZ = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* @BUFSIZ
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %12
%17 = alloca i8, i64 %15
store i64 %15, i64* %13
%18 = load i32, i32* @stdout
%19 = call i32 @setbuf(i32 %18, i8* %17)
%20 = load i32, i32* %4
%21 = icmp sge i32 %20, 2
br i1 %21, label %22, label %27
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @atoi(i8* %25)
store i32 %26, i32* %6
br label %28
27: ; preds = %2
store i32 79, i32* %6
br label %28
28: ; preds = %27, %22
%29 = load i32, i32* %4
%30 = icmp sge i32 %29, 3
br i1 %30, label %31, label %36
31: ; preds = %28
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 2
%34 = load i8*, i8** %33
%35 = call i32 @atoi(i8* %34)
store i32 %35, i32* %7
br label %37
36: ; preds = %28
store i32 200, i32* %7
br label %37
37: ; preds = %36, %31
store i32 32, i32* %10
store i32 0, i32* %8
br label %38
38: ; preds = %67, %37
%39 = load i32, i32* %8
%40 = load i32, i32* %7
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %70
42: ; preds = %38
%43 = load i32, i32* %10
%44 = add nsw i32 %43, 1
store i32 %44, i32* %10
%45 = icmp eq i32 %44, 127
br i1 %45, label %46, label %47
46: ; preds = %42
store i32 32, i32* %10
br label %47
47: ; preds = %46, %42
%48 = load i32, i32* %10
store i32 %48, i32* %11
store i32 0, i32* %9
br label %49
49: ; preds = %62, %47
%50 = load i32, i32* %9
%51 = load i32, i32* %6
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %65
53: ; preds = %49
%54 = load i32, i32* %11
%55 = trunc i32 %54 to i8
%56 = call i32 @putchar(i8 signext %55)
%57 = load i32, i32* %11
%58 = add nsw i32 %57, 1
store i32 %58, i32* %11
%59 = icmp eq i32 %58, 127
br i1 %59, label %60, label %61
60: ; preds = %53
store i32 32, i32* %11
br label %61
61: ; preds = %60, %53
br label %62
62: ; preds = %61
%63 = load i32, i32* %9
%64 = add nsw i32 %63, 1
store i32 %64, i32* %9
br label %49
65: ; preds = %49
%66 = call i32 @putchar(i8 signext 10)
br label %67
67: ; preds = %65
%68 = load i32, i32* %8
%69 = add nsw i32 %68, 1
store i32 %69, i32* %8
br label %38
70: ; preds = %38
%71 = load i32, i32* @stdout
%72 = call i32 @fflush(i32 %71)
%73 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @BUFSIZ
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = load i32, i32* @stdout
%7 = call i32 @setbuf(i32 %6, i8* %5)
%8 = icmp sgt i32 %0, 1
br i1 %8, label %9, label %19
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
%13 = icmp eq i32 %0, 2
br i1 %13, label %19, label %14
14: ; preds = %9
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %43
19: ; preds = %2, %9, %14
%20 = phi i32 [ %17, %14 ], [ 200, %9 ], [ 200, %2 ]
%21 = phi i32 [ %12, %14 ], [ %12, %9 ], [ 79, %2 ]
%22 = icmp sgt i32 %21, 0
br label %23
23: ; preds = %19, %39
%24 = phi i32 [ 32, %19 ], [ %28, %39 ]
%25 = phi i32 [ 0, %19 ], [ %41, %39 ]
%26 = add nsw i32 %24, 1
%27 = icmp eq i32 %26, 127
%28 = select i1 %27, i32 32, i32 %26
br i1 %22, label %29, label %39
29: ; preds = %23, %29
%30 = phi i32 [ %36, %29 ], [ %28, %23 ]
%31 = phi i32 [ %37, %29 ], [ 0, %23 ]
%32 = trunc i32 %30 to i8
%33 = call i32 @putchar(i8 signext %32)
%34 = add nsw i32 %30, 1
%35 = icmp eq i32 %34, 127
%36 = select i1 %35, i32 32, i32 %34
%37 = add nuw nsw i32 %31, 1
%38 = icmp eq i32 %37, %21
br i1 %38, label %39, label %29
39: ; preds = %29, %23
%40 = call i32 @putchar(i8 signext 10)
%41 = add nuw nsw i32 %25, 1
%42 = icmp eq i32 %41, %20
br i1 %42, label %43, label %23
43: ; preds = %39, %14
%44 = load i32, i32* @stdout
%45 = call i32 @fflush(i32 %44)
%46 = call i32 @exit(i32 0)
unreachable
}