rInitmatrix(m) float m[40 + 1][40 + 1];
{
  int temp, i, j;
  for (i = 1; i <= 40; i++)
    for (j = 1; j <= 40; j++) {
      temp = Rand();
      m[i][j] = (temp - (temp / 120) * 120 - 60) / 3;
    }
}


x86 assembly (clang, -O0):
<rInitmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
cmpl   $0x28,-0x18(%rbp)
jg     11ae <rInitmatrix+0x9e>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x28,-0x1c(%rbp)
jg     119b <rInitmatrix+0x8b>
mov    $0x0,%al
call   1030 <Rand@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x78,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
imul   $0x78,%ecx,%ecx
sub    %ecx,%eax
sub    $0x3c,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0xa4,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1134 <rInitmatrix+0x24>
jmp    11a0 <rInitmatrix+0x90>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1123 <rInitmatrix+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rInitmatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
add    $0xa8,%r15
mov    $0x1,%r14d
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <Rand@plt>
cltq
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
shr    $0x6,%ecx
add    %edx,%ecx
imul   $0x78,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffffc4,%eax
cwtl
imul   $0x5556,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x10,%eax
add    %ecx,%eax
cwtl
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    $0x28,%rbx
jne    1140 <rInitmatrix+0x30>
add    $0x1,%r14
add    $0xa4,%r15
cmp    $0x29,%r14
jne    1130 <rInitmatrix+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @rInitmatrix([41 x float]* %0) {
%2 = alloca i32
%3 = alloca [41 x float]*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store [41 x float]* %0, [41 x float]** %3
store i32 1, i32* %5
br label %7
7: ; preds = %35, %1
%8 = load i32, i32* %5
%9 = icmp sle i32 %8, 40
br i1 %9, label %10, label %38
10: ; preds = %7
store i32 1, i32* %6
br label %11
11: ; preds = %31, %10
%12 = load i32, i32* %6
%13 = icmp sle i32 %12, 40
br i1 %13, label %14, label %34
14: ; preds = %11
%15 = call i32 (...) @Rand()
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = load i32, i32* %4
%18 = sdiv i32 %17, 120
%19 = mul nsw i32 %18, 120
%20 = sub nsw i32 %16, %19
%21 = sub nsw i32 %20, 60
%22 = sdiv i32 %21, 3
%23 = sitofp i32 %22 to float
%24 = load [41 x float]*, [41 x float]** %3
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [41 x float], [41 x float]* %24, i64 %26
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [41 x float], [41 x float]* %27, i64 0, i64 %29
store float %23, float* %30
br label %31
31: ; preds = %14
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %11
34: ; preds = %11
br label %35
35: ; preds = %34
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 1
store i32 %37, i32* %5
br label %7
38: ; preds = %7
%39 = load i32, i32* %2
ret i32 %39
}

LLVM IR (-O2):
define i32 @rInitmatrix([41 x float]* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %15
%3 = phi i64 [ 1, %1 ], [ %16, %15 ]
br label %4
4: ; preds = %2, %4
%5 = phi i64 [ 1, %2 ], [ %13, %4 ]
%6 = tail call i32 (...) @Rand()
%7 = srem i32 %6, 120
%8 = trunc i32 %7 to i16
%9 = add nsw i16 %8, -60
%10 = sdiv i16 %9, 3
%11 = sitofp i16 %10 to float
%12 = getelementptr inbounds [41 x float], [41 x float]* %0, i64 %3, i64 %5
store float %11, float* %12
%13 = add nuw nsw i64 %5, 1
%14 = icmp eq i64 %13, 41
br i1 %14, label %15, label %4
15: ; preds = %4
%16 = add nuw nsw i64 %3, 1
%17 = icmp eq i64 %16, 41
br i1 %17, label %18, label %2
18: ; preds = %15
ret i32 undef
}