#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 */
struct tl_scheme_object {
  int dummy;
};
struct tl_int_array {
  int dummy;
};
struct tl_compiler {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ isupper(char const);
int /*<<< orphan*/ strcmp(char const *const, char *);
int /*<<< orphan*/ tl_int_array_append(struct tl_int_array *, int);
int /*<<< orphan*/ tl_int_array_append_double(struct tl_int_array *, double);
int /*<<< orphan*/ tl_int_array_append_long(struct tl_int_array *, long long);
int /*<<< orphan*/ tl_int_array_append_string(struct tl_int_array *, char *);
int /*<<< orphan*/ tl_scheme_double_value(struct tl_scheme_object *, double *);
int /*<<< orphan*/ tl_scheme_int_value(struct tl_scheme_object *, int *);
int /*<<< orphan*/ tl_scheme_long_value(struct tl_scheme_object *, long long *);
int /*<<< orphan*/ tl_scheme_string_value(struct tl_scheme_object *, char **);
int tl_serialize_failf(struct tl_compiler *, struct tl_scheme_object *, char *);
int tolower(char const);
int tl_expression_serialize_builtin_type(struct tl_compiler *C,
                                         struct tl_scheme_object *E,
                                         const char *const name,
                                         struct tl_int_array *a) {
  int i;
  long long l;
  double d;
  char *s;
  switch (tolower(name[0])) {
  case 'd':
    if (!strcmp(name + 1, "ouble")) {
      if (tl_scheme_double_value(E, &d) < 0) {
        return tl_serialize_failf(C, E, "isn't of type 'double'");
      }
      if (isupper(name[0])) {
        if (tl_int_array_append(a, 0x2210c154) < 0) {
          return tl_serialize_failf(C, E, "output buffer overflow");
        }
      }
      if (tl_int_array_append_double(a, d) < 0) {
        return tl_serialize_failf(C, E, "output buffer overflow");
      }
      return 1;
    }
    break;
  case 'i':
    if (!strcmp(name + 1, "nt")) {
      if (tl_scheme_int_value(E, &i) < 0) {
        return tl_serialize_failf(C, E, "isn't of type 'int'");
      }
      if (isupper(name[0])) {
        if (tl_int_array_append(a, 0xa8509bda) < 0) {
          return tl_serialize_failf(C, E, "output buffer overflow");
        }
      }
      if (tl_int_array_append(a, i) < 0) {
        return tl_serialize_failf(C, E, "output buffer overflow");
      }
      return 1;
    }
    break;
  case 'l':
    if (!strcmp(name + 1, "ong")) {
      if (tl_scheme_long_value(E, &l) < 0) {
        return tl_serialize_failf(C, E, "isn't of type 'long'");
      }
      if (isupper(name[0])) {
        if (tl_int_array_append(a, 0x22076cba) < 0) {
          return tl_serialize_failf(C, E, "output buffer overflow");
        }
      }
      if (tl_int_array_append_long(a, l) < 0) {
        return tl_serialize_failf(C, E, "output buffer overflow");
      }
      return 1;
    }
    break;
  case 's':
    if (!strcmp(name + 1, "tring")) {
      if (tl_scheme_string_value(E, &s) < 0) {
        return tl_serialize_failf(C, E, "isn't of type 'string'");
      }
      if (isupper(name[0])) {
        if (tl_int_array_append(a, 0xb5286e24) < 0) {
          return tl_serialize_failf(C, E, "output buffer overflow");
        }
      }
      if (tl_int_array_append_string(a, s) < 0) {
        return tl_serialize_failf(C, E, "output buffer overflow");
      }
      return 1;
    }
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<tl_expression_serialize_builtin_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   10a0 <tolower@plt>
add    $0xffffff9c,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0xf,%eax
ja     1586 <tl_expression_serialize_builtin_type+0x3c6>
mov    -0x50(%rbp),%rax
lea    0xdff(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
lea    0xe27(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    12e5 <tl_expression_serialize_builtin_type+0x125>
mov    -0x18(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1060 <tl_scheme_double_value@plt>
cmp    $0x0,%eax
jge    1259 <tl_expression_serialize_builtin_type+0x99>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xdfa(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   10b0 <isupper@plt>
cmp    $0x0,%eax
je     12a6 <tl_expression_serialize_builtin_type+0xe6>
mov    -0x28(%rbp),%rdi
mov    $0x2210c154,%esi
call   1040 <tl_int_array_append@plt>
cmp    $0x0,%eax
jge    12a1 <tl_expression_serialize_builtin_type+0xe1>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xdc9(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
jmp    12a6 <tl_expression_serialize_builtin_type+0xe6>
mov    -0x28(%rbp),%rdi
movsd  -0x40(%rbp),%xmm0
call   10c0 <tl_int_array_append_double@plt>
cmp    $0x0,%eax
jge    12d9 <tl_expression_serialize_builtin_type+0x119>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xd91(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
movl   $0x1,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
jmp    1586 <tl_expression_serialize_builtin_type+0x3c6>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
lea    0xd7b(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    13c3 <tl_expression_serialize_builtin_type+0x203>
mov    -0x18(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   1070 <tl_scheme_int_value@plt>
cmp    $0x0,%eax
jge    1339 <tl_expression_serialize_builtin_type+0x179>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xd4b(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   10b0 <isupper@plt>
cmp    $0x0,%eax
je     1386 <tl_expression_serialize_builtin_type+0x1c6>
mov    -0x28(%rbp),%rdi
mov    $0xa8509bda,%esi
call   1040 <tl_int_array_append@plt>
cmp    $0x0,%eax
jge    1381 <tl_expression_serialize_builtin_type+0x1c1>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xce9(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
jmp    1386 <tl_expression_serialize_builtin_type+0x1c6>
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1040 <tl_int_array_append@plt>
cmp    $0x0,%eax
jge    13b7 <tl_expression_serialize_builtin_type+0x1f7>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xcb3(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
movl   $0x1,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
jmp    1586 <tl_expression_serialize_builtin_type+0x3c6>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
lea    0xcb4(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    14a2 <tl_expression_serialize_builtin_type+0x2e2>
mov    -0x18(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1050 <tl_scheme_long_value@plt>
cmp    $0x0,%eax
jge    1417 <tl_expression_serialize_builtin_type+0x257>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xc85(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   10b0 <isupper@plt>
cmp    $0x0,%eax
je     1464 <tl_expression_serialize_builtin_type+0x2a4>
mov    -0x28(%rbp),%rdi
mov    $0x22076cba,%esi
call   1040 <tl_int_array_append@plt>
cmp    $0x0,%eax
jge    145f <tl_expression_serialize_builtin_type+0x29f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xc0b(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
jmp    1464 <tl_expression_serialize_builtin_type+0x2a4>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   10d0 <tl_int_array_append_long@plt>
cmp    $0x0,%eax
jge    1496 <tl_expression_serialize_builtin_type+0x2d6>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xbd4(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
movl   $0x1,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
jmp    1586 <tl_expression_serialize_builtin_type+0x3c6>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
lea    0xbee(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1581 <tl_expression_serialize_builtin_type+0x3c1>
mov    -0x18(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1030 <tl_scheme_string_value@plt>
cmp    $0x0,%eax
jge    14f6 <tl_expression_serialize_builtin_type+0x336>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xbc1(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   10b0 <isupper@plt>
cmp    $0x0,%eax
je     1543 <tl_expression_serialize_builtin_type+0x383>
mov    -0x28(%rbp),%rdi
mov    $0xb5286e24,%esi
call   1040 <tl_int_array_append@plt>
cmp    $0x0,%eax
jge    153e <tl_expression_serialize_builtin_type+0x37e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xb2c(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
jmp    1543 <tl_expression_serialize_builtin_type+0x383>
mov    -0x28(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   10e0 <tl_int_array_append_string@plt>
cmp    $0x0,%eax
jge    1575 <tl_expression_serialize_builtin_type+0x3b5>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xaf5(%rip),%rdx
call   1090 <tl_serialize_failf@plt>
mov    %eax,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
movl   $0x1,-0x4(%rbp)
jmp    158d <tl_expression_serialize_builtin_type+0x3cd>
jmp    1586 <tl_expression_serialize_builtin_type+0x3c6>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tl_expression_serialize_builtin_type>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r12
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
movsbl (%rdx),%edi
call   10a0 <tolower@plt>
xor    %ebp,%ebp
add    $0xffffff9c,%eax
cmp    $0xf,%eax
ja     13a7 <tl_expression_serialize_builtin_type+0x1e7>
lea    0xe0b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1(%rbx),%rdi
lea    0xe37(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
jne    13a7 <tl_expression_serialize_builtin_type+0x1e7>
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
call   1060 <tl_scheme_double_value@plt>
test   %eax,%eax
js     1378 <tl_expression_serialize_builtin_type+0x1b8>
movsbl (%rbx),%edi
call   10b0 <isupper@plt>
test   %eax,%eax
je     124c <tl_expression_serialize_builtin_type+0x8c>
mov    %r12,%rdi
mov    $0x2210c154,%esi
call   1040 <tl_int_array_append@plt>
test   %eax,%eax
js     136f <tl_expression_serialize_builtin_type+0x1af>
movsd  0x8(%rsp),%xmm0
mov    %r12,%rdi
call   10c0 <tl_int_array_append_double@plt>
jmp    1366 <tl_expression_serialize_builtin_type+0x1a6>
lea    0x1(%rbx),%rdi
lea    0xe0a(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
jne    13a7 <tl_expression_serialize_builtin_type+0x1e7>
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
call   1070 <tl_scheme_int_value@plt>
test   %eax,%eax
js     1381 <tl_expression_serialize_builtin_type+0x1c1>
movsbl (%rbx),%edi
call   10b0 <isupper@plt>
test   %eax,%eax
je     12ad <tl_expression_serialize_builtin_type+0xed>
mov    %r12,%rdi
mov    $0xa8509bda,%esi
call   1040 <tl_int_array_append@plt>
test   %eax,%eax
js     136f <tl_expression_serialize_builtin_type+0x1af>
mov    0x8(%rsp),%esi
mov    %r12,%rdi
call   1040 <tl_int_array_append@plt>
jmp    1366 <tl_expression_serialize_builtin_type+0x1a6>
lea    0x1(%rbx),%rdi
lea    0xdc2(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
jne    13a7 <tl_expression_serialize_builtin_type+0x1e7>
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
call   1050 <tl_scheme_long_value@plt>
test   %eax,%eax
js     138a <tl_expression_serialize_builtin_type+0x1ca>
movsbl (%rbx),%edi
call   10b0 <isupper@plt>
test   %eax,%eax
je     1308 <tl_expression_serialize_builtin_type+0x148>
mov    %r12,%rdi
mov    $0x22076cba,%esi
call   1040 <tl_int_array_append@plt>
test   %eax,%eax
js     136f <tl_expression_serialize_builtin_type+0x1af>
mov    0x8(%rsp),%rsi
mov    %r12,%rdi
call   10d0 <tl_int_array_append_long@plt>
jmp    1366 <tl_expression_serialize_builtin_type+0x1a6>
lea    0x1(%rbx),%rdi
lea    0xd82(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
jne    13a7 <tl_expression_serialize_builtin_type+0x1e7>
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
call   1030 <tl_scheme_string_value@plt>
test   %eax,%eax
js     1393 <tl_expression_serialize_builtin_type+0x1d3>
movsbl (%rbx),%edi
call   10b0 <isupper@plt>
test   %eax,%eax
je     1359 <tl_expression_serialize_builtin_type+0x199>
mov    %r12,%rdi
mov    $0xb5286e24,%esi
call   1040 <tl_int_array_append@plt>
test   %eax,%eax
js     136f <tl_expression_serialize_builtin_type+0x1af>
mov    0x8(%rsp),%rsi
mov    %r12,%rdi
call   10e0 <tl_int_array_append_string@plt>
mov    $0x1,%ebp
test   %eax,%eax
jns    13a7 <tl_expression_serialize_builtin_type+0x1e7>
lea    0xce7(%rip),%rdx
jmp    139a <tl_expression_serialize_builtin_type+0x1da>
lea    0xcc7(%rip),%rdx
jmp    139a <tl_expression_serialize_builtin_type+0x1da>
lea    0xcef(%rip),%rdx
jmp    139a <tl_expression_serialize_builtin_type+0x1da>
lea    0xcfe(%rip),%rdx
jmp    139a <tl_expression_serialize_builtin_type+0x1da>
lea    0xd10(%rip),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1090 <tl_serialize_failf@plt>
mov    %eax,%ebp
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tl_compiler = type { i32 }
%struct.tl_scheme_object = type { i32 }
%struct.tl_int_array = type { i32 }
@.str = [6 x i8] c"ouble\00"
@.str.1 = [23 x i8] c"isn't of type 'double'\00"
@.str.2 = [23 x i8] c"output buffer overflow\00"
@.str.3 = [3 x i8] c"nt\00"
@.str.4 = [20 x i8] c"isn't of type 'int'\00"
@.str.5 = [4 x i8] c"ong\00"
@.str.6 = [21 x i8] c"isn't of type 'long'\00"
@.str.7 = [6 x i8] c"tring\00"
@.str.8 = [23 x i8] c"isn't of type 'string'\00"
define i32 @tl_expression_serialize_builtin_type(%struct.tl_compiler* %0, %struct.tl_scheme_object* %1, i8* %2, %struct.tl_int_array* %3) {
%5 = alloca i32
%6 = alloca %struct.tl_compiler*
%7 = alloca %struct.tl_scheme_object*
%8 = alloca i8*
%9 = alloca %struct.tl_int_array*
%10 = alloca i32
%11 = alloca i64
%12 = alloca double
%13 = alloca i8*
store %struct.tl_compiler* %0, %struct.tl_compiler** %6
store %struct.tl_scheme_object* %1, %struct.tl_scheme_object** %7
store i8* %2, i8** %8
store %struct.tl_int_array* %3, %struct.tl_int_array** %9
%14 = load i8*, i8** %8
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = call i32 @tolower(i8 signext %16)
switch i32 %17, label %174 [
i32 100, label %18
i32 105, label %57
i32 108, label %96
i32 115, label %135
]
18: ; preds = %4
%19 = load i8*, i8** %8
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %56, label %23
23: ; preds = %18
%24 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%25 = call i32 @tl_scheme_double_value(%struct.tl_scheme_object* %24, double* %12)
%26 = icmp slt i32 %25, 0
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%29 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%30 = call i32 @tl_serialize_failf(%struct.tl_compiler* %28, %struct.tl_scheme_object* %29, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
store i32 %30, i32* %5
br label %175
31: ; preds = %23
%32 = load i8*, i8** %8
%33 = getelementptr inbounds i8, i8* %32, i64 0
%34 = load i8, i8* %33
%35 = call i32 @isupper(i8 signext %34)
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %46
37: ; preds = %31
%38 = load %struct.tl_int_array*, %struct.tl_int_array** %9
%39 = call i32 @tl_int_array_append(%struct.tl_int_array* %38, i32 571523412)
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %45
41: ; preds = %37
%42 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%43 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%44 = call i32 @tl_serialize_failf(%struct.tl_compiler* %42, %struct.tl_scheme_object* %43, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 %44, i32* %5
br label %175
45: ; preds = %37
br label %46
46: ; preds = %45, %31
%47 = load %struct.tl_int_array*, %struct.tl_int_array** %9
%48 = load double, double* %12
%49 = call i32 @tl_int_array_append_double(%struct.tl_int_array* %47, double %48)
%50 = icmp slt i32 %49, 0
br i1 %50, label %51, label %55
51: ; preds = %46
%52 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%53 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%54 = call i32 @tl_serialize_failf(%struct.tl_compiler* %52, %struct.tl_scheme_object* %53, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 %54, i32* %5
br label %175
55: ; preds = %46
store i32 1, i32* %5
br label %175
56: ; preds = %18
br label %174
57: ; preds = %4
%58 = load i8*, i8** %8
%59 = getelementptr inbounds i8, i8* %58, i64 1
%60 = call i32 @strcmp(i8* %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%61 = icmp ne i32 %60, 0
br i1 %61, label %95, label %62
62: ; preds = %57
%63 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%64 = call i32 @tl_scheme_int_value(%struct.tl_scheme_object* %63, i32* %10)
%65 = icmp slt i32 %64, 0
br i1 %65, label %66, label %70
66: ; preds = %62
%67 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%68 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%69 = call i32 @tl_serialize_failf(%struct.tl_compiler* %67, %struct.tl_scheme_object* %68, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
store i32 %69, i32* %5
br label %175
70: ; preds = %62
%71 = load i8*, i8** %8
%72 = getelementptr inbounds i8, i8* %71, i64 0
%73 = load i8, i8* %72
%74 = call i32 @isupper(i8 signext %73)
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %85
76: ; preds = %70
%77 = load %struct.tl_int_array*, %struct.tl_int_array** %9
%78 = call i32 @tl_int_array_append(%struct.tl_int_array* %77, i32 -1471112230)
%79 = icmp slt i32 %78, 0
br i1 %79, label %80, label %84
80: ; preds = %76
%81 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%82 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%83 = call i32 @tl_serialize_failf(%struct.tl_compiler* %81, %struct.tl_scheme_object* %82, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 %83, i32* %5
br label %175
84: ; preds = %76
br label %85
85: ; preds = %84, %70
%86 = load %struct.tl_int_array*, %struct.tl_int_array** %9
%87 = load i32, i32* %10
%88 = call i32 @tl_int_array_append(%struct.tl_int_array* %86, i32 %87)
%89 = icmp slt i32 %88, 0
br i1 %89, label %90, label %94
90: ; preds = %85
%91 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%92 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%93 = call i32 @tl_serialize_failf(%struct.tl_compiler* %91, %struct.tl_scheme_object* %92, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 %93, i32* %5
br label %175
94: ; preds = %85
store i32 1, i32* %5
br label %175
95: ; preds = %57
br label %174
96: ; preds = %4
%97 = load i8*, i8** %8
%98 = getelementptr inbounds i8, i8* %97, i64 1
%99 = call i32 @strcmp(i8* %98, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%100 = icmp ne i32 %99, 0
br i1 %100, label %134, label %101
101: ; preds = %96
%102 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%103 = call i32 @tl_scheme_long_value(%struct.tl_scheme_object* %102, i64* %11)
%104 = icmp slt i32 %103, 0
br i1 %104, label %105, label %109
105: ; preds = %101
%106 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%107 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%108 = call i32 @tl_serialize_failf(%struct.tl_compiler* %106, %struct.tl_scheme_object* %107, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
store i32 %108, i32* %5
br label %175
109: ; preds = %101
%110 = load i8*, i8** %8
%111 = getelementptr inbounds i8, i8* %110, i64 0
%112 = load i8, i8* %111
%113 = call i32 @isupper(i8 signext %112)
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %124
115: ; preds = %109
%116 = load %struct.tl_int_array*, %struct.tl_int_array** %9
%117 = call i32 @tl_int_array_append(%struct.tl_int_array* %116, i32 570911930)
%118 = icmp slt i32 %117, 0
br i1 %118, label %119, label %123
119: ; preds = %115
%120 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%121 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%122 = call i32 @tl_serialize_failf(%struct.tl_compiler* %120, %struct.tl_scheme_object* %121, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 %122, i32* %5
br label %175
123: ; preds = %115
br label %124
124: ; preds = %123, %109
%125 = load %struct.tl_int_array*, %struct.tl_int_array** %9
%126 = load i64, i64* %11
%127 = call i32 @tl_int_array_append_long(%struct.tl_int_array* %125, i64 %126)
%128 = icmp slt i32 %127, 0
br i1 %128, label %129, label %133
129: ; preds = %124
%130 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%131 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%132 = call i32 @tl_serialize_failf(%struct.tl_compiler* %130, %struct.tl_scheme_object* %131, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 %132, i32* %5
br label %175
133: ; preds = %124
store i32 1, i32* %5
br label %175
134: ; preds = %96
br label %174
135: ; preds = %4
%136 = load i8*, i8** %8
%137 = getelementptr inbounds i8, i8* %136, i64 1
%138 = call i32 @strcmp(i8* %137, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%139 = icmp ne i32 %138, 0
br i1 %139, label %173, label %140
140: ; preds = %135
%141 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%142 = call i32 @tl_scheme_string_value(%struct.tl_scheme_object* %141, i8** %13)
%143 = icmp slt i32 %142, 0
br i1 %143, label %144, label %148
144: ; preds = %140
%145 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%146 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%147 = call i32 @tl_serialize_failf(%struct.tl_compiler* %145, %struct.tl_scheme_object* %146, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
store i32 %147, i32* %5
br label %175
148: ; preds = %140
%149 = load i8*, i8** %8
%150 = getelementptr inbounds i8, i8* %149, i64 0
%151 = load i8, i8* %150
%152 = call i32 @isupper(i8 signext %151)
%153 = icmp ne i32 %152, 0
br i1 %153, label %154, label %163
154: ; preds = %148
%155 = load %struct.tl_int_array*, %struct.tl_int_array** %9
%156 = call i32 @tl_int_array_append(%struct.tl_int_array* %155, i32 -1255641564)
%157 = icmp slt i32 %156, 0
br i1 %157, label %158, label %162
158: ; preds = %154
%159 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%160 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%161 = call i32 @tl_serialize_failf(%struct.tl_compiler* %159, %struct.tl_scheme_object* %160, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 %161, i32* %5
br label %175
162: ; preds = %154
br label %163
163: ; preds = %162, %148
%164 = load %struct.tl_int_array*, %struct.tl_int_array** %9
%165 = load i8*, i8** %13
%166 = call i32 @tl_int_array_append_string(%struct.tl_int_array* %164, i8* %165)
%167 = icmp slt i32 %166, 0
br i1 %167, label %168, label %172
168: ; preds = %163
%169 = load %struct.tl_compiler*, %struct.tl_compiler** %6
%170 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %7
%171 = call i32 @tl_serialize_failf(%struct.tl_compiler* %169, %struct.tl_scheme_object* %170, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 %171, i32* %5
br label %175
172: ; preds = %163
store i32 1, i32* %5
br label %175
173: ; preds = %135
br label %174
174: ; preds = %4, %173, %134, %95, %56
store i32 0, i32* %5
br label %175
175: ; preds = %174, %172, %168, %158, %144, %133, %129, %119, %105, %94, %90, %80, %66, %55, %51, %41, %27
%176 = load i32, i32* %5
ret i32 %176
}

LLVM IR (-O2):
%struct.tl_compiler = type { i32 }
%struct.tl_scheme_object = type { i32 }
%struct.tl_int_array = type { i32 }
@.str = [6 x i8] c"ouble\00"
@.str.1 = [23 x i8] c"isn't of type 'double'\00"
@.str.2 = [23 x i8] c"output buffer overflow\00"
@.str.3 = [3 x i8] c"nt\00"
@.str.4 = [20 x i8] c"isn't of type 'int'\00"
@.str.5 = [4 x i8] c"ong\00"
@.str.6 = [21 x i8] c"isn't of type 'long'\00"
@.str.7 = [6 x i8] c"tring\00"
@.str.8 = [23 x i8] c"isn't of type 'string'\00"
define i32 @tl_expression_serialize_builtin_type(%struct.tl_compiler* %0, %struct.tl_scheme_object* %1, i8* nocapture %2, %struct.tl_int_array* %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca double
%8 = alloca i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i64* %6 to i8*
%11 = bitcast double* %7 to i8*
%12 = bitcast i8** %8 to i8*
%13 = load i8, i8* %2
%14 = tail call i32 @tolower(i8 signext %13)
switch i32 %14, label %90 [
i32 100, label %15
i32 105, label %33
i32 108, label %51
i32 115, label %69
]
15: ; preds = %4
%16 = getelementptr inbounds i8, i8* %2, i64 1
%17 = tail call i32 @strcmp(i8* %16, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %90
19: ; preds = %15
%20 = call i32 @tl_scheme_double_value(%struct.tl_scheme_object* %1, double* %7)
%21 = icmp slt i32 %20, 0
br i1 %21, label %87, label %22
22: ; preds = %19
%23 = load i8, i8* %2
%24 = call i32 @isupper(i8 signext %23)
%25 = icmp eq i32 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %22
%27 = call i32 @tl_int_array_append(%struct.tl_int_array* %3, i32 571523412)
%28 = icmp slt i32 %27, 0
br i1 %28, label %87, label %29
29: ; preds = %26, %22
%30 = load double, double* %7
%31 = call i32 @tl_int_array_append_double(%struct.tl_int_array* %3, double %30)
%32 = icmp slt i32 %31, 0
br i1 %32, label %87, label %90
33: ; preds = %4
%34 = getelementptr inbounds i8, i8* %2, i64 1
%35 = tail call i32 @strcmp(i8* %34, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %90
37: ; preds = %33
%38 = call i32 @tl_scheme_int_value(%struct.tl_scheme_object* %1, i32* %5)
%39 = icmp slt i32 %38, 0
br i1 %39, label %87, label %40
40: ; preds = %37
%41 = load i8, i8* %2
%42 = call i32 @isupper(i8 signext %41)
%43 = icmp eq i32 %42, 0
br i1 %43, label %47, label %44
44: ; preds = %40
%45 = call i32 @tl_int_array_append(%struct.tl_int_array* %3, i32 -1471112230)
%46 = icmp slt i32 %45, 0
br i1 %46, label %87, label %47
47: ; preds = %44, %40
%48 = load i32, i32* %5
%49 = call i32 @tl_int_array_append(%struct.tl_int_array* %3, i32 %48)
%50 = icmp slt i32 %49, 0
br i1 %50, label %87, label %90
51: ; preds = %4
%52 = getelementptr inbounds i8, i8* %2, i64 1
%53 = tail call i32 @strcmp(i8* %52, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %90
55: ; preds = %51
%56 = call i32 @tl_scheme_long_value(%struct.tl_scheme_object* %1, i64* %6)
%57 = icmp slt i32 %56, 0
br i1 %57, label %87, label %58
58: ; preds = %55
%59 = load i8, i8* %2
%60 = call i32 @isupper(i8 signext %59)
%61 = icmp eq i32 %60, 0
br i1 %61, label %65, label %62
62: ; preds = %58
%63 = call i32 @tl_int_array_append(%struct.tl_int_array* %3, i32 570911930)
%64 = icmp slt i32 %63, 0
br i1 %64, label %87, label %65
65: ; preds = %62, %58
%66 = load i64, i64* %6
%67 = call i32 @tl_int_array_append_long(%struct.tl_int_array* %3, i64 %66)
%68 = icmp slt i32 %67, 0
br i1 %68, label %87, label %90
69: ; preds = %4
%70 = getelementptr inbounds i8, i8* %2, i64 1
%71 = tail call i32 @strcmp(i8* %70, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %90
73: ; preds = %69
%74 = call i32 @tl_scheme_string_value(%struct.tl_scheme_object* %1, i8** %8)
%75 = icmp slt i32 %74, 0
br i1 %75, label %87, label %76
76: ; preds = %73
%77 = load i8, i8* %2
%78 = call i32 @isupper(i8 signext %77)
%79 = icmp eq i32 %78, 0
br i1 %79, label %83, label %80
80: ; preds = %76
%81 = call i32 @tl_int_array_append(%struct.tl_int_array* %3, i32 -1255641564)
%82 = icmp slt i32 %81, 0
br i1 %82, label %87, label %83
83: ; preds = %80, %76
%84 = load i8*, i8** %8
%85 = call i32 @tl_int_array_append_string(%struct.tl_int_array* %3, i8* %84)
%86 = icmp slt i32 %85, 0
br i1 %86, label %87, label %90
87: ; preds = %83, %80, %73, %65, %62, %55, %47, %44, %37, %29, %26, %19
%88 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %19 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %26 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %29 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), %37 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %44 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %47 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), %55 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %62 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %65 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), %73 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %80 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %83 ]
%89 = call i32 @tl_serialize_failf(%struct.tl_compiler* %0, %struct.tl_scheme_object* %1, i8* %88)
br label %90
90: ; preds = %87, %4, %15, %33, %51, %69, %83, %65, %47, %29
%91 = phi i32 [ 1, %29 ], [ 1, %47 ], [ 1, %65 ], [ 1, %83 ], [ 0, %69 ], [ 0, %51 ], [ 0, %33 ], [ 0, %15 ], [ 0, %4 ], [ %89, %87 ]
ret i32 %91
}