int show_screen(the_image, il, ie)
int il, ie;
short **the_image;
{
  int i, j;
  printf("\n     ");
  for (i = ie - 1; i < ie - 1 + 15; i++)
    printf("-%3d", i);
  for (i = il - 1; i < il - 1 + 20; i++) {
    printf("\n%4d>", i);
    for (j = ie - 1; j < ie - 1 + 15; j++) {
      printf("-%3d", the_image[i][j]);
    }
  }
  return (1);
}


x86 assembly (clang, -O0):
<show_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
add    $0xf,%ecx
cmp    %ecx,%eax
jge    116c <show_screen+0x5c>
mov    -0x14(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <show_screen+0x29>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
add    $0x14,%ecx
cmp    %ecx,%eax
jge    11fa <show_screen+0xea>
mov    -0x14(%rbp),%esi
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
add    $0xf,%ecx
cmp    %ecx,%eax
jge    11e7 <show_screen+0xd7>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movswl (%rax,%rcx,2),%esi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a3 <show_screen+0x93>
jmp    11ec <show_screen+0xdc>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1175 <show_screen+0x65>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_screen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r12d
mov    %esi,%r13d
mov    %rdi,%r14
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    -0x1(%r12),%ebp
lea    0xe(%r12),%r15d
cmp    %r15d,%r12d
cmovg  %r12d,%r15d
lea    0xeba(%rip),%rbx
mov    %ebp,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    %ebp,%r15d
jne    1160 <show_screen+0x50>
lea    -0x1(%r13),%eax
movslq 0x8(%rsp),%rcx
mov    %rcx,0x8(%rsp)
movslq %eax,%rbx
add    $0x12,%r13d
movslq %r13d,%rax
mov    %rax,0x10(%rsp)
sub    %r12d,%r15d
add    $0x1,%r15d
lea    0xe68(%rip),%r12
nop
lea    0xe65(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15d,%r13d
mov    0x8(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rax
movswl (%rax,%rbp,2),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbp
add    $0xffffffff,%r13d
jne    11c0 <show_screen+0xb0>
lea    0x1(%rbx),%rax
cmp    0x10(%rsp),%rbx
mov    %rax,%rbx
jl     11a0 <show_screen+0x90>
mov    $0x1,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"\0A \00"
@.str.1 = [5 x i8] c"-%3d\00"
@.str.2 = [6 x i8] c"\0A%4d>\00"
define i32 @show_screen(i16** %0, i32 %1, i32 %2) {
%4 = alloca i16**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i16** %0, i16*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %6
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %7
br label %12
12: ; preds = %21, %3
%13 = load i32, i32* %7
%14 = load i32, i32* %6
%15 = sub nsw i32 %14, 1
%16 = add nsw i32 %15, 15
%17 = icmp slt i32 %13, %16
br i1 %17, label %18, label %24
18: ; preds = %12
%19 = load i32, i32* %7
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %18
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %12
24: ; preds = %12
%25 = load i32, i32* %5
%26 = sub nsw i32 %25, 1
store i32 %26, i32* %7
br label %27
27: ; preds = %60, %24
%28 = load i32, i32* %7
%29 = load i32, i32* %5
%30 = sub nsw i32 %29, 1
%31 = add nsw i32 %30, 20
%32 = icmp slt i32 %28, %31
br i1 %32, label %33, label %63
33: ; preds = %27
%34 = load i32, i32* %7
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %34)
%36 = load i32, i32* %6
%37 = sub nsw i32 %36, 1
store i32 %37, i32* %8
br label %38
38: ; preds = %56, %33
%39 = load i32, i32* %8
%40 = load i32, i32* %6
%41 = sub nsw i32 %40, 1
%42 = add nsw i32 %41, 15
%43 = icmp slt i32 %39, %42
br i1 %43, label %44, label %59
44: ; preds = %38
%45 = load i16**, i16*** %4
%46 = load i32, i32* %7
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i16*, i16** %45, i64 %47
%49 = load i16*, i16** %48
%50 = load i32, i32* %8
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i16, i16* %49, i64 %51
%53 = load i16, i16* %52
%54 = sext i16 %53 to i32
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %54)
br label %56
56: ; preds = %44
%57 = load i32, i32* %8
%58 = add nsw i32 %57, 1
store i32 %58, i32* %8
br label %38
59: ; preds = %38
br label %60
60: ; preds = %59
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 1
store i32 %62, i32* %7
br label %27
63: ; preds = %27
ret i32 1
}

LLVM IR (-O2):
@.str = [7 x i8] c"\0A \00"
@.str.1 = [5 x i8] c"-%3d\00"
@.str.2 = [6 x i8] c"\0A%4d>\00"
define i32 @show_screen(i16** nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = add i32 %2, -1
%6 = add i32 %2, 14
%7 = call i32 @llvm.smax.i32(i32 %2, i32 %6)
br label %8
8: ; preds = %3, %8
%9 = phi i32 [ %5, %3 ], [ %11, %8 ]
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = add i32 %9, 1
%12 = icmp eq i32 %11, %7
br i1 %12, label %13, label %8
13: ; preds = %8
%14 = add i32 %1, -1
%15 = sext i32 %5 to i64
%16 = sext i32 %14 to i64
%17 = add nsw i32 %1, 18
%18 = sext i32 %17 to i64
br label %19
19: ; preds = %13, %34
%20 = phi i64 [ %16, %13 ], [ %35, %34 ]
%21 = trunc i64 %20 to i32
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %21)
%23 = getelementptr inbounds i16*, i16** %0, i64 %20
br label %24
24: ; preds = %19, %24
%25 = phi i64 [ %15, %19 ], [ %31, %24 ]
%26 = load i16*, i16** %23
%27 = getelementptr inbounds i16, i16* %26, i64 %25
%28 = load i16, i16* %27
%29 = sext i16 %28 to i32
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = add nsw i64 %25, 1
%32 = trunc i64 %31 to i32
%33 = icmp eq i32 %7, %32
br i1 %33, label %34, label %24
34: ; preds = %24
%35 = add nsw i64 %20, 1
%36 = icmp slt i64 %20, %18
br i1 %36, label %19, label %37
37: ; preds = %34
ret i32 1
}