int romanAllowedSymbolRepeat(int value) {
  int repeatCountAllowed = 0;
  switch (value) {
  case 1:
  case 10:
  case 100:
  case 1000:
    repeatCountAllowed = 3;
    break;
  case 5:
  case 50:
  case 500:
    repeatCountAllowed = 1;
    break;
  default:
    repeatCountAllowed = 0;
  }
  return repeatCountAllowed;
}


x86 assembly (clang, -O0):
<romanAllowedSymbolRepeat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     118c <romanAllowedSymbolRepeat+0x8c>
jmp    1122 <romanAllowedSymbolRepeat+0x22>
mov    -0xc(%rbp),%eax
sub    $0x5,%eax
je     1198 <romanAllowedSymbolRepeat+0x98>
jmp    1133 <romanAllowedSymbolRepeat+0x33>
mov    -0xc(%rbp),%eax
sub    $0xa,%eax
je     118c <romanAllowedSymbolRepeat+0x8c>
jmp    1144 <romanAllowedSymbolRepeat+0x44>
mov    -0xc(%rbp),%eax
sub    $0x32,%eax
je     1198 <romanAllowedSymbolRepeat+0x98>
jmp    1155 <romanAllowedSymbolRepeat+0x55>
mov    -0xc(%rbp),%eax
sub    $0x64,%eax
je     118c <romanAllowedSymbolRepeat+0x8c>
jmp    1166 <romanAllowedSymbolRepeat+0x66>
mov    -0xc(%rbp),%eax
sub    $0x1f4,%eax
je     1198 <romanAllowedSymbolRepeat+0x98>
jmp    1179 <romanAllowedSymbolRepeat+0x79>
mov    -0xc(%rbp),%eax
sub    $0x3e8,%eax
jne    11a4 <romanAllowedSymbolRepeat+0xa4>
jmp    118c <romanAllowedSymbolRepeat+0x8c>
movl   $0x3,-0x8(%rbp)
jmp    11ab <romanAllowedSymbolRepeat+0xab>
movl   $0x1,-0x8(%rbp)
jmp    11ab <romanAllowedSymbolRepeat+0xab>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<romanAllowedSymbolRepeat>:
mov    $0x3,%eax
cmp    $0x31,%edi
jle    111d <romanAllowedSymbolRepeat+0x1d>
cmp    $0x1f3,%edi
jg     112e <romanAllowedSymbolRepeat+0x2e>
cmp    $0x32,%edi
je     113e <romanAllowedSymbolRepeat+0x3e>
cmp    $0x64,%edi
jne    1144 <romanAllowedSymbolRepeat+0x44>
ret
cmp    $0x1,%edi
je     111c <romanAllowedSymbolRepeat+0x1c>
cmp    $0x5,%edi
je     113e <romanAllowedSymbolRepeat+0x3e>
cmp    $0xa,%edi
je     111c <romanAllowedSymbolRepeat+0x1c>
jmp    1144 <romanAllowedSymbolRepeat+0x44>
cmp    $0x3e8,%edi
je     111c <romanAllowedSymbolRepeat+0x1c>
cmp    $0x1f4,%edi
jne    1144 <romanAllowedSymbolRepeat+0x44>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @romanAllowedSymbolRepeat(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %7 [
i32 1, label %5
i32 10, label %5
i32 100, label %5
i32 1000, label %5
i32 5, label %6
i32 50, label %6
i32 500, label %6
]
5: ; preds = %1, %1, %1, %1
store i32 3, i32* %3
br label %8
6: ; preds = %1, %1, %1
store i32 1, i32* %3
br label %8
7: ; preds = %1
store i32 0, i32* %3
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @romanAllowedSymbolRepeat(i32 %0) {
switch i32 %0, label %3 [
i32 1, label %4
i32 10, label %4
i32 100, label %4
i32 1000, label %4
i32 5, label %2
i32 50, label %2
i32 500, label %2
]
2: ; preds = %1, %1, %1
br label %4
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %3, %2
%5 = phi i32 [ 0, %3 ], [ 1, %2 ], [ 3, %1 ], [ 3, %1 ], [ 3, %1 ], [ 3, %1 ]
ret i32 %5
}