#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*/ printcell(int);
int /*<<< orphan*/ printhead();
int /*<<< orphan*/ printrowbegin();
int /*<<< orphan*/ printrowend();
int /*<<< orphan*/ printtail();
int /*<<< orphan*/ puts(char *);
main() {
  int i, j;
  int c = 32;
  int J = 8;
  int I;
  I = (127 - 31) / J;
  printhead();
  for (i = 0; i < I; i++) {
    printrowbegin();
    for (j = 0; j < J; j++) {
      c = 32 + i + I * j;
      printcell(c);
    }
    printrowend();
    puts("");
  }
chau:
  printtail();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x20,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
mov    $0x60,%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <printhead@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1206 <main+0xa6>
mov    $0x0,%al
call   1070 <printrowbegin@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11e5 <main+0x85>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    -0x18(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1050 <printcell@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b1 <main+0x51>
mov    $0x0,%al
call   1080 <printrowend@plt>
lea    0xe0d(%rip),%rdi
call   1040 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1197 <main+0x37>
jmp    120b <main+0xab>
mov    $0x0,%al
call   1060 <printtail@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <printhead@plt>
mov    $0x74,%ebx
nopl   (%rax)
xor    %eax,%eax
call   1070 <printrowbegin@plt>
lea    -0x54(%rbx),%edi
call   1050 <printcell@plt>
lea    -0x48(%rbx),%edi
call   1050 <printcell@plt>
lea    -0x3c(%rbx),%edi
call   1050 <printcell@plt>
lea    -0x30(%rbx),%edi
call   1050 <printcell@plt>
lea    -0x24(%rbx),%edi
call   1050 <printcell@plt>
lea    -0x18(%rbx),%edi
call   1050 <printcell@plt>
lea    -0xc(%rbx),%edi
call   1050 <printcell@plt>
mov    %ebx,%edi
call   1050 <printcell@plt>
xor    %eax,%eax
call   1080 <printrowend@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
add    $0x1,%ebx
cmp    $0x80,%ebx
jne    1170 <main+0x10>
xor    %eax,%eax
call   1060 <printtail@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 32, i32* %4
store i32 8, i32* %5
%7 = load i32, i32* %5
%8 = sdiv i32 96, %7
store i32 %8, i32* %6
%9 = call i32 (...) @printhead()
store i32 0, i32* %2
br label %10
10: ; preds = %35, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %6
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %38
14: ; preds = %10
%15 = call i32 (...) @printrowbegin()
store i32 0, i32* %3
br label %16
16: ; preds = %29, %14
%17 = load i32, i32* %3
%18 = load i32, i32* %5
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %32
20: ; preds = %16
%21 = load i32, i32* %2
%22 = add nsw i32 32, %21
%23 = load i32, i32* %6
%24 = load i32, i32* %3
%25 = mul nsw i32 %23, %24
%26 = add nsw i32 %22, %25
store i32 %26, i32* %4
%27 = load i32, i32* %4
%28 = call i32 @printcell(i32 %27)
br label %29
29: ; preds = %20
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %16
32: ; preds = %16
%33 = call i32 (...) @printrowend()
%34 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %35
35: ; preds = %32
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
store i32 %37, i32* %2
br label %10
38: ; preds = %10
br label %39
39: ; preds = %38
%40 = call i32 (...) @printtail()
%41 = load i32, i32* %1
ret i32 %41
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @printhead()
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %23, %2 ]
%4 = tail call i32 (...) @printrowbegin()
%5 = add nuw nsw i32 %3, 32
%6 = tail call i32 @printcell(i32 %5)
%7 = add nuw nsw i32 %3, 44
%8 = tail call i32 @printcell(i32 %7)
%9 = add nuw nsw i32 %3, 56
%10 = tail call i32 @printcell(i32 %9)
%11 = add nuw nsw i32 %3, 68
%12 = tail call i32 @printcell(i32 %11)
%13 = add nuw nsw i32 %3, 80
%14 = tail call i32 @printcell(i32 %13)
%15 = add nuw nsw i32 %3, 92
%16 = tail call i32 @printcell(i32 %15)
%17 = add nuw nsw i32 %3, 104
%18 = tail call i32 @printcell(i32 %17)
%19 = add nuw nsw i32 %3, 116
%20 = tail call i32 @printcell(i32 %19)
%21 = tail call i32 (...) @printrowend()
%22 = tail call i32 @putchar(i32 10)
%23 = add nuw nsw i32 %3, 1
%24 = icmp eq i32 %23, 12
br i1 %24, label %25, label %2
25: ; preds = %2
%26 = tail call i32 (...) @printtail()
ret i32 0
}