#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int, int, char *);
char *get_array1(int *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void rd_int21(int int21[7 + 1][7 + 1][5][5][5], FILE *fp) {
  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, fp);
        if (cp) {
          fprintf(stderr,
                  "convert_epars: 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    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x8,-0x1c(%rbp)
jge    1221 <rd_int21+0xf1>
movl   $0x1,-0x20(%rbp)
cmpl   $0x8,-0x20(%rbp)
jge    120e <rd_int21+0xde>
movl   $0x0,-0x24(%rbp)
cmpl   $0x5,-0x24(%rbp)
jge    11fb <rd_int21+0xcb>
mov    -0x8(%rbp),%rdi
movslq -0x1c(%rbp),%rax
imul   $0xfa0,%rax,%rax
add    %rax,%rdi
movslq -0x20(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rdi
movslq -0x24(%rbp),%rax
imul   $0x64,%rax,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rdx
mov    $0x19,%esi
call   1040 <get_array1@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11e8 <rd_int21+0xb8>
mov    0x2e1e(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x18(%rbp),%r9
lea    0xe27(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    11ed <rd_int21+0xbd>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1169 <rd_int21+0x39>
jmp    1200 <rd_int21+0xd0>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1158 <rd_int21+0x28>
jmp    1213 <rd_int21+0xe3>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1147 <rd_int21+0x17>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_int21>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r15
mov    %rdi,%rbx
mov    $0x1,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%r12d
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
lea    (%rbx,%rbp,1),%rdi
add    $0x1194,%rdi
mov    $0x19,%esi
mov    %r15,%rdx
call   1040 <get_array1@plt>
test   %rax,%rax
jne    122f <rd_int21+0xff>
lea    (%rbx,%rbp,1),%rdi
add    $0x11f8,%rdi
mov    $0x19,%esi
mov    %r15,%rdx
call   1040 <get_array1@plt>
test   %rax,%rax
jne    1234 <rd_int21+0x104>
lea    (%rbx,%rbp,1),%rdi
add    $0x125c,%rdi
mov    $0x19,%esi
mov    %r15,%rdx
call   1040 <get_array1@plt>
test   %rax,%rax
jne    123c <rd_int21+0x10c>
lea    (%rbx,%rbp,1),%rdi
add    $0x12c0,%rdi
mov    $0x19,%esi
mov    %r15,%rdx
call   1040 <get_array1@plt>
test   %rax,%rax
jne    1244 <rd_int21+0x114>
lea    (%rbx,%rbp,1),%rdi
add    $0x1324,%rdi
mov    $0x19,%esi
mov    %r15,%rdx
call   1040 <get_array1@plt>
test   %rax,%rax
jne    124c <rd_int21+0x11c>
add    $0x1,%r12d
add    $0x1f4,%rbp
cmp    $0xdac,%rbp
jne    1160 <rd_int21+0x30>
add    $0x1,%r14
add    $0xfa0,%rbx
cmp    $0x8,%r14
jne    1150 <rd_int21+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r8d,%r8d
jmp    1252 <rd_int21+0x122>
mov    $0x1,%r8d
jmp    1252 <rd_int21+0x122>
mov    $0x2,%r8d
jmp    1252 <rd_int21+0x122>
mov    $0x3,%r8d
jmp    1252 <rd_int21+0x122>
mov    $0x4,%r8d
mov    0x2d87(%rip),%rcx
mov    (%rcx),%edi
lea    0xd9e(%rip),%rsi
mov    %r14d,%edx
mov    %r12d,%ecx
mov    %rax,%r9
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

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