#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 /*<<< orphan*/ headsize;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(int argc, char *argv[]) {
  char size[3][12] = {
      {'6', '6', '6', '6', '7', '7', '7', '7', '7', '7', '7', '7'},
      {'1', '5', '3', '7', ' ', '1', '1', '3', '1', '5', '3', '7'},
      {'2', '8', '4', '8', ' ', '8', '4', '8', '2', '8', '4', '8'},
  };
  int headsize[12] = {164, 166, 169, 172, 175, 178,
                      181, 184, 188, 191, 194, 197};
  char *psize = *size;
  int *pheadsize = headsize;
  float cranium = 0.0f;
  int your_head = 0;
  bool hat_found = false;
  printf("\nEnter the circumference of your head above the eyebows"
         " in inches as a decimal value: \n");
  scanf("%f", &cranium);
  your_head = (int)(0.8f * cranium);
  unsigned int i = 0;
  if (your_head == *pheadsize) {
    hat_found = true;
  } else {
    for (i = 1; i < sizeof(headsize) / sizeof(*headsize); ++i) {
      if (your_head > *(pheadsize + i - 1) && your_head <= *(pheadsize + i)) {
        hat_found = true;
        break;
      }
    }
  }
  if (hat_found) {
    printf("\nYour hat size is %c %c%c%c\n", *(psize + i),
           *(psize + 1 * sizeof(*size) / sizeof(**size) + i),
           (*(psize + 1 * sizeof(*size) / sizeof(**size) + i)) == ' ' ? ' '
                                                                      : '/',
           (*(psize + 2 * sizeof(*size) / sizeof(**size) + i)));
  } else {
    if (your_head < *pheadsize) {
      printf("\nToo small, not found...!\n");
    } else {
      printf("\nToo bigger, not found...!\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xebc(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
lea    0xed7(%rip),%rsi
mov    $0x30,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x70(%rbp),%rax
mov    %rax,-0x80(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x8c(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf11(%rip),%rdi
lea    -0x84(%rbp),%rsi
call   1050 <scanf@plt>
movss  0xe35(%rip),%xmm0
mulss  -0x84(%rbp),%xmm0
ff
cvttss2si %xmm0,%eax
mov    %eax,-0x88(%rbp)
movl   $0x0,-0x90(%rbp)
mov    -0x88(%rbp),%eax
mov    -0x80(%rbp),%rcx
cmp    (%rcx),%eax
jne    1208 <main+0xd8>
movl   $0x1,-0x8c(%rbp)
jmp    1282 <main+0x152>
movl   $0x1,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    $0xc,%rax
jae    127d <main+0x14d>
mov    -0x88(%rbp),%eax
mov    -0x80(%rbp),%rcx
mov    -0x90(%rbp),%edx
cmp    -0x4(%rcx,%rdx,4),%eax
jle    1264 <main+0x134>
mov    -0x88(%rbp),%eax
mov    -0x80(%rbp),%rcx
mov    -0x90(%rbp),%edx
cmp    (%rcx,%rdx,4),%eax
jg     1264 <main+0x134>
movl   $0x1,-0x8c(%rbp)
jmp    127d <main+0x14d>
jmp    1269 <main+0x139>
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    1212 <main+0xe2>
jmp    1282 <main+0x152>
cmpl   $0x0,-0x8c(%rbp)
je     12ee <main+0x1be>
mov    -0x78(%rbp),%rax
mov    -0x90(%rbp),%ecx
movsbl (%rax,%rcx,1),%esi
mov    -0x78(%rbp),%rax
mov    -0x90(%rbp),%ecx
movsbl 0xc(%rax,%rcx,1),%edx
mov    -0x78(%rbp),%rax
mov    -0x90(%rbp),%ecx
movsbl 0xc(%rax,%rcx,1),%edi
mov    $0x2f,%ecx
mov    $0x20,%eax
cmp    $0x20,%edi
cmove  %eax,%ecx
mov    -0x78(%rbp),%rax
mov    -0x90(%rbp),%edi
movsbl 0x18(%rax,%rdi,1),%r8d
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1326 <main+0x1f6>
mov    -0x88(%rbp),%eax
mov    -0x80(%rbp),%rcx
cmp    (%rcx),%eax
jge    1313 <main+0x1e3>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1321 <main+0x1f1>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1326 <main+0x1f6>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
mulss  0xe9c(%rip),%xmm0
cvttss2si %xmm0,%eax
cmp    $0xa4,%eax
jne    11a5 <main+0x75>
xor    %edi,%edi
lea    0xe98(%rip),%rax
movsbl (%rdi,%rax,1),%esi
movsbl 0xc(%rdi,%rax,1),%edx
cmp    $0x20,%edx
mov    $0x2f,%ecx
cmove  %edx,%ecx
movsbl 0x18(%rdi,%rax,1),%r8d
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    125c <main+0x12c>
jle    1250 <main+0x120>
mov    $0x1,%edi
cmp    $0xa7,%eax
jb     1171 <main+0x41>
mov    $0x2,%edi
cmp    $0xaa,%eax
jb     1171 <main+0x41>
mov    $0x3,%edi
cmp    $0xad,%eax
jb     1171 <main+0x41>
mov    $0x4,%edi
cmp    $0xb0,%eax
jb     1171 <main+0x41>
mov    $0x5,%edi
cmp    $0xb3,%eax
jb     1171 <main+0x41>
mov    $0x6,%edi
cmp    $0xb6,%eax
jb     1171 <main+0x41>
mov    $0x7,%edi
cmp    $0xb9,%eax
jb     1171 <main+0x41>
mov    $0x8,%edi
cmp    $0xbd,%eax
jb     1171 <main+0x41>
mov    $0x9,%edi
cmp    $0xc0,%eax
jb     1171 <main+0x41>
mov    $0xa,%edi
cmp    $0xc3,%eax
jb     1171 <main+0x41>
mov    $0xb,%edi
cmp    $0xc5,%eax
jbe    1171 <main+0x41>
lea    0xe5d(%rip),%rdi
jmp    1257 <main+0x127>
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.size = [3 x [12 x i8]] [[12 x i8] c"666677777777", [12 x i8] c"1537 1131537", [12 x i8] c"2848 8482848"]
@__const.main.headsize = [12 x i32] [i32 164, i32 166, i32 169, i32 172, i32 175, i32 178, i32 181, i32 184, i32 188, i32 191, i32 194, i32 197]
@.str = [88 x i8] c"\0AEnter the circumference of your head above the eyebows in inches as a decimal value: \0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [29 x i8] c"\0AYour hat size is %c %c%c%c\0A\00"
@.str.3 = [27 x i8] c"\0AToo small, not found...!\0A\00"
@.str.4 = [28 x i8] c"\0AToo bigger, not found...!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x [12 x i8]]
%7 = alloca [12 x i32]
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca float
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = bitcast [3 x [12 x i8]]* %6 to i8*
%15 = bitcast [12 x i32]* %7 to i8*
%16 = getelementptr inbounds [3 x [12 x i8]], [3 x [12 x i8]]* %6, i64 0, i64 0
%17 = getelementptr inbounds [12 x i8], [12 x i8]* %16, i64 0, i64 0
store i8* %17, i8** %8
%18 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 0
store i32* %18, i32** %9
store float 0.000000e+00, float* %10
store i32 0, i32* %11
store i32 0, i32* %12
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %10)
%21 = load float, float* %10
%22 = fmul float 0x3FE99999A0000000, %21
%23 = fptosi float %22 to i32
store i32 %23, i32* %11
store i32 0, i32* %13
%24 = load i32, i32* %11
%25 = load i32*, i32** %9
%26 = load i32, i32* %25
%27 = icmp eq i32 %24, %26
br i1 %27, label %28, label %29
28: ; preds = %2
store i32 1, i32* %12
br label %57
29: ; preds = %2
store i32 1, i32* %13
br label %30
30: ; preds = %53, %29
%31 = load i32, i32* %13
%32 = zext i32 %31 to i64
%33 = icmp ult i64 %32, 12
br i1 %33, label %34, label %56
34: ; preds = %30
%35 = load i32, i32* %11
%36 = load i32*, i32** %9
%37 = load i32, i32* %13
%38 = zext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %36, i64 %38
%40 = getelementptr inbounds i32, i32* %39, i64 -1
%41 = load i32, i32* %40
%42 = icmp sgt i32 %35, %41
br i1 %42, label %43, label %52
43: ; preds = %34
%44 = load i32, i32* %11
%45 = load i32*, i32** %9
%46 = load i32, i32* %13
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds i32, i32* %45, i64 %47
%49 = load i32, i32* %48
%50 = icmp sle i32 %44, %49
br i1 %50, label %51, label %52
51: ; preds = %43
store i32 1, i32* %12
br label %56
52: ; preds = %43, %34
br label %53
53: ; preds = %52
%54 = load i32, i32* %13
%55 = add i32 %54, 1
store i32 %55, i32* %13
br label %30
56: ; preds = %51, %30
br label %57
57: ; preds = %56, %28
%58 = load i32, i32* %12
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %92
60: ; preds = %57
%61 = load i8*, i8** %8
%62 = load i32, i32* %13
%63 = zext i32 %62 to i64
%64 = getelementptr inbounds i8, i8* %61, i64 %63
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = load i8*, i8** %8
%68 = getelementptr inbounds i8, i8* %67, i64 12
%69 = load i32, i32* %13
%70 = zext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %68, i64 %70
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = load i8*, i8** %8
%75 = getelementptr inbounds i8, i8* %74, i64 12
%76 = load i32, i32* %13
%77 = zext i32 %76 to i64
%78 = getelementptr inbounds i8, i8* %75, i64 %77
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp eq i32 %80, 32
%82 = zext i1 %81 to i64
%83 = select i1 %81, i32 32, i32 47
%84 = load i8*, i8** %8
%85 = getelementptr inbounds i8, i8* %84, i64 24
%86 = load i32, i32* %13
%87 = zext i32 %86 to i64
%88 = getelementptr inbounds i8, i8* %85, i64 %87
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %66, i32 %73, i32 %83, i32 %90)
br label %102
92: ; preds = %57
%93 = load i32, i32* %11
%94 = load i32*, i32** %9
%95 = load i32, i32* %94
%96 = icmp slt i32 %93, %95
br i1 %96, label %97, label %99
97: ; preds = %92
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %101
99: ; preds = %92
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %101
101: ; preds = %99, %97
br label %102
102: ; preds = %101, %60
ret i32 0
}

LLVM IR (-O2):
@__const.main.size = [3 x [12 x i8]] [[12 x i8] c"666677777777", [12 x i8] c"1537 1131537", [12 x i8] c"2848 8482848"]
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [29 x i8] c"\0AYour hat size is %c %c%c%c\0A\00"
@str = [87 x i8] c"\0AEnter the circumference of your head above the eyebows in inches as a decimal value: \00"
@str.5 = [27 x i8] c"\0AToo bigger, not found...!\00"
@str.6 = [26 x i8] c"\0AToo small, not found...!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%7 = load float, float* %3
%8 = fmul float %7, 0x3FE99999A0000000
%9 = fptosi float %8 to i32
%10 = icmp eq i32 %9, 164
br i1 %10, label %35, label %11
11: ; preds = %2
%12 = icmp sgt i32 %9, 164
br i1 %12, label %13, label %49
13: ; preds = %11
%14 = icmp ugt i32 %9, 166
br i1 %14, label %15, label %35
15: ; preds = %13
%16 = icmp ugt i32 %9, 169
br i1 %16, label %17, label %35
17: ; preds = %15
%18 = icmp ugt i32 %9, 172
br i1 %18, label %19, label %35
19: ; preds = %17
%20 = icmp ugt i32 %9, 175
br i1 %20, label %21, label %35
21: ; preds = %19
%22 = icmp ugt i32 %9, 178
br i1 %22, label %23, label %35
23: ; preds = %21
%24 = icmp ugt i32 %9, 181
br i1 %24, label %25, label %35
25: ; preds = %23
%26 = icmp ugt i32 %9, 184
br i1 %26, label %27, label %35
27: ; preds = %25
%28 = icmp ugt i32 %9, 188
br i1 %28, label %29, label %35
29: ; preds = %27
%30 = icmp ugt i32 %9, 191
br i1 %30, label %31, label %35
31: ; preds = %29
%32 = icmp ugt i32 %9, 194
br i1 %32, label %33, label %35
33: ; preds = %31
%34 = icmp ugt i32 %9, 197
br i1 %34, label %51, label %35
35: ; preds = %13, %15, %17, %19, %21, %23, %25, %27, %29, %31, %33, %2
%36 = phi i64 [ 0, %2 ], [ 1, %13 ], [ 2, %15 ], [ 3, %17 ], [ 4, %19 ], [ 5, %21 ], [ 6, %23 ], [ 7, %25 ], [ 8, %27 ], [ 9, %29 ], [ 10, %31 ], [ 11, %33 ]
%37 = getelementptr inbounds [3 x [12 x i8]], [3 x [12 x i8]]* @__const.main.size, i64 0, i64 0, i64 %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = getelementptr inbounds [3 x [12 x i8]], [3 x [12 x i8]]* @__const.main.size, i64 0, i64 1, i64 %36
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i8 %41, 32
%44 = select i1 %43, i32 32, i32 47
%45 = getelementptr inbounds [3 x [12 x i8]], [3 x [12 x i8]]* @__const.main.size, i64 0, i64 2, i64 %36
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %39, i32 %42, i32 %44, i32 %47)
br label %53
49: ; preds = %11
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.6, i64 0, i64 0))
br label %53
51: ; preds = %33
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.5, i64 0, i64 0))
br label %53
53: ; preds = %49, %51, %35
ret i32 0
}