#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 */
char *calloc(int, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
unsigned char *return_data_type_string(unsigned char data_type) {
  char *data_type_string = NULL;
  char Integer[] = {'I', 'n', 't', 'e', 'g', 'e', 'r', '\0'};
  char OctetString[] = {'O', 'c', 't', 'e', 't', 0x20, 'S',
                        't', 'r', 'i', 'n', 'g', '\0'};
  char Null[] = {'N', 'u', 'l', 'l', '\0'};
  char ObjectIdentifier[] = {'O', 'b', 'j', 'e', 'c', 't', 0x20, 'I', 'd',
                             'e', 'n', 't', 'i', 'f', 'i', 'e',  'r', '\0'};
  char Timeticks[] = {'T', 'i', 'm', 'e', 't', 'i', 'c', 'k', 's', '\0'};
  char Error[] = {'E', 'r', 'r', 'o', 'r', '\0'};
  switch (data_type) {
  case 0x02:
    data_type_string = calloc(1, strlen((char *)Integer) + 1);
    strcpy(data_type_string, Integer);
    break;
  case 0x04:
    data_type_string = calloc(1, strlen((char *)OctetString) + 1);
    strcpy(data_type_string, OctetString);
    break;
  case 0x05:
    data_type_string = calloc(1, strlen(Null) + 1);
    strcpy(data_type_string, Null);
    break;
  case 0x06:
    data_type_string = calloc(1, strlen((char *)ObjectIdentifier) + 1);
    strcpy(data_type_string, ObjectIdentifier);
    break;
  case 0x43:
    data_type_string = calloc(1, strlen((char *)Integer) + 1);
    strcpy(data_type_string, Timeticks);
    break;
  default: {
    data_type_string = calloc(1, strlen((char *)Error) + 1);
    strcpy(data_type_string, Error);
  } break;
  }
  return (unsigned char *)data_type_string;
}


x86 assembly (clang, -O0):
<return_data_type_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movq   $0x0,-0x10(%rbp)
movabs $0x72656765746e49,%rax
mov    %rax,-0x18(%rbp)
movabs $0x676e6972745320,%rax
mov    %rax,-0x23(%rbp)
movabs $0x745320746574634f,%rax
20 53 74
mov    %rax,-0x28(%rbp)
movb   $0x0,-0x2c(%rbp)
movl   $0x6c6c754e,-0x30(%rbp)
movaps 0xeae(%rip),%xmm0
movaps %xmm0,-0x50(%rbp)
movw   $0x72,-0x40(%rbp)
movabs $0x6b636974656d6954,%rax
69 63 6b
mov    %rax,-0x60(%rbp)
movw   $0x73,-0x58(%rbp)
movw   $0x72,-0x64(%rbp)
movl   $0x6f727245,-0x68(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x6c(%rbp)
sub    $0x2,%eax
je     1206 <return_data_type_string+0xd6>
jmp    11c2 <return_data_type_string+0x92>
mov    -0x6c(%rbp),%eax
sub    $0x4,%eax
je     1234 <return_data_type_string+0x104>
jmp    11d3 <return_data_type_string+0xa3>
mov    -0x6c(%rbp),%eax
sub    $0x5,%eax
je     1262 <return_data_type_string+0x132>
jmp    11e4 <return_data_type_string+0xb4>
mov    -0x6c(%rbp),%eax
sub    $0x6,%eax
je     1290 <return_data_type_string+0x160>
jmp    11f5 <return_data_type_string+0xc5>
mov    -0x6c(%rbp),%eax
sub    $0x43,%eax
je     12be <return_data_type_string+0x18e>
jmp    12ec <return_data_type_string+0x1bc>
lea    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    1315 <return_data_type_string+0x1e5>
lea    -0x28(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    1315 <return_data_type_string+0x1e5>
lea    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    1315 <return_data_type_string+0x1e5>
lea    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    1315 <return_data_type_string+0x1e5>
lea    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    1315 <return_data_type_string+0x1e5>
lea    -0x68(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x68(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_data_type_string>:
push   %r14
push   %rbx
sub    $0x58,%rsp
movabs $0x72656765746e49,%rax
mov    %rax,0x18(%rsp)
movabs $0x676e6972745320,%rax
mov    %rax,0x35(%rsp)
movabs $0x745320746574634f,%rax
20 53 74
mov    %rax,0x30(%rsp)
movb   $0x0,0xc(%rsp)
movl   $0x6c6c754e,0x8(%rsp)
6c
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movw   $0x72,0x50(%rsp)
movabs $0x6b636974656d6954,%rax
69 63 6b
mov    %rax,0x20(%rsp)
movw   $0x73,0x28(%rsp)
movw   $0x72,0x14(%rsp)
movl   $0x6f727245,0x10(%rsp)
6f
lea    -0x2(%rdi),%eax
cmp    $0x4,%al
ja     11ca <return_data_type_string+0x9a>
movzbl %al,%eax
lea    0xe46(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x18(%rsp),%r14
jmp    120e <return_data_type_string+0xde>
cmp    $0x43,%dil
jne    11f4 <return_data_type_string+0xc4>
lea    0x18(%rsp),%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%esi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,%rbx
lea    0x20(%rsp),%rsi
mov    %rax,%rdi
jmp    122c <return_data_type_string+0xfc>
lea    0x10(%rsp),%r14
jmp    120e <return_data_type_string+0xde>
lea    0x30(%rsp),%r14
jmp    120e <return_data_type_string+0xde>
lea    0x8(%rsp),%r14
jmp    120e <return_data_type_string+0xde>
lea    0x40(%rsp),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%esi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.return_data_type_string.Integer = [8 x i8] c"Integer\00"
@__const.return_data_type_string.OctetString = [13 x i8] c"Octet String\00"
@__const.return_data_type_string.Null = [5 x i8] c"Null\00"
@__const.return_data_type_string.ObjectIdentifier = [18 x i8] c"Object Identifier\00"
@__const.return_data_type_string.Timeticks = [10 x i8] c"Timeticks\00"
@__const.return_data_type_string.Error = [6 x i8] c"Error\00"
define i8* @return_data_type_string(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8*
%4 = alloca [8 x i8]
%5 = alloca [13 x i8]
%6 = alloca [5 x i8]
%7 = alloca [18 x i8]
%8 = alloca [10 x i8]
%9 = alloca [6 x i8]
store i8 %0, i8* %2
store i8* null, i8** %3
%10 = bitcast [8 x i8]* %4 to i8*
%11 = bitcast [13 x i8]* %5 to i8*
%12 = bitcast [5 x i8]* %6 to i8*
%13 = bitcast [18 x i8]* %7 to i8*
%14 = bitcast [10 x i8]* %8 to i8*
%15 = bitcast [6 x i8]* %9 to i8*
%16 = load i8, i8* %2
%17 = zext i8 %16 to i32
switch i32 %17, label %58 [
i32 2, label %18
i32 4, label %26
i32 5, label %34
i32 6, label %42
i32 67, label %50
]
18: ; preds = %1
%19 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%20 = call i32 @strlen(i8* %19)
%21 = add nsw i32 %20, 1
%22 = call i8* @calloc(i32 1, i32 %21)
store i8* %22, i8** %3
%23 = load i8*, i8** %3
%24 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%25 = call i32 @strcpy(i8* %23, i8* %24)
br label %66
26: ; preds = %1
%27 = getelementptr inbounds [13 x i8], [13 x i8]* %5, i64 0, i64 0
%28 = call i32 @strlen(i8* %27)
%29 = add nsw i32 %28, 1
%30 = call i8* @calloc(i32 1, i32 %29)
store i8* %30, i8** %3
%31 = load i8*, i8** %3
%32 = getelementptr inbounds [13 x i8], [13 x i8]* %5, i64 0, i64 0
%33 = call i32 @strcpy(i8* %31, i8* %32)
br label %66
34: ; preds = %1
%35 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%36 = call i32 @strlen(i8* %35)
%37 = add nsw i32 %36, 1
%38 = call i8* @calloc(i32 1, i32 %37)
store i8* %38, i8** %3
%39 = load i8*, i8** %3
%40 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%41 = call i32 @strcpy(i8* %39, i8* %40)
br label %66
42: ; preds = %1
%43 = getelementptr inbounds [18 x i8], [18 x i8]* %7, i64 0, i64 0
%44 = call i32 @strlen(i8* %43)
%45 = add nsw i32 %44, 1
%46 = call i8* @calloc(i32 1, i32 %45)
store i8* %46, i8** %3
%47 = load i8*, i8** %3
%48 = getelementptr inbounds [18 x i8], [18 x i8]* %7, i64 0, i64 0
%49 = call i32 @strcpy(i8* %47, i8* %48)
br label %66
50: ; preds = %1
%51 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%52 = call i32 @strlen(i8* %51)
%53 = add nsw i32 %52, 1
%54 = call i8* @calloc(i32 1, i32 %53)
store i8* %54, i8** %3
%55 = load i8*, i8** %3
%56 = getelementptr inbounds [10 x i8], [10 x i8]* %8, i64 0, i64 0
%57 = call i32 @strcpy(i8* %55, i8* %56)
br label %66
58: ; preds = %1
%59 = getelementptr inbounds [6 x i8], [6 x i8]* %9, i64 0, i64 0
%60 = call i32 @strlen(i8* %59)
%61 = add nsw i32 %60, 1
%62 = call i8* @calloc(i32 1, i32 %61)
store i8* %62, i8** %3
%63 = load i8*, i8** %3
%64 = getelementptr inbounds [6 x i8], [6 x i8]* %9, i64 0, i64 0
%65 = call i32 @strcpy(i8* %63, i8* %64)
br label %66
66: ; preds = %58, %50, %42, %34, %26, %18
%67 = load i8*, i8** %3
ret i8* %67
}

LLVM IR (-O2):
@__const.return_data_type_string.OctetString = [13 x i8] c"Octet String\00"
@__const.return_data_type_string.Null = [5 x i8] c"Null\00"
@__const.return_data_type_string.ObjectIdentifier = [18 x i8] c"Object Identifier\00"
@__const.return_data_type_string.Timeticks = [10 x i8] c"Timeticks\00"
@__const.return_data_type_string.Error = [6 x i8] c"Error\00"
define i8* @return_data_type_string(i8 zeroext %0) {
%2 = alloca i64
%3 = alloca [13 x i8]
%4 = alloca [5 x i8]
%5 = alloca [18 x i8]
%6 = alloca [10 x i8]
%7 = alloca [6 x i8]
%8 = bitcast i64* %2 to i8*
store i64 32199642103180873, i64* %2
%9 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
switch i8 %0, label %39 [
i8 2, label %14
i8 4, label %19
i8 5, label %24
i8 6, label %29
i8 67, label %34
]
14: ; preds = %1
%15 = call i32 @strlen(i8* %8)
%16 = add nsw i32 %15, 1
%17 = call i8* @calloc(i32 1, i32 %16)
%18 = call i32 @strcpy(i8* %17, i8* %8)
br label %44
19: ; preds = %1
%20 = call i32 @strlen(i8* %9)
%21 = add nsw i32 %20, 1
%22 = call i8* @calloc(i32 1, i32 %21)
%23 = call i32 @strcpy(i8* %22, i8* %9)
br label %44
24: ; preds = %1
%25 = call i32 @strlen(i8* %10)
%26 = add nsw i32 %25, 1
%27 = call i8* @calloc(i32 1, i32 %26)
%28 = call i32 @strcpy(i8* %27, i8* %10)
br label %44
29: ; preds = %1
%30 = call i32 @strlen(i8* %11)
%31 = add nsw i32 %30, 1
%32 = call i8* @calloc(i32 1, i32 %31)
%33 = call i32 @strcpy(i8* %32, i8* %11)
br label %44
34: ; preds = %1
%35 = call i32 @strlen(i8* %8)
%36 = add nsw i32 %35, 1
%37 = call i8* @calloc(i32 1, i32 %36)
%38 = call i32 @strcpy(i8* %37, i8* %12)
br label %44
39: ; preds = %1
%40 = call i32 @strlen(i8* %13)
%41 = add nsw i32 %40, 1
%42 = call i8* @calloc(i32 1, i32 %41)
%43 = call i32 @strcpy(i8* %42, i8* %13)
br label %44
44: ; preds = %39, %34, %29, %24, %19, %14
%45 = phi i8* [ %42, %39 ], [ %37, %34 ], [ %32, %29 ], [ %27, %24 ], [ %22, %19 ], [ %17, %14 ]
ret i8* %45
}