#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 */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint16_t;
typedef scalar_t__ int8_t;
typedef scalar_t__ i;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  uint8_t max = 255;
  for (uint16_t i = 0; i <= max; ++i) {
    for (uint16_t j = 0; j < max; ++j) {
      printf("%d", ((int8_t)(i) - (int8_t)(j)) >= 0);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0xff,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     11ac <main+0x9c>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    118d <main+0x7d>
mov    -0x20(%rbp),%rax
sub    -0x28(%rbp),%rax
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    114c <main+0x3c>
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1136 <main+0x26>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xed4(%rip),%r14
xor    %r15d,%r15d
nop
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %esi,%esi
cmp    %rbx,%r15
setae  %sil
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0xff,%rbx
jne    1140 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
cmp    $0x100,%r15
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %6
%4 = phi i64 [ 0, %2 ], [ %8, %6 ]
br label %10
5: ; preds = %6
ret i32 0
6: ; preds = %10
%7 = tail call i32 @putchar(i32 10)
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 256
br i1 %9, label %5, label %3
10: ; preds = %3, %10
%11 = phi i64 [ 0, %3 ], [ %15, %10 ]
%12 = icmp uge i64 %4, %11
%13 = zext i1 %12 to i32
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = add nuw nsw i64 %11, 1
%16 = icmp eq i64 %15, 255
br i1 %16, label %6, label %10
}