#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 EXIT_SUCCESS;
int /*<<< orphan*/ check_intInput(int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int rows, cols;
  printf("Enter row and col: ");
  check_intInput(&rows, &cols);
  int i;
  for (i = 0; i < rows; i++) {
    char letter = 'a' + i;
    int j;
    for (j = 0; j < cols; j++) {
      printf("%c%c%c ", letter, letter + j, letter);
    }
    printf("\n");
  }
  return 0;
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <check_intInput@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c0 <main+0xa0>
mov    -0x10(%rbp),%eax
add    $0x61,%eax
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a4 <main+0x84>
movsbl -0x11(%rbp),%esi
movsbl -0x11(%rbp),%edx
add    -0x18(%rbp),%edx
movsbl -0x11(%rbp),%ecx
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    116d <main+0x4d>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1151 <main+0x31>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <check_intInput@plt>
cmpl   $0x0,0x4(%rsp)
jle    11be <main+0x8e>
lea    0xeb3(%rip),%r14
xor    %r15d,%r15d
jmp    1185 <main+0x55>
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
cmp    0x4(%rsp),%r15d
jge    11be <main+0x8e>
cmpl   $0x0,(%rsp)
jle    1170 <main+0x40>
lea    0x61(%r15),%eax
movsbl %al,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%r12,%rbx,1),%edx
mov    %r14,%rdi
mov    %r12d,%esi
mov    %r12d,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebx
cmp    (%rsp),%ebx
jl     11a0 <main+0x70>
jmp    1170 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter row and col: \00"
@.str.1 = [8 x i8] c"%c%c%c \00"
@.str.2 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @check_intInput(i32* %2, i32* %3)
store i32 0, i32* %4
br label %9
9: ; preds = %36, %0
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %39
13: ; preds = %9
%14 = load i32, i32* %4
%15 = add nsw i32 97, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %5
store i32 0, i32* %6
br label %17
17: ; preds = %31, %13
%18 = load i32, i32* %6
%19 = load i32, i32* %3
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %34
21: ; preds = %17
%22 = load i8, i8* %5
%23 = sext i8 %22 to i32
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = load i32, i32* %6
%27 = add nsw i32 %25, %26
%28 = load i8, i8* %5
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %23, i32 %27, i32 %29)
br label %31
31: ; preds = %21
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %17
34: ; preds = %17
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %34
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
br label %9
39: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter row and col: \00"
@.str.1 = [8 x i8] c"%c%c%c \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @check_intInput(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %29
9: ; preds = %0, %24
%10 = phi i32 [ %26, %24 ], [ 0, %0 ]
%11 = load i32, i32* %2
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %24
13: ; preds = %9
%14 = shl i32 %10, 24
%15 = add i32 %14, 1627389952
%16 = ashr exact i32 %15, 24
br label %17
17: ; preds = %13, %17
%18 = phi i32 [ 0, %13 ], [ %21, %17 ]
%19 = add nsw i32 %18, %16
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %19, i32 %16)
%21 = add nuw nsw i32 %18, 1
%22 = load i32, i32* %2
%23 = icmp slt i32 %21, %22
br i1 %23, label %17, label %24
24: ; preds = %17, %9
%25 = call i32 @putchar(i32 10)
%26 = add nuw nsw i32 %10, 1
%27 = load i32, i32* %1
%28 = icmp slt i32 %26, %27
br i1 %28, label %9, label %29
29: ; preds = %24, %0
ret i32 0
}