int isclef(s)
char *s;
{
  int gotclef;
  s = s;
  gotclef = 0;
  if (strncmp(s, "bass", 4) == 0) {
    gotclef = 1;
  };
  if (strncmp(s, "treble", 6) == 0) {
    gotclef = 1;
  };
  if (strncmp(s, "baritone", 8) == 0) {
    gotclef = 1;
  };
  if (strncmp(s, "tenor", 5) == 0) {
    gotclef = 1;
  };
  if (strncmp(s, "alto", 4) == 0) {
    gotclef = 1;
  };
  if (strncmp(s, "mezzo", 5) == 0) {
    gotclef = 1;
  };
  if (strncmp(s, "soprano", 7) == 0) {
    gotclef = 1;
  };
  return (gotclef);
}


x86 assembly (clang, -O0):
<isclef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1150 <isclef+0x40>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1175 <isclef+0x65>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe8c(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    119a <isclef+0x8a>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe70(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    11bf <isclef+0xaf>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe51(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    11e4 <isclef+0xd4>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe31(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1209 <isclef+0xf9>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe12(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    122e <isclef+0x11e>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isclef>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbp
lea    0xedb(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
sete   0x7(%rsp)
lea    0xec8(%rip),%rsi
mov    $0x6,%edx
mov    %rbp,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
sete   %r14b
lea    0xeb5(%rip),%rsi
mov    $0x8,%edx
mov    %rbp,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
sete   %r13b
lea    0xea4(%rip),%rsi
mov    $0x5,%edx
mov    %rbp,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
sete   %r12b
lea    0xe90(%rip),%rsi
mov    $0x4,%edx
mov    %rbp,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
sete   %bl
lea    0xe7c(%rip),%rsi
mov    $0x5,%edx
mov    %rbp,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
sete   %r15b
lea    0xe68(%rip),%rsi
mov    $0x7,%edx
mov    %rbp,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
sete   %al
or     %r15b,%al
or     %r12b,%bl
or     %al,%bl
or     %r14b,%r13b
or     0x7(%rsp),%r13b
or     %bl,%r13b
movzbl %r13b,%eax
and    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"bass\00"
@.str.1 = [7 x i8] c"treble\00"
@.str.2 = [9 x i8] c"baritone\00"
@.str.3 = [6 x i8] c"tenor\00"
@.str.4 = [5 x i8] c"alto\00"
@.str.5 = [6 x i8] c"mezzo\00"
@.str.6 = [8 x i8] c"soprano\00"
define i32 @isclef(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = call i32 @strncmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %3
br label %9
9: ; preds = %8, %1
%10 = load i8*, i8** %2
%11 = call i32 @strncmp(i8* %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 6)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %3
br label %14
14: ; preds = %13, %9
%15 = load i8*, i8** %2
%16 = call i32 @strncmp(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i64 8)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 1, i32* %3
br label %19
19: ; preds = %18, %14
%20 = load i8*, i8** %2
%21 = call i32 @strncmp(i8* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 5)
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %19
store i32 1, i32* %3
br label %24
24: ; preds = %23, %19
%25 = load i8*, i8** %2
%26 = call i32 @strncmp(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i64 4)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %24
store i32 1, i32* %3
br label %29
29: ; preds = %28, %24
%30 = load i8*, i8** %2
%31 = call i32 @strncmp(i8* %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i64 5)
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %29
store i32 1, i32* %3
br label %34
34: ; preds = %33, %29
%35 = load i8*, i8** %2
%36 = call i32 @strncmp(i8* %35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i64 7)
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %39
38: ; preds = %34
store i32 1, i32* %3
br label %39
39: ; preds = %38, %34
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
@.str = [5 x i8] c"bass\00"
@.str.1 = [7 x i8] c"treble\00"
@.str.2 = [9 x i8] c"baritone\00"
@.str.3 = [6 x i8] c"tenor\00"
@.str.4 = [5 x i8] c"alto\00"
@.str.5 = [6 x i8] c"mezzo\00"
@.str.6 = [8 x i8] c"soprano\00"
define i32 @isclef(i8* nocapture %0) {
%2 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4)
%3 = icmp eq i32 %2, 0
%4 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 6)
%5 = icmp eq i32 %4, 0
%6 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i64 8)
%7 = icmp eq i32 %6, 0
%8 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 5)
%9 = icmp eq i32 %8, 0
%10 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i64 4)
%11 = icmp eq i32 %10, 0
%12 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i64 5)
%13 = icmp eq i32 %12, 0
%14 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i64 7)
%15 = icmp eq i32 %14, 0
%16 = select i1 %15, i1 true, i1 %13
%17 = select i1 %16, i1 true, i1 %11
%18 = select i1 %17, i1 true, i1 %9
%19 = select i1 %18, i1 true, i1 %7
%20 = select i1 %19, i1 true, i1 %5
%21 = select i1 %20, i1 true, i1 %3
%22 = zext i1 %21 to i32
ret i32 %22
}