#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 */
int /*<<< orphan*/ strcmp(char const *, char *);
const char *gen_cname_native(const char *src) {
  const char *cname = NULL;
  if (!strcmp(src, "xs:boolean")) {
    cname = "int";
  } else if (!strcmp(src, "xs:hexBinary")) {
    cname = "unsigned char";
  } else if (!strcmp(src, "xs:float")) {
    cname = "float";
  } else if (!strcmp(src, "xs:byte")) {
    cname = "char";
  } else if (!strcmp(src, "xs:short")) {
    cname = "short";
  } else if (!strcmp(src, "xs:string")) {
    cname = "char*";
  } else if (!strcmp(src, "xs:int")) {
    cname = "int";
  } else if (!strcmp(src, "xs:unsignedByte")) {
    cname = "unsigned char";
  } else if (!strcmp(src, "xs:unsignedShort")) {
    cname = "unsigned short";
  } else if (!strcmp(src, "xs:unsignedInt")) {
    cname = "unsigned int";
  }
  return cname;
}


x86 assembly (clang, -O0):
<gen_cname_native>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    114d <gen_cname_native+0x3d>
lea    0xf5b(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12e6 <gen_cname_native+0x1d6>
mov    -0x8(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1176 <gen_cname_native+0x66>
lea    0xeab(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12e1 <gen_cname_native+0x1d1>
mov    -0x8(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    119f <gen_cname_native+0x8f>
lea    0xe93(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12dc <gen_cname_native+0x1cc>
mov    -0x8(%rbp),%rdi
lea    0xe85(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11c8 <gen_cname_native+0xb8>
lea    0xe62(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12d7 <gen_cname_native+0x1c7>
mov    -0x8(%rbp),%rdi
lea    0xe64(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11f1 <gen_cname_native+0xe1>
lea    0xe99(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12d2 <gen_cname_native+0x1c2>
mov    -0x8(%rbp),%rdi
lea    0xe44(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    121a <gen_cname_native+0x10a>
lea    0xe39(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12cd <gen_cname_native+0x1bd>
mov    -0x8(%rbp),%rdi
lea    0xe2b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1243 <gen_cname_native+0x133>
lea    0xe65(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12c8 <gen_cname_native+0x1b8>
mov    -0x8(%rbp),%rdi
lea    0xe09(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    126c <gen_cname_native+0x15c>
lea    0xdb5(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12c3 <gen_cname_native+0x1b3>
mov    -0x8(%rbp),%rdi
lea    0xdf0(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1295 <gen_cname_native+0x185>
lea    0xdec(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <gen_cname_native+0x1ae>
mov    -0x8(%rbp),%rdi
lea    0xde7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12b9 <gen_cname_native+0x1a9>
lea    0xde1(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <gen_cname_native+0x1ae>
jmp    12c3 <gen_cname_native+0x1b3>
jmp    12c8 <gen_cname_native+0x1b8>
jmp    12cd <gen_cname_native+0x1bd>
jmp    12d2 <gen_cname_native+0x1c2>
jmp    12d7 <gen_cname_native+0x1c7>
jmp    12dc <gen_cname_native+0x1cc>
jmp    12e1 <gen_cname_native+0x1d1>
jmp    12e6 <gen_cname_native+0x1d6>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_cname_native>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xee1(%rip),%rsi
call   1030 <strcmp@plt>
lea    0xf74(%rip),%r14
test   %eax,%eax
je     1236 <gen_cname_native+0x126>
lea    0xed1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
lea    0xecf(%rip),%r15
test   %eax,%eax
je     1206 <gen_cname_native+0xf6>
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     120b <gen_cname_native+0xfb>
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1214 <gen_cname_native+0x104>
lea    0xeb1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     121d <gen_cname_native+0x10d>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1226 <gen_cname_native+0x116>
lea    0xea0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1236 <gen_cname_native+0x126>
lea    0xe94(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %r15,%r14
test   %eax,%eax
je     1236 <gen_cname_native+0x126>
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122f <gen_cname_native+0x11f>
lea    0xe9b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %r14d,%r14d
test   %eax,%eax
lea    0xe96(%rip),%rax
cmove  %rax,%r14
jmp    1236 <gen_cname_native+0x126>
mov    %r15,%r14
jmp    1236 <gen_cname_native+0x126>
lea    0xe17(%rip),%r14
jmp    1236 <gen_cname_native+0x126>
lea    0xe06(%rip),%r14
jmp    1236 <gen_cname_native+0x126>
lea    0xe5d(%rip),%r14
jmp    1236 <gen_cname_native+0x126>
lea    0xe1d(%rip),%r14
jmp    1236 <gen_cname_native+0x126>
lea    0xe42(%rip),%r14
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"xs:boolean\00"
@.str.1 = [4 x i8] c"int\00"
@.str.2 = [13 x i8] c"xs:hexBinary\00"
@.str.3 = [14 x i8] c"unsigned char\00"
@.str.4 = [9 x i8] c"xs:float\00"
@.str.5 = [6 x i8] c"float\00"
@.str.6 = [8 x i8] c"xs:byte\00"
@.str.7 = [5 x i8] c"char\00"
@.str.8 = [9 x i8] c"xs:short\00"
@.str.9 = [6 x i8] c"short\00"
@.str.10 = [10 x i8] c"xs:string\00"
@.str.11 = [6 x i8] c"char*\00"
@.str.12 = [7 x i8] c"xs:int\00"
@.str.13 = [16 x i8] c"xs:unsignedByte\00"
@.str.14 = [17 x i8] c"xs:unsignedShort\00"
@.str.15 = [15 x i8] c"unsigned short\00"
@.str.16 = [15 x i8] c"xs:unsignedInt\00"
@.str.17 = [13 x i8] c"unsigned int\00"
define i8* @gen_cname_native(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = call i32 @strcmp(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %62
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @strcmp(i8* %9, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %61
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %13
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %60
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = call i32 @strcmp(i8* %19, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%21 = icmp ne i32 %20, 0
br i1 %21, label %23, label %22
22: ; preds = %18
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %59
23: ; preds = %18
%24 = load i8*, i8** %2
%25 = call i32 @strcmp(i8* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%26 = icmp ne i32 %25, 0
br i1 %26, label %28, label %27
27: ; preds = %23
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %58
28: ; preds = %23
%29 = load i8*, i8** %2
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %33, label %32
32: ; preds = %28
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %57
33: ; preds = %28
%34 = load i8*, i8** %2
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %38, label %37
37: ; preds = %33
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %56
38: ; preds = %33
%39 = load i8*, i8** %2
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %43, label %42
42: ; preds = %38
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %55
43: ; preds = %38
%44 = load i8*, i8** %2
%45 = call i32 @strcmp(i8* %44, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
%46 = icmp ne i32 %45, 0
br i1 %46, label %48, label %47
47: ; preds = %43
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i8** %3
br label %54
48: ; preds = %43
%49 = load i8*, i8** %2
%50 = call i32 @strcmp(i8* %49, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0))
%51 = icmp ne i32 %50, 0
br i1 %51, label %53, label %52
52: ; preds = %48
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %53
53: ; preds = %52, %48
br label %54
54: ; preds = %53, %47
br label %55
55: ; preds = %54, %42
br label %56
56: ; preds = %55, %37
br label %57
57: ; preds = %56, %32
br label %58
58: ; preds = %57, %27
br label %59
59: ; preds = %58, %22
br label %60
60: ; preds = %59, %17
br label %61
61: ; preds = %60, %12
br label %62
62: ; preds = %61, %7
%63 = load i8*, i8** %3
ret i8* %63
}

LLVM IR (-O2):
@.str = [11 x i8] c"xs:boolean\00"
@.str.1 = [4 x i8] c"int\00"
@.str.2 = [13 x i8] c"xs:hexBinary\00"
@.str.3 = [14 x i8] c"unsigned char\00"
@.str.4 = [9 x i8] c"xs:float\00"
@.str.5 = [6 x i8] c"float\00"
@.str.6 = [8 x i8] c"xs:byte\00"
@.str.7 = [5 x i8] c"char\00"
@.str.8 = [9 x i8] c"xs:short\00"
@.str.9 = [6 x i8] c"short\00"
@.str.10 = [10 x i8] c"xs:string\00"
@.str.11 = [6 x i8] c"char*\00"
@.str.12 = [7 x i8] c"xs:int\00"
@.str.13 = [16 x i8] c"xs:unsignedByte\00"
@.str.14 = [17 x i8] c"xs:unsignedShort\00"
@.str.15 = [15 x i8] c"unsigned short\00"
@.str.16 = [15 x i8] c"xs:unsignedInt\00"
@.str.17 = [13 x i8] c"unsigned int\00"
define i8* @gen_cname_native(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %32, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %32, label %7
7: ; preds = %4
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %32, label %10
10: ; preds = %7
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %10
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %32, label %16
16: ; preds = %13
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %32, label %19
19: ; preds = %16
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %32, label %22
22: ; preds = %19
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(16) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %32, label %25
25: ; preds = %22
%26 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(17) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %25
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(15) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
%31 = select i1 %30, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i8* null
br label %32
32: ; preds = %28, %25, %22, %19, %16, %13, %10, %7, %4, %1
%33 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %1 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), %10 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), %13 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), %16 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %19 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), %22 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), %25 ], [ %31, %28 ]
ret i8* %33
}