#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 */
scalar_t__ strncmp(char *, char const *, int);
int is_basic_type(const char *buffer) {
  if ((0 != strncmp("_Bool", buffer, 5)) && (0 != strncmp("char", buffer, 4)) &&
      (0 != strncmp("int", buffer, 3)) && (0 != strncmp("float", buffer, 5)) &&
      (0 != strncmp("double", buffer, 6)) &&
      (0 != strncmp("long", buffer, 4)) && (0 != strncmp("void", buffer, 4))) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_basic_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     121d <is_basic_type+0x10d>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
mov    $0x4,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     121d <is_basic_type+0x10d>
mov    -0x10(%rbp),%rsi
lea    0xe9e(%rip),%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     121d <is_basic_type+0x10d>
mov    -0x10(%rbp),%rsi
lea    0xe7f(%rip),%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     121d <is_basic_type+0x10d>
mov    -0x10(%rbp),%rsi
lea    0xe62(%rip),%rdi
mov    $0x6,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     121d <is_basic_type+0x10d>
mov    -0x10(%rbp),%rsi
lea    0xe46(%rip),%rdi
mov    $0x4,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     121d <is_basic_type+0x10d>
mov    -0x10(%rbp),%rsi
lea    0xe28(%rip),%rdi
mov    $0x4,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     121d <is_basic_type+0x10d>
movl   $0x0,-0x4(%rbp)
jmp    1224 <is_basic_type+0x114>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_basic_type>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11d0 <is_basic_type+0xc0>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11d0 <is_basic_type+0xc0>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11d0 <is_basic_type+0xc0>
lea    0xea1(%rip),%rdi
mov    %rbx,%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11d0 <is_basic_type+0xc0>
lea    0xe8e(%rip),%rdi
mov    %rbx,%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11d0 <is_basic_type+0xc0>
lea    0xe7c(%rip),%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11d0 <is_basic_type+0xc0>
lea    0xe68(%rip),%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    11d5 <is_basic_type+0xc5>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"_Bool\00"
@.str.1 = [5 x i8] c"char\00"
@.str.2 = [4 x i8] c"int\00"
@.str.3 = [6 x i8] c"float\00"
@.str.4 = [7 x i8] c"double\00"
@.str.5 = [5 x i8] c"long\00"
@.str.6 = [5 x i8] c"void\00"
define i32 @is_basic_type(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i32 5)
%6 = icmp ne i64 0, %5
br i1 %6, label %7, label %32
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i64 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %8, i32 4)
%10 = icmp ne i64 0, %9
br i1 %10, label %11, label %32
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %12, i32 3)
%14 = icmp ne i64 0, %13
br i1 %14, label %15, label %32
15: ; preds = %11
%16 = load i8*, i8** %3
%17 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %16, i32 5)
%18 = icmp ne i64 0, %17
br i1 %18, label %19, label %32
19: ; preds = %15
%20 = load i8*, i8** %3
%21 = call i64 @strncmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %20, i32 6)
%22 = icmp ne i64 0, %21
br i1 %22, label %23, label %32
23: ; preds = %19
%24 = load i8*, i8** %3
%25 = call i64 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %24, i32 4)
%26 = icmp ne i64 0, %25
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = load i8*, i8** %3
%29 = call i64 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %28, i32 4)
%30 = icmp ne i64 0, %29
br i1 %30, label %31, label %32
31: ; preds = %27
store i32 0, i32* %2
br label %33
32: ; preds = %27, %23, %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %33
33: ; preds = %32, %31
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
@.str = [6 x i8] c"_Bool\00"
@.str.1 = [5 x i8] c"char\00"
@.str.2 = [4 x i8] c"int\00"
@.str.3 = [6 x i8] c"float\00"
@.str.4 = [7 x i8] c"double\00"
@.str.5 = [5 x i8] c"long\00"
@.str.6 = [5 x i8] c"void\00"
define i32 @is_basic_type(i8* %0) {
%2 = tail call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i32 5)
%3 = icmp eq i64 %2, 0
br i1 %3, label %22, label %4
4: ; preds = %1
%5 = tail call i64 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %22, label %7
7: ; preds = %4
%8 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 3)
%9 = icmp eq i64 %8, 0
br i1 %9, label %22, label %10
10: ; preds = %7
%11 = tail call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %0, i32 5)
%12 = icmp eq i64 %11, 0
br i1 %12, label %22, label %13
13: ; preds = %10
%14 = tail call i64 @strncmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %0, i32 6)
%15 = icmp eq i64 %14, 0
br i1 %15, label %22, label %16
16: ; preds = %13
%17 = tail call i64 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %0, i32 4)
%18 = icmp eq i64 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = tail call i64 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %0, i32 4)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %19, %16, %13, %10, %7, %4, %1
br label %23
23: ; preds = %19, %22
%24 = phi i32 [ 1, %22 ], [ 0, %19 ]
ret i32 %24
}