#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);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strerror(int);
scalar_t__ strlen(int /*<<< orphan*/);
int main() {
  printf("const char* error_numbers[%d] = {", 100 + 1);
  for (int i = 0; i <= 100; i++) {
    if (i != 0) {
      putchar(',');
    }
    printf("\n\t\"%d\"", strlen(strerror(i)) > 0);
  }
  puts("\n};");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
mov    $0x65,%esi
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     11ca <main+0x7a>
cmpl   $0x0,-0x8(%rbp)
je     1195 <main+0x45>
mov    $0x2c,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%edi
call   1070 <strerror@plt>
mov    %eax,%edi
call   1050 <strlen@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6b(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1177 <main+0x27>
lea    0xe58(%rip),%rdi
call   1040 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xea6(%rip),%rdi
mov    $0x65,%esi
call   1060 <printf@plt>
xor    %edi,%edi
call   1070 <strerror@plt>
mov    %eax,%edi
call   1050 <strlen@plt>
xor    %esi,%esi
test   %rax,%rax
setg   %sil
lea    0xea0(%rip),%rbx
mov    %rbx,%rdi
call   1060 <printf@plt>
mov    $0x1,%ebp
nop
mov    $0x2c,%edi
call   1030 <putchar@plt>
mov    %ebp,%edi
call   1070 <strerror@plt>
mov    %eax,%edi
call   1050 <strlen@plt>
xor    %esi,%esi
test   %rax,%rax
setg   %sil
mov    %rbx,%rdi
call   1060 <printf@plt>
add    $0x1,%ebp
cmp    $0x65,%ebp
jne    1190 <main+0x40>
lea    0xe61(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"const char* error_numbers[%d] = {\00"
@.str.1 = [7 x i8] c"\0A\09\22%d\22\00"
@.str.2 = [4 x i8] c"\0A};\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 101)
store i32 0, i32* %2
br label %4
4: ; preds = %19, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 100
br i1 %6, label %7, label %22
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @putchar(i8 signext 44)
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
%14 = call i32 @strerror(i32 %13)
%15 = call i64 @strlen(i32 %14)
%16 = icmp sgt i64 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %4
22: ; preds = %4
%23 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [34 x i8] c"const char* error_numbers[%d] = {\00"
@.str.1 = [7 x i8] c"\0A\09\22%d\22\00"
@.str.2 = [4 x i8] c"\0A};\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 101)
%2 = tail call i32 @strerror(i32 0)
%3 = tail call i64 @strlen(i32 %2)
%4 = icmp sgt i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %9
7: ; preds = %9
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
9: ; preds = %0, %9
%10 = phi i32 [ 1, %0 ], [ %17, %9 ]
%11 = tail call i32 @putchar(i8 signext 44)
%12 = tail call i32 @strerror(i32 %10)
%13 = tail call i64 @strlen(i32 %12)
%14 = icmp sgt i64 %13, 0
%15 = zext i1 %14 to i32
%16 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = add nuw nsw i32 %10, 1
%18 = icmp eq i32 %17, 101
br i1 %18, label %7, label %9
}