#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*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int, int,
                           int);
int get_absolute_num(int, int, int, int, int);
int write_tetrs(FILE *file, int num, int i, int j, int k, int N, int M) {
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num,
          get_absolute_num(i, j, k, N, M),
          get_absolute_num(i, j + 1, k + 1, N, M),
          get_absolute_num(i, j + 1, k, N, M),
          get_absolute_num(i + 1, j + 1, k, N, M));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 1,
          get_absolute_num(i, j, k + 1, N, M),
          get_absolute_num(i, j + 1, k + 1, N, M),
          get_absolute_num(i + 1, j + 1, k + 1, N, M),
          get_absolute_num(i, j, k, N, M));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 2,
          get_absolute_num(i, j + 1, k + 1, N, M),
          get_absolute_num(i, j, k, N, M),
          get_absolute_num(i + 1, j + 1, k + 1, N, M),
          get_absolute_num(i + 1, j + 1, k, N, M));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 3,
          get_absolute_num(i, j, k, N, M), get_absolute_num(i + 1, j, k, N, M),
          get_absolute_num(i + 1, j + 1, k, N, M),
          get_absolute_num(i + 1, j + 1, k + 1, N, M));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 4,
          get_absolute_num(i, j, k + 1, N, M),
          get_absolute_num(i + 1, j, k, N, M),
          get_absolute_num(i + 1, j + 1, k + 1, N, M),
          get_absolute_num(i, j, k, N, M));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 5,
          get_absolute_num(i + 1, j, k + 1, N, M),
          get_absolute_num(i + 1, j + 1, k + 1, N, M),
          get_absolute_num(i, j, k + 1, N, M),
          get_absolute_num(i + 1, j, k, N, M));
  return 0;
}


x86 assembly (clang, -O0):
<write_tetrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0xa8(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0xa4(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0xa0(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    -0xb0(%rbp),%rdi
mov    -0xa8(%rbp),%edx
mov    -0xa4(%rbp),%ecx
mov    -0xa0(%rbp),%r8d
mov    -0x9c(%rbp),%r9d
lea    0xe0c(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x88(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x84(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    -0x98(%rbp),%rdi
mov    -0x90(%rbp),%edx
mov    -0x8c(%rbp),%ecx
mov    -0x88(%rbp),%r8d
mov    -0x84(%rbp),%r9d
lea    0xd4d(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x78(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x74(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x70(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    -0x80(%rbp),%rdi
mov    -0x78(%rbp),%edx
mov    -0x74(%rbp),%ecx
mov    -0x70(%rbp),%r8d
mov    -0x6c(%rbp),%r9d
lea    0xca9(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x60(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x58(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    -0x68(%rbp),%rdi
mov    -0x60(%rbp),%edx
mov    -0x5c(%rbp),%ecx
mov    -0x58(%rbp),%r8d
mov    -0x54(%rbp),%r9d
lea    0xc08(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0xc(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%edx
mov    -0x44(%rbp),%ecx
mov    -0x40(%rbp),%r8d
mov    -0x3c(%rbp),%r9d
lea    0xb6a(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1040 <get_absolute_num@plt>
mov    -0x38(%rbp),%rdi
mov    -0x2c(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x20(%rbp),%r9d
lea    0xac6(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_tetrs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9d,%r15d
mov    %r8d,%ebx
mov    %ecx,%ebp
mov    %edx,%r14d
mov    %rsi,0x28(%rsp)
mov    %rdi,0x38(%rsp)
mov    0x90(%rsp),%r13d
mov    %edx,%edi
mov    %ecx,%esi
mov    %r8d,%edx
mov    %r9d,%ecx
mov    %r13d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x1c(%rsp)
lea    0x1(%rbp),%r12d
lea    0x1(%rbx),%edx
mov    %edx,0x24(%rsp)
mov    %rbx,0x40(%rsp)
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x18(%rsp)
mov    %r14d,%edi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x14(%rsp)
lea    0x1(%r14),%edi
mov    %edi,0x34(%rsp)
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,(%rsp)
lea    0xe41(%rip),%rsi
mov    0x38(%rsp),%rdi
mov    0x28(%rsp),%rbx
mov    %ebx,%edx
mov    0x1c(%rsp),%ecx
mov    0x18(%rsp),%r8d
mov    0x14(%rsp),%r9d
call   1030 <fprintf@plt>
lea    0x1(%rbx),%eax
mov    %eax,0x1c(%rsp)
mov    %r14d,%edi
mov    %ebp,%esi
mov    %rbp,%r13
mov    0x24(%rsp),%ebp
mov    %ebp,%edx
mov    %r15d,%ecx
mov    0x90(%rsp),%ebx
mov    %ebx,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x18(%rsp)
mov    %r14d,%edi
mov    %r14,0x48(%rsp)
mov    %r12d,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %ebx,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x14(%rsp)
mov    0x34(%rsp),%edi
mov    %r12d,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %ebx,%r8d
mov    %ebx,%ebp
call   1040 <get_absolute_num@plt>
mov    %eax,%ebx
mov    %r14d,%edi
mov    %r13d,%esi
mov    %r13,0x50(%rsp)
mov    0x40(%rsp),%rdx
mov    %r15d,%ecx
mov    %ebp,%r8d
mov    %ebp,%r14d
call   1040 <get_absolute_num@plt>
mov    %eax,(%rsp)
mov    0x38(%rsp),%rdi
lea    0xd96(%rip),%rsi
mov    0x1c(%rsp),%edx
mov    0x18(%rsp),%ecx
mov    0x14(%rsp),%r8d
mov    %ebx,%r9d
call   1030 <fprintf@plt>
mov    0x28(%rsp),%rax
add    $0x2,%eax
mov    %eax,0x1c(%rsp)
mov    0x48(%rsp),%rbp
mov    %ebp,%edi
mov    %r12d,%esi
mov    0x24(%rsp),%ebx
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x18(%rsp)
mov    %ebp,%edi
mov    %r13d,%esi
mov    0x40(%rsp),%rbp
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x14(%rsp)
mov    0x34(%rsp),%r13d
mov    %r13d,%edi
mov    %r12d,0x20(%rsp)
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x30(%rsp)
mov    %r13d,%edi
mov    %r12d,%esi
mov    %ebp,%edx
mov    %rbp,%rbx
mov    %r15d,%ecx
mov    %r14d,%r12d
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,(%rsp)
mov    0x38(%rsp),%rdi
lea    0xcf2(%rip),%rsi
mov    0x1c(%rsp),%edx
mov    0x18(%rsp),%ecx
mov    0x14(%rsp),%r8d
mov    0x30(%rsp),%r9d
call   1030 <fprintf@plt>
mov    0x28(%rsp),%rax
add    $0x3,%eax
mov    %eax,0x1c(%rsp)
mov    0x48(%rsp),%rdi
mov    0x50(%rsp),%rbp
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x18(%rsp)
mov    %r13d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x14(%rsp)
mov    %r13d,%edi
mov    %r13d,%r14d
mov    0x20(%rsp),%r13d
mov    %r13d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,%ebp
mov    %r14d,%edi
mov    %r13d,%esi
mov    0x24(%rsp),%ebx
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %r12d,%r13d
call   1040 <get_absolute_num@plt>
mov    %eax,(%rsp)
mov    0x38(%rsp),%rdi
lea    0xc56(%rip),%rsi
mov    0x1c(%rsp),%edx
mov    0x18(%rsp),%ecx
mov    0x14(%rsp),%r8d
mov    %ebp,%r9d
call   1030 <fprintf@plt>
mov    0x28(%rsp),%rax
add    $0x4,%eax
mov    %eax,0x1c(%rsp)
mov    0x48(%rsp),%r12
mov    %r12d,%edi
mov    0x50(%rsp),%rbp
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x18(%rsp)
mov    %r14d,%ebx
mov    %r14d,%edi
mov    %ebp,%esi
mov    0x40(%rsp),%r13
mov    %r13d,%edx
mov    %r15d,%ecx
mov    0x90(%rsp),%r14d
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x14(%rsp)
mov    %ebx,%edi
mov    0x20(%rsp),%esi
mov    0x24(%rsp),%ebx
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x30(%rsp)
mov    %r12d,%edi
mov    %ebp,%esi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,(%rsp)
mov    0x38(%rsp),%rdi
lea    0xbb1(%rip),%rsi
mov    0x1c(%rsp),%edx
mov    0x18(%rsp),%ecx
mov    0x14(%rsp),%r8d
mov    0x30(%rsp),%r9d
call   1030 <fprintf@plt>
mov    0x28(%rsp),%r12
add    $0x5,%r12d
mov    0x34(%rsp),%ebp
mov    %ebp,%edi
mov    0x50(%rsp),%r13
mov    %r13d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x28(%rsp)
mov    %ebp,%edi
mov    0x20(%rsp),%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,0x20(%rsp)
mov    0x48(%rsp),%rdi
mov    %r13d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %r13d,%esi
mov    0x40(%rsp),%rdx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <get_absolute_num@plt>
mov    %eax,(%rsp)
mov    0x38(%rsp),%rdi
lea    0xb20(%rip),%rsi
mov    %r12d,%edx
mov    0x28(%rsp),%ecx
mov    0x20(%rsp),%r8d
mov    %ebx,%r9d
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"%d 4 3 0 1 0 %d %d %d %d\0A\00"
define i32 @write_tetrs(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32* %0, i32** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32*, i32** %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call i32 @get_absolute_num(i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %10
%24 = load i32, i32* %11
%25 = add nsw i32 %24, 1
%26 = load i32, i32* %12
%27 = add nsw i32 %26, 1
%28 = load i32, i32* %13
%29 = load i32, i32* %14
%30 = call i32 @get_absolute_num(i32 %23, i32 %25, i32 %27, i32 %28, i32 %29)
%31 = load i32, i32* %10
%32 = load i32, i32* %11
%33 = add nsw i32 %32, 1
%34 = load i32, i32* %12
%35 = load i32, i32* %13
%36 = load i32, i32* %14
%37 = call i32 @get_absolute_num(i32 %31, i32 %33, i32 %34, i32 %35, i32 %36)
%38 = load i32, i32* %10
%39 = add nsw i32 %38, 1
%40 = load i32, i32* %11
%41 = add nsw i32 %40, 1
%42 = load i32, i32* %12
%43 = load i32, i32* %13
%44 = load i32, i32* %14
%45 = call i32 @get_absolute_num(i32 %39, i32 %41, i32 %42, i32 %43, i32 %44)
%46 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %22, i32 %30, i32 %37, i32 %45)
%47 = load i32*, i32** %8
%48 = load i32, i32* %9
%49 = add nsw i32 %48, 1
%50 = load i32, i32* %10
%51 = load i32, i32* %11
%52 = load i32, i32* %12
%53 = add nsw i32 %52, 1
%54 = load i32, i32* %13
%55 = load i32, i32* %14
%56 = call i32 @get_absolute_num(i32 %50, i32 %51, i32 %53, i32 %54, i32 %55)
%57 = load i32, i32* %10
%58 = load i32, i32* %11
%59 = add nsw i32 %58, 1
%60 = load i32, i32* %12
%61 = add nsw i32 %60, 1
%62 = load i32, i32* %13
%63 = load i32, i32* %14
%64 = call i32 @get_absolute_num(i32 %57, i32 %59, i32 %61, i32 %62, i32 %63)
%65 = load i32, i32* %10
%66 = add nsw i32 %65, 1
%67 = load i32, i32* %11
%68 = add nsw i32 %67, 1
%69 = load i32, i32* %12
%70 = add nsw i32 %69, 1
%71 = load i32, i32* %13
%72 = load i32, i32* %14
%73 = call i32 @get_absolute_num(i32 %66, i32 %68, i32 %70, i32 %71, i32 %72)
%74 = load i32, i32* %10
%75 = load i32, i32* %11
%76 = load i32, i32* %12
%77 = load i32, i32* %13
%78 = load i32, i32* %14
%79 = call i32 @get_absolute_num(i32 %74, i32 %75, i32 %76, i32 %77, i32 %78)
%80 = call i32 @fprintf(i32* %47, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %49, i32 %56, i32 %64, i32 %73, i32 %79)
%81 = load i32*, i32** %8
%82 = load i32, i32* %9
%83 = add nsw i32 %82, 2
%84 = load i32, i32* %10
%85 = load i32, i32* %11
%86 = add nsw i32 %85, 1
%87 = load i32, i32* %12
%88 = add nsw i32 %87, 1
%89 = load i32, i32* %13
%90 = load i32, i32* %14
%91 = call i32 @get_absolute_num(i32 %84, i32 %86, i32 %88, i32 %89, i32 %90)
%92 = load i32, i32* %10
%93 = load i32, i32* %11
%94 = load i32, i32* %12
%95 = load i32, i32* %13
%96 = load i32, i32* %14
%97 = call i32 @get_absolute_num(i32 %92, i32 %93, i32 %94, i32 %95, i32 %96)
%98 = load i32, i32* %10
%99 = add nsw i32 %98, 1
%100 = load i32, i32* %11
%101 = add nsw i32 %100, 1
%102 = load i32, i32* %12
%103 = add nsw i32 %102, 1
%104 = load i32, i32* %13
%105 = load i32, i32* %14
%106 = call i32 @get_absolute_num(i32 %99, i32 %101, i32 %103, i32 %104, i32 %105)
%107 = load i32, i32* %10
%108 = add nsw i32 %107, 1
%109 = load i32, i32* %11
%110 = add nsw i32 %109, 1
%111 = load i32, i32* %12
%112 = load i32, i32* %13
%113 = load i32, i32* %14
%114 = call i32 @get_absolute_num(i32 %108, i32 %110, i32 %111, i32 %112, i32 %113)
%115 = call i32 @fprintf(i32* %81, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %83, i32 %91, i32 %97, i32 %106, i32 %114)
%116 = load i32*, i32** %8
%117 = load i32, i32* %9
%118 = add nsw i32 %117, 3
%119 = load i32, i32* %10
%120 = load i32, i32* %11
%121 = load i32, i32* %12
%122 = load i32, i32* %13
%123 = load i32, i32* %14
%124 = call i32 @get_absolute_num(i32 %119, i32 %120, i32 %121, i32 %122, i32 %123)
%125 = load i32, i32* %10
%126 = add nsw i32 %125, 1
%127 = load i32, i32* %11
%128 = load i32, i32* %12
%129 = load i32, i32* %13
%130 = load i32, i32* %14
%131 = call i32 @get_absolute_num(i32 %126, i32 %127, i32 %128, i32 %129, i32 %130)
%132 = load i32, i32* %10
%133 = add nsw i32 %132, 1
%134 = load i32, i32* %11
%135 = add nsw i32 %134, 1
%136 = load i32, i32* %12
%137 = load i32, i32* %13
%138 = load i32, i32* %14
%139 = call i32 @get_absolute_num(i32 %133, i32 %135, i32 %136, i32 %137, i32 %138)
%140 = load i32, i32* %10
%141 = add nsw i32 %140, 1
%142 = load i32, i32* %11
%143 = add nsw i32 %142, 1
%144 = load i32, i32* %12
%145 = add nsw i32 %144, 1
%146 = load i32, i32* %13
%147 = load i32, i32* %14
%148 = call i32 @get_absolute_num(i32 %141, i32 %143, i32 %145, i32 %146, i32 %147)
%149 = call i32 @fprintf(i32* %116, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %118, i32 %124, i32 %131, i32 %139, i32 %148)
%150 = load i32*, i32** %8
%151 = load i32, i32* %9
%152 = add nsw i32 %151, 4
%153 = load i32, i32* %10
%154 = load i32, i32* %11
%155 = load i32, i32* %12
%156 = add nsw i32 %155, 1
%157 = load i32, i32* %13
%158 = load i32, i32* %14
%159 = call i32 @get_absolute_num(i32 %153, i32 %154, i32 %156, i32 %157, i32 %158)
%160 = load i32, i32* %10
%161 = add nsw i32 %160, 1
%162 = load i32, i32* %11
%163 = load i32, i32* %12
%164 = load i32, i32* %13
%165 = load i32, i32* %14
%166 = call i32 @get_absolute_num(i32 %161, i32 %162, i32 %163, i32 %164, i32 %165)
%167 = load i32, i32* %10
%168 = add nsw i32 %167, 1
%169 = load i32, i32* %11
%170 = add nsw i32 %169, 1
%171 = load i32, i32* %12
%172 = add nsw i32 %171, 1
%173 = load i32, i32* %13
%174 = load i32, i32* %14
%175 = call i32 @get_absolute_num(i32 %168, i32 %170, i32 %172, i32 %173, i32 %174)
%176 = load i32, i32* %10
%177 = load i32, i32* %11
%178 = load i32, i32* %12
%179 = load i32, i32* %13
%180 = load i32, i32* %14
%181 = call i32 @get_absolute_num(i32 %176, i32 %177, i32 %178, i32 %179, i32 %180)
%182 = call i32 @fprintf(i32* %150, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %152, i32 %159, i32 %166, i32 %175, i32 %181)
%183 = load i32*, i32** %8
%184 = load i32, i32* %9
%185 = add nsw i32 %184, 5
%186 = load i32, i32* %10
%187 = add nsw i32 %186, 1
%188 = load i32, i32* %11
%189 = load i32, i32* %12
%190 = add nsw i32 %189, 1
%191 = load i32, i32* %13
%192 = load i32, i32* %14
%193 = call i32 @get_absolute_num(i32 %187, i32 %188, i32 %190, i32 %191, i32 %192)
%194 = load i32, i32* %10
%195 = add nsw i32 %194, 1
%196 = load i32, i32* %11
%197 = add nsw i32 %196, 1
%198 = load i32, i32* %12
%199 = add nsw i32 %198, 1
%200 = load i32, i32* %13
%201 = load i32, i32* %14
%202 = call i32 @get_absolute_num(i32 %195, i32 %197, i32 %199, i32 %200, i32 %201)
%203 = load i32, i32* %10
%204 = load i32, i32* %11
%205 = load i32, i32* %12
%206 = add nsw i32 %205, 1
%207 = load i32, i32* %13
%208 = load i32, i32* %14
%209 = call i32 @get_absolute_num(i32 %203, i32 %204, i32 %206, i32 %207, i32 %208)
%210 = load i32, i32* %10
%211 = add nsw i32 %210, 1
%212 = load i32, i32* %11
%213 = load i32, i32* %12
%214 = load i32, i32* %13
%215 = load i32, i32* %14
%216 = call i32 @get_absolute_num(i32 %211, i32 %212, i32 %213, i32 %214, i32 %215)
%217 = call i32 @fprintf(i32* %183, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %185, i32 %193, i32 %202, i32 %209, i32 %216)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"%d 4 3 0 1 0 %d %d %d %d\0A\00"
define i32 @write_tetrs(i32* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @get_absolute_num(i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%9 = add nsw i32 %3, 1
%10 = add nsw i32 %4, 1
%11 = tail call i32 @get_absolute_num(i32 %2, i32 %9, i32 %10, i32 %5, i32 %6)
%12 = tail call i32 @get_absolute_num(i32 %2, i32 %9, i32 %4, i32 %5, i32 %6)
%13 = add nsw i32 %2, 1
%14 = tail call i32 @get_absolute_num(i32 %13, i32 %9, i32 %4, i32 %5, i32 %6)
%15 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %8, i32 %11, i32 %12, i32 %14)
%16 = add nsw i32 %1, 1
%17 = tail call i32 @get_absolute_num(i32 %2, i32 %3, i32 %10, i32 %5, i32 %6)
%18 = tail call i32 @get_absolute_num(i32 %2, i32 %9, i32 %10, i32 %5, i32 %6)
%19 = tail call i32 @get_absolute_num(i32 %13, i32 %9, i32 %10, i32 %5, i32 %6)
%20 = tail call i32 @get_absolute_num(i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%21 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17, i32 %18, i32 %19, i32 %20)
%22 = add nsw i32 %1, 2
%23 = tail call i32 @get_absolute_num(i32 %2, i32 %9, i32 %10, i32 %5, i32 %6)
%24 = tail call i32 @get_absolute_num(i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%25 = tail call i32 @get_absolute_num(i32 %13, i32 %9, i32 %10, i32 %5, i32 %6)
%26 = tail call i32 @get_absolute_num(i32 %13, i32 %9, i32 %4, i32 %5, i32 %6)
%27 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %24, i32 %25, i32 %26)
%28 = add nsw i32 %1, 3
%29 = tail call i32 @get_absolute_num(i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%30 = tail call i32 @get_absolute_num(i32 %13, i32 %3, i32 %4, i32 %5, i32 %6)
%31 = tail call i32 @get_absolute_num(i32 %13, i32 %9, i32 %4, i32 %5, i32 %6)
%32 = tail call i32 @get_absolute_num(i32 %13, i32 %9, i32 %10, i32 %5, i32 %6)
%33 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %28, i32 %29, i32 %30, i32 %31, i32 %32)
%34 = add nsw i32 %1, 4
%35 = tail call i32 @get_absolute_num(i32 %2, i32 %3, i32 %10, i32 %5, i32 %6)
%36 = tail call i32 @get_absolute_num(i32 %13, i32 %3, i32 %4, i32 %5, i32 %6)
%37 = tail call i32 @get_absolute_num(i32 %13, i32 %9, i32 %10, i32 %5, i32 %6)
%38 = tail call i32 @get_absolute_num(i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%39 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %34, i32 %35, i32 %36, i32 %37, i32 %38)
%40 = add nsw i32 %1, 5
%41 = tail call i32 @get_absolute_num(i32 %13, i32 %3, i32 %10, i32 %5, i32 %6)
%42 = tail call i32 @get_absolute_num(i32 %13, i32 %9, i32 %10, i32 %5, i32 %6)
%43 = tail call i32 @get_absolute_num(i32 %2, i32 %3, i32 %10, i32 %5, i32 %6)
%44 = tail call i32 @get_absolute_num(i32 %13, i32 %3, i32 %4, i32 %5, i32 %6)
%45 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %40, i32 %41, i32 %42, i32 %43, i32 %44)
ret i32 0
}