#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 *, unsigned char, int);
int /*<<< orphan*/ putchar(char);
void t_d(unsigned char t[7][7], int k) {
  int i;
  printf("  %c %c", 'a' + k, -77);
  for (i = 0; i < 7; i++)
    printf("%c%c", t[k][i], -61);
  putchar('\n');
}


x86 assembly (clang, -O0):
<t_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x61,%eax
lea    0xec4(%rip),%rdi
mov    $0xffffffb3,%edx
movzbl %al,%esi
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x7,-0x10(%rbp)
jge    1190 <t_d+0x70>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x7,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
lea    0xe94(%rip),%rdi
mov    $0xffffffc3,%edx
movzbl (%rax,%rcx,1),%esi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1150 <t_d+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_d>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%r15
lea    0x61(%r14),%eax
movzbl %al,%esi
lea    0xec7(%rip),%rdi
mov    $0xffffffb3,%edx
call   1040 <printf@plt>
movslq %r14d,%rax
lea    0x0(,%rax,8),%rbx
sub    %rax,%rbx
movzbl (%r15,%rbx,1),%esi
lea    0xeab(%rip),%r14
mov    %r14,%rdi
mov    $0xffffffc3,%edx
call   1040 <printf@plt>
movzbl 0x1(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0xffffffc3,%edx
call   1040 <printf@plt>
movzbl 0x2(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0xffffffc3,%edx
call   1040 <printf@plt>
movzbl 0x3(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0xffffffc3,%edx
call   1040 <printf@plt>
movzbl 0x4(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0xffffffc3,%edx
call   1040 <printf@plt>
movzbl 0x5(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0xffffffc3,%edx
call   1040 <printf@plt>
movzbl 0x6(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0xffffffc3,%edx
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [8 x i8] c" %c %c\00"
@.str.1 = [5 x i8] c"%c%c\00"
define void @t_d([7 x i8]* %0, i32 %1) {
%3 = alloca [7 x i8]*
%4 = alloca i32
%5 = alloca i32
store [7 x i8]* %0, [7 x i8]** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 97, %6
%8 = trunc i32 %7 to i8
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 zeroext %8, i32 -77)
store i32 0, i32* %5
br label %10
10: ; preds = %23, %2
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 7
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = load [7 x i8]*, [7 x i8]** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [7 x i8], [7 x i8]* %14, i64 %16
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [7 x i8], [7 x i8]* %17, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %21, i32 -61)
br label %23
23: ; preds = %13
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %10
26: ; preds = %10
%27 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c" %c %c\00"
@.str.1 = [5 x i8] c"%c%c\00"
define void @t_d([7 x i8]* nocapture %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = add i8 %3, 97
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 zeroext %4, i32 -77)
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 %6, i64 0
%8 = load i8, i8* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %8, i32 -61)
%10 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 %6, i64 1
%11 = load i8, i8* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %11, i32 -61)
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 %6, i64 2
%14 = load i8, i8* %13
%15 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %14, i32 -61)
%16 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 %6, i64 3
%17 = load i8, i8* %16
%18 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %17, i32 -61)
%19 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 %6, i64 4
%20 = load i8, i8* %19
%21 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %20, i32 -61)
%22 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 %6, i64 5
%23 = load i8, i8* %22
%24 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %23, i32 -61)
%25 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 %6, i64 6
%26 = load i8, i8* %25
%27 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %26, i32 -61)
%28 = tail call i32 @putchar(i8 signext 10)
ret void
}