#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*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  int tab[10][10] = {{0}}, sump = 0, sumn = 0;
  srand(time(NULL));
  for (int y = 0; y < 10; ++y) {
    for (int x = 0; x < 10; ++x) {
      printf("%i ", tab[x][y] = rand() % 10);
      if (tab[x][y] & 1)
        sumn += tab[x][y];
      else
        sump += tab[x][y];
    }
    printf("\n");
  }
  printf("%i %i\n", sump, sumn);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
movl   $0x0,-0x1a4(%rbp)
movl   $0x0,-0x1a8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
movl   $0x0,-0x1ac(%rbp)
cmpl   $0xa,-0x1ac(%rbp)
jge    12c6 <main+0x176>
movl   $0x0,-0x1b0(%rbp)
cmpl   $0xa,-0x1b0(%rbp)
jge    12a4 <main+0x154>
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
movslq -0x1b0(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1ac(%rbp),%rcx
mov    %esi,(%rax,%rcx,4)
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x1b0(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1ac(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1260 <main+0x110>
movslq -0x1b0(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1ac(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x1a8(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
jmp    128b <main+0x13b>
movslq -0x1b0(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1ac(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x1a4(%rbp),%eax
mov    %eax,-0x1a4(%rbp)
jmp    1290 <main+0x140>
mov    -0x1b0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
jmp    11ba <main+0x6a>
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    11a3 <main+0x53>
mov    -0x1a4(%rbp),%esi
mov    -0x1a8(%rbp),%edx
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0xa,%eax
xor    %ebp,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,0x4(%rsp)
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%r15
imul   $0x66666667,%r15,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%r15d
lea    0xe4f(%rip),%r12
mov    %r12,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%r13d
and    $0x1,%r13d
neg    %r13d
mov    $0x0,%r14d
cmovae %r15d,%r14d
add    %ebx,%r14d
and    %r15d,%r13d
add    %ebp,%r13d
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %r12,%rdi
mov    %r12,%r15
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%ebp
and    $0x1,%ebp
neg    %ebp
mov    $0x0,%r12d
cmovae %ebx,%r12d
add    %r14d,%r12d
and    %ebx,%ebp
add    %r13d,%ebp
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %r15,%r13
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%r15d
and    $0x1,%r15d
neg    %r15d
mov    $0x0,%r14d
cmovae %ebx,%r14d
add    %r12d,%r14d
and    %ebx,%r15d
add    %ebp,%r15d
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%ebp
and    $0x1,%ebp
neg    %ebp
mov    $0x0,%r12d
cmovae %ebx,%r12d
add    %r14d,%r12d
and    %ebx,%ebp
add    %r15d,%ebp
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%r15d
and    $0x1,%r15d
neg    %r15d
mov    $0x0,%r14d
cmovae %ebx,%r14d
add    %r12d,%r14d
and    %ebx,%r15d
add    %ebp,%r15d
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%ebp
and    $0x1,%ebp
neg    %ebp
mov    $0x0,%r12d
cmovae %ebx,%r12d
add    %r14d,%r12d
and    %ebx,%ebp
add    %r15d,%ebp
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%r15d
and    $0x1,%r15d
neg    %r15d
mov    $0x0,%r14d
cmovae %ebx,%r14d
add    %r12d,%r14d
and    %ebx,%r15d
add    %ebp,%r15d
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%ebp
and    $0x1,%ebp
neg    %ebp
mov    $0x0,%r12d
cmovae %ebx,%r12d
add    %r14d,%r12d
and    %ebx,%ebp
add    %r15d,%ebp
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%r13d
and    $0x1,%r13d
neg    %r13d
mov    $0x0,%r14d
cmovae %ebx,%r14d
add    %r12d,%r14d
and    %ebx,%r13d
add    %ebp,%r13d
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%r15
imul   $0x66666667,%r15,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%r15d
lea    0xb92(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%ebp
and    $0x1,%ebp
neg    %ebp
mov    $0x0,%ebx
cmovae %r15d,%ebx
add    %r14d,%ebx
and    %r15d,%ebp
add    %r13d,%ebp
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
jne    1180 <main+0x30>
lea    0xb54(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i \00"
@.str.2 = [7 x i8] c"%i %i\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %98, %3 ]
%5 = phi i32 [ 0, %0 ], [ %96, %3 ]
%6 = phi i32 [ 0, %0 ], [ %94, %3 ]
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 10
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = and i32 %8, 1
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i32 %8, i32 0
%13 = add nsw i32 %12, %6
%14 = select i1 %11, i32 0, i32 %8
%15 = add nsw i32 %14, %5
%16 = tail call i32 (...) @rand()
%17 = srem i32 %16, 10
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = and i32 %17, 1
%20 = icmp eq i32 %19, 0
%21 = select i1 %20, i32 %17, i32 0
%22 = add nsw i32 %21, %13
%23 = select i1 %20, i32 0, i32 %17
%24 = add nsw i32 %23, %15
%25 = tail call i32 (...) @rand()
%26 = srem i32 %25, 10
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = and i32 %26, 1
%29 = icmp eq i32 %28, 0
%30 = select i1 %29, i32 %26, i32 0
%31 = add nsw i32 %30, %22
%32 = select i1 %29, i32 0, i32 %26
%33 = add nsw i32 %32, %24
%34 = tail call i32 (...) @rand()
%35 = srem i32 %34, 10
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = and i32 %35, 1
%38 = icmp eq i32 %37, 0
%39 = select i1 %38, i32 %35, i32 0
%40 = add nsw i32 %39, %31
%41 = select i1 %38, i32 0, i32 %35
%42 = add nsw i32 %41, %33
%43 = tail call i32 (...) @rand()
%44 = srem i32 %43, 10
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %44)
%46 = and i32 %44, 1
%47 = icmp eq i32 %46, 0
%48 = select i1 %47, i32 %44, i32 0
%49 = add nsw i32 %48, %40
%50 = select i1 %47, i32 0, i32 %44
%51 = add nsw i32 %50, %42
%52 = tail call i32 (...) @rand()
%53 = srem i32 %52, 10
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %53)
%55 = and i32 %53, 1
%56 = icmp eq i32 %55, 0
%57 = select i1 %56, i32 %53, i32 0
%58 = add nsw i32 %57, %49
%59 = select i1 %56, i32 0, i32 %53
%60 = add nsw i32 %59, %51
%61 = tail call i32 (...) @rand()
%62 = srem i32 %61, 10
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %62)
%64 = and i32 %62, 1
%65 = icmp eq i32 %64, 0
%66 = select i1 %65, i32 %62, i32 0
%67 = add nsw i32 %66, %58
%68 = select i1 %65, i32 0, i32 %62
%69 = add nsw i32 %68, %60
%70 = tail call i32 (...) @rand()
%71 = srem i32 %70, 10
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %71)
%73 = and i32 %71, 1
%74 = icmp eq i32 %73, 0
%75 = select i1 %74, i32 %71, i32 0
%76 = add nsw i32 %75, %67
%77 = select i1 %74, i32 0, i32 %71
%78 = add nsw i32 %77, %69
%79 = tail call i32 (...) @rand()
%80 = srem i32 %79, 10
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %80)
%82 = and i32 %80, 1
%83 = icmp eq i32 %82, 0
%84 = select i1 %83, i32 %80, i32 0
%85 = add nsw i32 %84, %76
%86 = select i1 %83, i32 0, i32 %80
%87 = add nsw i32 %86, %78
%88 = tail call i32 (...) @rand()
%89 = srem i32 %88, 10
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %89)
%91 = and i32 %89, 1
%92 = icmp eq i32 %91, 0
%93 = select i1 %92, i32 %89, i32 0
%94 = add nsw i32 %93, %85
%95 = select i1 %92, i32 0, i32 %89
%96 = add nsw i32 %95, %87
%97 = tail call i32 @putchar(i32 10)
%98 = add nuw nsw i32 %4, 1
%99 = icmp eq i32 %98, 10
br i1 %99, label %100, label %3
100: ; preds = %3
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %94, i32 %96)
ret i32 0
}