#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*/ rysujBlok(unsigned char *, unsigned int, unsigned int);
void rysujPlanszeBlokow(unsigned char *bufferL) {
  unsigned i = 0, j = 0;
  for (i = 0; i < (128 / (7 + 2)); i++)
    for (j = 0; j < 5; j++)
      rysujBlok(bufferL, i * (7 + 2) + 1, j * (3 + 2) + 1);
}


x86 assembly (clang, -O0):
<rysujPlanszeBlokow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xe,-0xc(%rbp)
jae    1184 <rysujPlanszeBlokow+0x74>
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jae    1171 <rysujPlanszeBlokow+0x61>
mov    -0x8(%rbp),%rdi
imul   $0x9,-0xc(%rbp),%esi
add    $0x1,%esi
imul   $0x5,-0x10(%rbp),%edx
add    $0x1,%edx
call   1030 <rysujBlok@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <rysujPlanszeBlokow+0x32>
jmp    1176 <rysujPlanszeBlokow+0x66>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <rysujPlanszeBlokow+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rysujPlanszeBlokow>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1030 <rysujBlok@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x6,%edx
call   1030 <rysujBlok@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0xb,%edx
call   1030 <rysujBlok@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x10,%edx
call   1030 <rysujBlok@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x15,%edx
call   1030 <rysujBlok@plt>
add    $0x9,%ebp
cmp    $0x7f,%ebp
jne    1120 <rysujPlanszeBlokow+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @rysujPlanszeBlokow(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %25, %1
%6 = load i32, i32* %3
%7 = icmp ult i32 %6, 14
br i1 %7, label %8, label %28
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %21, %8
%10 = load i32, i32* %4
%11 = icmp ult i32 %10, 5
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = mul i32 %14, 9
%16 = add i32 %15, 1
%17 = load i32, i32* %4
%18 = mul i32 %17, 5
%19 = add i32 %18, 1
%20 = call i32 @rysujBlok(i8* %13, i32 %16, i32 %19)
br label %21
21: ; preds = %12
%22 = load i32, i32* %4
%23 = add i32 %22, 1
store i32 %23, i32* %4
br label %9
24: ; preds = %9
br label %25
25: ; preds = %24
%26 = load i32, i32* %3
%27 = add i32 %26, 1
store i32 %27, i32* %3
br label %5
28: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @rysujPlanszeBlokow(i8* %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %11, %2 ]
%4 = mul nuw nsw i32 %3, 9
%5 = add nuw nsw i32 %4, 1
%6 = tail call i32 @rysujBlok(i8* %0, i32 %5, i32 1)
%7 = tail call i32 @rysujBlok(i8* %0, i32 %5, i32 6)
%8 = tail call i32 @rysujBlok(i8* %0, i32 %5, i32 11)
%9 = tail call i32 @rysujBlok(i8* %0, i32 %5, i32 16)
%10 = tail call i32 @rysujBlok(i8* %0, i32 %5, i32 21)
%11 = add nuw nsw i32 %3, 1
%12 = icmp eq i32 %11, 14
br i1 %12, label %13, label %2
13: ; preds = %2
ret void
}