#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 int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  uint8_t t, j;
  for (j = 0; j < 255; j++) {
    printf("t %% %u: ", j);
    for (t = 0; t < 255; t++) {
      if ((t & j))
        printf("-");
      else
        printf("_");
    }
    printf("\n\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xff,-0xc(%rbp)
jge    11b7 <main+0xa7>
mov    -0xc(%rbp),%esi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    119b <main+0x8b>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     117a <main+0x6a>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1188 <main+0x78>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118d <main+0x7d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <main+0x3b>
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
lea    0xec1(%rip),%r14
mov    $0x5f,%r12d
lea    0xebe(%rip),%r15
xor    %ebp,%ebp
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %ebx,%ebx
xchg   %ax,%ax
test   %ebp,%ebx
mov    $0x2d,%edi
cmove  %r12d,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0xff,%ebx
jne    1160 <main+0x30>
mov    %r15,%rdi
call   1040 <puts@plt>
add    $0x1,%ebp
cmp    $0xff,%ebp
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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