#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, unsigned long, char *);
scalar_t__ randomMT();
int /*<<< orphan*/ seedMT(unsigned int);
int dontdo_main(void) {
  int j;
  seedMT(4357U);
  for (j = 0; j < 2002; j++)
    printf(" %10lu%s", (unsigned long)randomMT(), (j % 7) == 6 ? "\n" : "");
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<dontdo_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1105,%edi
call   1040 <seedMT@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d2,-0x4(%rbp)
jge    119c <dontdo_main+0x6c>
mov    $0x0,%al
call   1050 <randomMT@plt>
mov    %rax,%rsi
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
lea    0xe96(%rip),%rdx
lea    0xe8e(%rip),%rax
cmp    $0x6,%ecx
cmove  %rax,%rdx
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <dontdo_main+0x19>
mov    0x2e3d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dontdo_main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x1105,%edi
call   1040 <seedMT@plt>
lea    0xebd(%rip),%r14
lea    0xeb7(%rip),%r15
lea    0xea6(%rip),%r12
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    1179 <dontdo_main+0x49>
mov    %r12,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
add    $0x1,%ebx
cmp    $0xfffff82e,%ebp
je     11b7 <dontdo_main+0x87>
movzwl %bx,%eax
imul   $0x2493,%eax,%eax
shr    $0x10,%eax
mov    %ebx,%ecx
sub    %eax,%ecx
movzwl %cx,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x2,%ecx
mov    %ecx,%eax
shl    $0x3,%eax
neg    %eax
lea    (%rcx,%rax,1),%r13d
add    $0xfffffffa,%r13d
xor    %eax,%eax
call   1050 <randomMT@plt>
mov    %r14,%rdx
cmp    %bp,%r13w
je     1160 <dontdo_main+0x30>
mov    %r15,%rdx
jmp    1160 <dontdo_main+0x30>
mov    0x2e22(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c" %10lu%s\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@EXIT_SUCCESS = global i32 0
define i32 @dontdo_main() {
%1 = alloca i32
%2 = call i32 @seedMT(i32 4357)
store i32 0, i32* %1
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 2002
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = call i64 (...) @randomMT()
%8 = load i32, i32* %1
%9 = srem i32 %8, 7
%10 = icmp eq i32 %9, 6
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %7, i8* %12)
br label %14
14: ; preds = %6
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %3
17: ; preds = %3
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}

LLVM IR (-O2):
@.str = [9 x i8] c" %10lu%s\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@EXIT_SUCCESS = global i32 0
define i32 @dontdo_main() {
%1 = tail call i32 @seedMT(i32 4357)
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %10, %2 ]
%4 = tail call i64 (...) @randomMT()
%5 = trunc i32 %3 to i16
%6 = urem i16 %5, 7
%7 = icmp eq i16 %6, 6
%8 = select i1 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %4, i8* %8)
%10 = add nuw nsw i32 %3, 1
%11 = icmp eq i32 %10, 2002
br i1 %11, label %12, label %2
12: ; preds = %2
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}