#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 main() {
  int i, j, k;
  for (i = 0; i < 100; ++i)
    for (j = 0; j < 100; ++j)
      for (k = 0; k < 100; ++k) {
        if (i + j + k == 100) {
          goto label;
        }
      }
label:
  printf("hello, world!\n");
  printf("%d %d %d\n", i, j, k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11a2 <main+0x92>
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    118f <main+0x7f>
movl   $0x0,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jge    117c <main+0x6c>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    $0x64,%eax
jne    1169 <main+0x59>
jmp    11a7 <main+0x97>
jmp    116e <main+0x5e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <main+0x38>
jmp    1181 <main+0x71>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    1194 <main+0x84>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
jmp    11a7 <main+0x97>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
mov    $0x64,%eax
mov    $0x63,%r9d
mov    $0x10,%r8d
mov    %eax,%esi
xor    %ebx,%ebx
cmp    $0x63,%esi
mov    $0x63,%edi
cmovb  %esi,%edi
mov    $0x64,%edx
sub    %r14d,%edx
sub    %ebx,%edx
cmp    $0x63,%edx
cmovae %r9d,%edx
xor    %ebp,%ebp
cmp    $0x10,%edx
jb     1190 <main+0x70>
add    $0x1,%edx
mov    %edx,%ecx
and    $0xf,%ecx
cmove  %r8d,%ecx
mov    %edx,%ebp
sub    %ecx,%ebp
sub    %ecx,%edi
add    $0x1,%edi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0xfffffff0,%edi
jne    1180 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %ebp,%esi
je     11c4 <main+0xa4>
add    $0x1,%ebp
cmp    $0x64,%ebp
jne    1190 <main+0x70>
add    $0x1,%ebx
add    $0xffffffff,%esi
cmp    $0x64,%ebx
jne    113c <main+0x1c>
add    $0x1,%r14d
add    $0xffffffff,%eax
cmp    $0x64,%r14d
jne    1138 <main+0x18>
mov    $0x64,%r14d
mov    $0x64,%ebx
mov    $0x64,%ebp
lea    0xe3f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe29(%rip),%rdi
mov    %r14d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"hello, world!\0A\00"
@.str.1 = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %33, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %36
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %29, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 100
br i1 %11, label %12, label %32
12: ; preds = %9
store i32 0, i32* %4
br label %13
13: ; preds = %25, %12
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 100
br i1 %15, label %16, label %28
16: ; preds = %13
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = add nsw i32 %17, %18
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
%22 = icmp eq i32 %21, 100
br i1 %22, label %23, label %24
23: ; preds = %16
br label %37
24: ; preds = %16
br label %25
25: ; preds = %24
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %13
28: ; preds = %13
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %9
32: ; preds = %9
br label %33
33: ; preds = %32
%34 = load i32, i32* %2
%35 = add nsw i32 %34, 1
store i32 %35, i32* %2
br label %5
36: ; preds = %5
br label %37
37: ; preds = %36, %23
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%39 = load i32, i32* %2
%40 = load i32, i32* %3
%41 = load i32, i32* %4
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %39, i32 %40, i32 %41)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%d %d %d\0A\00"
@str = [14 x i8] c"hello, world!\00"
define i32 @main() {
br label %1
1: ; preds = %0, %32
%2 = phi i32 [ 0, %0 ], [ %33, %32 ]
br label %3
3: ; preds = %1, %29
%4 = phi i32 [ 0, %1 ], [ %30, %29 ]
%5 = add nuw i32 %2, %4
%6 = sub i32 100, %5
%7 = call i32 @llvm.umin.i32(i32 %6, i32 99)
%8 = add nuw nsw i32 %7, 1
%9 = add nuw nsw i32 %4, %2
%10 = icmp ult i32 %7, 16
br i1 %10, label %20, label %11
11: ; preds = %3
%12 = and i32 %8, 15
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i32 16, i32 %12
%15 = sub nsw i32 %8, %14
br label %16
16: ; preds = %16, %11
%17 = phi i32 [ 0, %11 ], [ %18, %16 ]
%18 = add nuw i32 %17, 16
%19 = icmp eq i32 %18, %15
br i1 %19, label %20, label %16
20: ; preds = %16, %3
%21 = phi i32 [ 0, %3 ], [ %15, %16 ]
br label %22
22: ; preds = %20, %26
%23 = phi i32 [ %27, %26 ], [ %21, %20 ]
%24 = add nuw nsw i32 %9, %23
%25 = icmp eq i32 %24, 100
br i1 %25, label %35, label %26
26: ; preds = %22
%27 = add nuw nsw i32 %23, 1
%28 = icmp eq i32 %27, 100
br i1 %28, label %29, label %22
29: ; preds = %26
%30 = add nuw nsw i32 %4, 1
%31 = icmp eq i32 %30, 100
br i1 %31, label %32, label %3
32: ; preds = %29
%33 = add nuw nsw i32 %2, 1
%34 = icmp eq i32 %33, 100
br i1 %34, label %35, label %1
35: ; preds = %32, %22
%36 = phi i32 [ %2, %22 ], [ 100, %32 ]
%37 = phi i32 [ %4, %22 ], [ 100, %32 ]
%38 = phi i32 [ %23, %22 ], [ 100, %32 ]
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %36, i32 %37, i32 %38)
ret i32 0
}