#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int, int, char *);
char *get_array1(int *, int);
int /*<<< orphan*/ stderr;
void rd_int21(int int21[7 + 1][7 + 1][5][5][5]) {
  char *cp;
  int i, j, k;
  for (i = 1; i < 7 + 1; i++) {
    for (j = 1; j < 7 + 1; j++) {
      for (k = 0; k < 5; k++) {
        cp = get_array1(int21[i][j][k][0], 5 * 5);
        if (cp) {
          fprintf(stderr, "rd_int21: in field int21[%d][%d][%d]\n\t%s\n", i, j,
                  k, cp);
          exit(1);
        }
      }
    }
  }
  return;
}


x86 assembly (clang, -O0):
<rd_int21>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1219 <rd_int21+0xe9>
movl   $0x1,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    1206 <rd_int21+0xd6>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x5,-0x1c(%rbp)
jge    11f3 <rd_int21+0xc3>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
imul   $0xfa0,%rax,%rax
add    %rax,%rdi
movslq -0x18(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rdi
movslq -0x1c(%rbp),%rax
imul   $0x64,%rax,%rax
add    %rax,%rdi
mov    $0x19,%esi
call   1040 <get_array1@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11e0 <rd_int21+0xb0>
mov    0x2e26(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x10(%rbp),%r9
lea    0xe2f(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    11e5 <rd_int21+0xb5>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1165 <rd_int21+0x35>
jmp    11f8 <rd_int21+0xc8>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1154 <rd_int21+0x24>
jmp    120b <rd_int21+0xdb>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1143 <rd_int21+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_int21>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%r14d
mov    $0x1,%r15d
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
lea    (%rbx,%rbp,1),%rdi
add    $0x1194,%rdi
mov    $0x19,%esi
call   1040 <get_array1@plt>
test   %rax,%rax
jne    1212 <rd_int21+0xe2>
lea    (%rbx,%rbp,1),%rdi
add    $0x11f8,%rdi
mov    $0x19,%esi
call   1040 <get_array1@plt>
test   %rax,%rax
jne    1217 <rd_int21+0xe7>
lea    (%rbx,%rbp,1),%rdi
add    $0x125c,%rdi
mov    $0x19,%esi
call   1040 <get_array1@plt>
test   %rax,%rax
jne    121f <rd_int21+0xef>
lea    (%rbx,%rbp,1),%rdi
add    $0x12c0,%rdi
mov    $0x19,%esi
call   1040 <get_array1@plt>
test   %rax,%rax
jne    1227 <rd_int21+0xf7>
lea    (%rbx,%rbp,1),%rdi
add    $0x1324,%rdi
mov    $0x19,%esi
call   1040 <get_array1@plt>
test   %rax,%rax
jne    122f <rd_int21+0xff>
add    $0x1,%r15d
add    $0x1f4,%rbp
cmp    $0xdac,%rbp
jne    1150 <rd_int21+0x20>
add    $0x1,%r14
add    $0xfa0,%rbx
cmp    $0x8,%r14
jne    1140 <rd_int21+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r8d,%r8d
jmp    1235 <rd_int21+0x105>
mov    $0x1,%r8d
jmp    1235 <rd_int21+0x105>
mov    $0x2,%r8d
jmp    1235 <rd_int21+0x105>
mov    $0x3,%r8d
jmp    1235 <rd_int21+0x105>
mov    $0x4,%r8d
mov    0x2da4(%rip),%rcx
mov    (%rcx),%edi
lea    0xdbb(%rip),%rsi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %rax,%r9
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"rd_int21: in field int21[%d][%d][%d]\0A\09%s\0A\00"
define void @rd_int21([8 x [5 x [5 x [5 x i32]]]]* %0) {
%2 = alloca [8 x [5 x [5 x [5 x i32]]]]*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store [8 x [5 x [5 x [5 x i32]]]]* %0, [8 x [5 x [5 x [5 x i32]]]]** %2
store i32 1, i32* %4
br label %7
7: ; preds = %51, %1
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 8
br i1 %9, label %10, label %54
10: ; preds = %7
store i32 1, i32* %5
br label %11
11: ; preds = %47, %10
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 8
br i1 %13, label %14, label %50
14: ; preds = %11
store i32 0, i32* %6
br label %15
15: ; preds = %43, %14
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 5
br i1 %17, label %18, label %46
18: ; preds = %15
%19 = load [8 x [5 x [5 x [5 x i32]]]]*, [8 x [5 x [5 x [5 x i32]]]]** %2
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [8 x [5 x [5 x [5 x i32]]]], [8 x [5 x [5 x [5 x i32]]]]* %19, i64 %21
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [8 x [5 x [5 x [5 x i32]]]], [8 x [5 x [5 x [5 x i32]]]]* %22, i64 0, i64 %24
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [5 x [5 x [5 x i32]]], [5 x [5 x [5 x i32]]]* %25, i64 0, i64 %27
%29 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %28, i64 0, i64 0
%30 = getelementptr inbounds [5 x i32], [5 x i32]* %29, i64 0, i64 0
%31 = call i8* @get_array1(i32* %30, i32 25)
store i8* %31, i8** %3
%32 = load i8*, i8** %3
%33 = icmp ne i8* %32, null
br i1 %33, label %34, label %42
34: ; preds = %18
%35 = load i32, i32* @stderr
%36 = load i32, i32* %4
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = load i8*, i8** %3
%40 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %36, i32 %37, i32 %38, i8* %39)
%41 = call i32 @exit(i32 1)
unreachable
42: ; preds = %18
br label %43
43: ; preds = %42
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
store i32 %45, i32* %6
br label %15
46: ; preds = %15
br label %47
47: ; preds = %46
%48 = load i32, i32* %5
%49 = add nsw i32 %48, 1
store i32 %49, i32* %5
br label %11
50: ; preds = %11
br label %51
51: ; preds = %50
%52 = load i32, i32* %4
%53 = add nsw i32 %52, 1
store i32 %53, i32* %4
br label %7
54: ; preds = %7
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"rd_int21: in field int21[%d][%d][%d]\0A\09%s\0A\00"
define void @rd_int21([8 x [5 x [5 x [5 x i32]]]]* %0) {
br label %2
2: ; preds = %1, %36
%3 = phi i64 [ 1, %1 ], [ %37, %36 ]
br label %4
4: ; preds = %2, %33
%5 = phi i64 [ 1, %2 ], [ %34, %33 ]
%6 = getelementptr inbounds [8 x [5 x [5 x [5 x i32]]]], [8 x [5 x [5 x [5 x i32]]]]* %0, i64 %3, i64 %5, i64 0, i64 0, i64 0
%7 = tail call i8* @get_array1(i32* %6, i32 25)
%8 = icmp eq i8* %7, null
br i1 %8, label %17, label %9
9: ; preds = %29, %25, %21, %17, %4
%10 = phi i32 [ 0, %4 ], [ 1, %17 ], [ 2, %21 ], [ 3, %25 ], [ 4, %29 ]
%11 = phi i8* [ %7, %4 ], [ %19, %17 ], [ %23, %21 ], [ %27, %25 ], [ %31, %29 ]
%12 = trunc i64 %5 to i32
%13 = trunc i64 %3 to i32
%14 = load i32, i32* @stderr
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %12, i32 %10, i8* %11)
%16 = tail call i32 @exit(i32 1)
unreachable
17: ; preds = %4
%18 = getelementptr inbounds [8 x [5 x [5 x [5 x i32]]]], [8 x [5 x [5 x [5 x i32]]]]* %0, i64 %3, i64 %5, i64 1, i64 0, i64 0
%19 = tail call i8* @get_array1(i32* %18, i32 25)
%20 = icmp eq i8* %19, null
br i1 %20, label %21, label %9
21: ; preds = %17
%22 = getelementptr inbounds [8 x [5 x [5 x [5 x i32]]]], [8 x [5 x [5 x [5 x i32]]]]* %0, i64 %3, i64 %5, i64 2, i64 0, i64 0
%23 = tail call i8* @get_array1(i32* %22, i32 25)
%24 = icmp eq i8* %23, null
br i1 %24, label %25, label %9
25: ; preds = %21
%26 = getelementptr inbounds [8 x [5 x [5 x [5 x i32]]]], [8 x [5 x [5 x [5 x i32]]]]* %0, i64 %3, i64 %5, i64 3, i64 0, i64 0
%27 = tail call i8* @get_array1(i32* %26, i32 25)
%28 = icmp eq i8* %27, null
br i1 %28, label %29, label %9
29: ; preds = %25
%30 = getelementptr inbounds [8 x [5 x [5 x [5 x i32]]]], [8 x [5 x [5 x [5 x i32]]]]* %0, i64 %3, i64 %5, i64 4, i64 0, i64 0
%31 = tail call i8* @get_array1(i32* %30, i32 25)
%32 = icmp eq i8* %31, null
br i1 %32, label %33, label %9
33: ; preds = %29
%34 = add nuw nsw i64 %5, 1
%35 = icmp eq i64 %34, 8
br i1 %35, label %36, label %4
36: ; preds = %33
%37 = add nuw nsw i64 %3, 1
%38 = icmp eq i64 %37, 8
br i1 %38, label %39, label %2
39: ; preds = %36
ret void
}