int main() {
  char binario[16][5] = {"0000", "0001", "0010", "0011", "0100", "0101",
                         "0110", "0111", "1000", "1001", "1010", "1011",
                         "1100", "1101", "1110", "1111"};
  char nome[10];
  printf("Insira um valor\n");
  scanf("%s", nome);
  int contador = 0;
  for (; contador < 16 && strcmp(nome, binario[contador]) != 0; contador++)
    ;
  if (contador == 16)
    printf("Base inicial invalida");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xea3(%rip),%rsi
mov    $0x50,%edx
call   1050 <memcpy@plt>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x6a(%rbp),%rsi
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
movl   $0x0,-0x70(%rbp)
xor    %eax,%eax
cmpl   $0x10,-0x70(%rbp)
mov    %al,-0x71(%rbp)
jge    11be <main+0x7e>
lea    -0x6a(%rbp),%rdi
movslq -0x70(%rbp),%rax
lea    -0x60(%rbp),%rsi
imul   $0x5,%rax,%rax
add    %rax,%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x71(%rbp)
mov    -0x71(%rbp),%al
test   $0x1,%al
jne    11ce <main+0x8e>
jmp    11e1 <main+0xa1>
jmp    11d3 <main+0x93>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    118e <main+0x4e>
cmpl   $0x10,-0x70(%rbp)
jne    11f9 <main+0xb9>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf1d(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
lea    0x6(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xe80(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xe6c(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xe58(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xe44(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xe30(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xe1c(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xe08(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xdf4(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xde0(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xdcc(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xdbc(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xdac(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xd9c(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xd8c(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xd7c(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12eb <main+0x1ab>
lea    0xd6f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.binario = [16 x [5 x i8]] [[5 x i8] c"0000\00", [5 x i8] c"0001\00", [5 x i8] c"0010\00", [5 x i8] c"0011\00", [5 x i8] c"0100\00", [5 x i8] c"0101\00", [5 x i8] c"0110\00", [5 x i8] c"0111\00", [5 x i8] c"1000\00", [5 x i8] c"1001\00", [5 x i8] c"1010\00", [5 x i8] c"1011\00", [5 x i8] c"1100\00", [5 x i8] c"1101\00", [5 x i8] c"1110\00", [5 x i8] c"1111\00"]
@.str = [17 x i8] c"Insira um valor\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [22 x i8] c"Base inicial invalida\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x [5 x i8]]
%3 = alloca [10 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [16 x [5 x i8]]* %2 to i8*
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
store i32 0, i32* %4
br label %9
9: ; preds = %23, %0
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 16
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [16 x [5 x i8]], [16 x [5 x i8]]* %2, i64 0, i64 %15
%17 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 0
%18 = call i32 @strcmp(i8* %13, i8* %17)
%19 = icmp ne i32 %18, 0
br label %20
20: ; preds = %12, %9
%21 = phi i1 [ false, %9 ], [ %19, %12 ]
br i1 %21, label %22, label %26
22: ; preds = %20
br label %23
23: ; preds = %22
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %9
26: ; preds = %20
%27 = load i32, i32* %4
%28 = icmp eq i32 %27, 16
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
%32 = load i32, i32* %1
ret i32 %32
}

LLVM IR (-O2):
@__const.main.binario = [16 x [5 x i8]] [[5 x i8] c"0000\00", [5 x i8] c"0001\00", [5 x i8] c"0010\00", [5 x i8] c"0011\00", [5 x i8] c"0100\00", [5 x i8] c"0101\00", [5 x i8] c"0110\00", [5 x i8] c"0111\00", [5 x i8] c"1000\00", [5 x i8] c"1001\00", [5 x i8] c"1010\00", [5 x i8] c"1011\00", [5 x i8] c"1100\00", [5 x i8] c"1101\00", [5 x i8] c"1110\00", [5 x i8] c"1111\00"]
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [22 x i8] c"Base inicial invalida\00"
@str = [16 x i8] c"Insira um valor\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %54, label %7
7: ; preds = %0
%8 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 1, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %54, label %10
10: ; preds = %7
%11 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 2, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %54, label %13
13: ; preds = %10
%14 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 3, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %54, label %16
16: ; preds = %13
%17 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 4, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %54, label %19
19: ; preds = %16
%20 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 5, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %54, label %22
22: ; preds = %19
%23 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 6, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %54, label %25
25: ; preds = %22
%26 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 7, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %54, label %28
28: ; preds = %25
%29 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 8, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %54, label %31
31: ; preds = %28
%32 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 9, i64 0))
%33 = icmp eq i32 %32, 0
br i1 %33, label %54, label %34
34: ; preds = %31
%35 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 10, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %54, label %37
37: ; preds = %34
%38 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 11, i64 0))
%39 = icmp eq i32 %38, 0
br i1 %39, label %54, label %40
40: ; preds = %37
%41 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 12, i64 0))
%42 = icmp eq i32 %41, 0
br i1 %42, label %54, label %43
43: ; preds = %40
%44 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 13, i64 0))
%45 = icmp eq i32 %44, 0
br i1 %45, label %54, label %46
46: ; preds = %43
%47 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 14, i64 0))
%48 = icmp eq i32 %47, 0
br i1 %48, label %54, label %49
49: ; preds = %46
%50 = call i32 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x [5 x i8]], [16 x [5 x i8]]* @__const.main.binario, i64 0, i64 15, i64 0))
%51 = icmp eq i32 %50, 0
br i1 %51, label %54, label %52
52: ; preds = %49
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %54
54: ; preds = %0, %7, %10, %13, %16, %19, %22, %25, %28, %31, %34, %37, %40, %43, %46, %49, %52
ret i32 0
}