#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*/ assert(int);
int /*<<< orphan*/ printf(char *, int, int);
void write_stone(int i, int j) {
  assert(i > 0 && i <= 19);
  assert(j > 0 && j <= 19);
  printf("%c%c", j + 'a' - 1, i + 'a' - 1);
}


x86 assembly (clang, -O0):
<write_stone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jle    1147 <write_stone+0x27>
cmpl   $0x13,-0x4(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xa(%rbp)
jle    116d <write_stone+0x4d>
cmpl   $0x13,-0x8(%rbp)
setle  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%esi
add    $0x61,%esi
sub    $0x1,%esi
mov    -0x4(%rbp),%edx
add    $0x61,%edx
sub    $0x1,%edx
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_stone>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r14d
lea    -0x1(%r14),%eax
xor    %edi,%edi
cmp    $0x13,%eax
setb   %dil
call   1040 <assert@plt>
lea    -0x1(%rbx),%eax
xor    %edi,%edi
cmp    $0x13,%eax
setb   %dil
call   1040 <assert@plt>
add    $0x60,%ebx
add    $0x60,%r14d
lea    0xea6(%rip),%rdi
mov    %ebx,%esi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%c%c\00"
define void @write_stone(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 19
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %10
%17 = load i32, i32* %4
%18 = icmp sle i32 %17, 19
br label %19
19: ; preds = %16, %10
%20 = phi i1 [ false, %10 ], [ %18, %16 ]
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 97
%25 = sub nsw i32 %24, 1
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 97
%28 = sub nsw i32 %27, 1
%29 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %28)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%c%c\00"
define void @write_stone(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = icmp ult i32 %3, 19
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = add i32 %1, -1
%8 = icmp ult i32 %7, 19
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = add nsw i32 %1, 96
%12 = add nsw i32 %0, 96
%13 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
ret void
}