#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*/ printn(int);
void main() {
  int x;
  int y;
  int z;
  for (x = 1; x != 11; x++) {
    for (y = 1; y != 11; y++) {
      z = x * y;
      printn(z);
    }
    if (x == 5)
      break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0xb,-0x4(%rbp)
je     117c <main+0x6c>
movl   $0x1,-0x8(%rbp)
cmpl   $0xb,-0x8(%rbp)
je     115a <main+0x4a>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <printn@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <main+0x20>
cmpl   $0x5,-0x4(%rbp)
jne    1169 <main+0x59>
jmp    117c <main+0x6c>
jmp    116e <main+0x5e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x1,%eax
movl   $0x8,0x8(%rsp)
movl   $0x4,0x10(%rsp)
mov    $0x2,%ebx
movl   $0xa,0x14(%rsp)
movl   $0x9,0xc(%rsp)
mov    $0x7,%r13d
mov    $0x6,%ebp
mov    $0x5,%r15d
mov    $0x3,%r12d
nop
mov    %eax,0x18(%rsp)
mov    0x18(%rsp),%edi
call   1030 <printn@plt>
mov    %ebx,0x20(%rsp)
mov    %ebx,%edi
call   1030 <printn@plt>
mov    %r12d,0x24(%rsp)
mov    %r12d,%edi
call   1030 <printn@plt>
mov    0x10(%rsp),%ebx
mov    %ebx,%edi
call   1030 <printn@plt>
mov    %r15d,0x1c(%rsp)
mov    %r15d,%edi
call   1030 <printn@plt>
mov    %ebp,%edi
call   1030 <printn@plt>
mov    %r13d,%edi
call   1030 <printn@plt>
mov    0x8(%rsp),%r14d
mov    %r14d,%edi
call   1030 <printn@plt>
mov    0xc(%rsp),%r12d
mov    %r12d,%edi
call   1030 <printn@plt>
mov    0x14(%rsp),%r15d
mov    %r15d,%edi
call   1030 <printn@plt>
mov    0x18(%rsp),%eax
add    $0x1,%eax
add    $0x8,%r14d
add    $0x4,%ebx
mov    %ebx,0x10(%rsp)
mov    0x20(%rsp),%ebx
add    $0x2,%ebx
add    $0xa,%r15d
mov    %r15d,0x14(%rsp)
add    $0x9,%r12d
mov    %r12d,0xc(%rsp)
add    $0x7,%r13d
add    $0x6,%ebp
mov    0x1c(%rsp),%r15d
add    $0x5,%r15d
mov    0x24(%rsp),%r12d
add    $0x3,%r12d
mov    %r14d,0x8(%rsp)
cmp    $0x30,%r14d
jne    1160 <main+0x50>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %22, %1 ]
%3 = tail call i32 @printn(i32 %2)
%4 = shl nuw nsw i32 %2, 1
%5 = tail call i32 @printn(i32 %4)
%6 = mul nuw nsw i32 %2, 3
%7 = tail call i32 @printn(i32 %6)
%8 = shl nuw nsw i32 %2, 2
%9 = tail call i32 @printn(i32 %8)
%10 = mul nuw nsw i32 %2, 5
%11 = tail call i32 @printn(i32 %10)
%12 = mul nuw nsw i32 %2, 6
%13 = tail call i32 @printn(i32 %12)
%14 = mul nuw nsw i32 %2, 7
%15 = tail call i32 @printn(i32 %14)
%16 = shl nuw nsw i32 %2, 3
%17 = tail call i32 @printn(i32 %16)
%18 = mul nuw nsw i32 %2, 9
%19 = tail call i32 @printn(i32 %18)
%20 = mul nuw nsw i32 %2, 10
%21 = tail call i32 @printn(i32 %20)
%22 = add nuw i32 %2, 1
%23 = icmp eq i32 %22, 6
br i1 %23, label %24, label %1
24: ; preds = %1
ret void
}