#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 ic_type_param {
  int dummy;
};
struct ic_symbol {
  int dummy;
};
struct ic_pvector {
  int dummy;
};
struct ic_kludge {
  int dummy;
};
struct ic_decl_type {
  int dummy;
};

/* Variables and functions */
struct ic_decl_type *ic_analyse_type_decl_instantiate_generic(
    struct ic_kludge *, struct ic_decl_type *, struct ic_pvector *);
struct ic_decl_type *ic_kludge_get_decl_type_from_symbol(struct ic_kludge *,
                                                         struct ic_symbol *);
struct ic_symbol *ic_parse_helper_full_name(struct ic_symbol *,
                                            int /*<<< orphan*/,
                                            struct ic_pvector *,
                                            int /*<<< orphan*/);
struct ic_symbol *ic_parse_helper_generic_name(struct ic_symbol *,
                                               struct ic_pvector *,
                                               int /*<<< orphan*/);
int /*<<< orphan*/ ic_resolve_type_ref_list(struct ic_kludge *,
                                            struct ic_pvector *,
                                            struct ic_pvector *);
char *ic_symbol_contents(struct ic_symbol *);
int /*<<< orphan*/ ic_symbol_destroy(struct ic_symbol *, int);
int /*<<< orphan*/ ic_symbol_print(int /*<<< orphan*/, struct ic_symbol *);
int /*<<< orphan*/ ic_type_param_check_set(struct ic_type_param *);
struct ic_decl_type *ic_type_param_get(struct ic_type_param *);
struct ic_type_param *ic_type_param_search(struct ic_pvector *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdout;
struct ic_decl_type *ic_analyse_resolve_type(struct ic_kludge *kludge,
                                             char *unit, char *unit_name,
                                             struct ic_pvector *type_params,
                                             struct ic_symbol *sym,
                                             struct ic_pvector *type_args) {
  char *sym_ch = 0;
  struct ic_type_param *type_param = 0;
  struct ic_decl_type *decl_type = 0;
  struct ic_symbol *full_name_owned = 0;
  struct ic_symbol *generic_name_owned = 0;
  if (!kludge) {
    puts("ic_analyse_resolve_type: kludge was null");
    return 0;
  }
  if (!unit) {
    puts("ic_analyse_resolve_type: unit was null");
    return 0;
  }
  if (!unit_name) {
    puts("ic_analyse_resolve_type: unit_name was null");
    return 0;
  }
  if (!sym) {
    puts("ic_analyse_resolve_type: sym was null");
    return 0;
  }
  if (!type_args) {
    puts("ic_analyse_resolve_type: type_args was null");
    return 0;
  }
  sym_ch = ic_symbol_contents(sym);
  if (!sym) {
    puts("ic_analyse_resolve_type: call to ic_symbol_contents failed");
    return 0;
  }
  if (!ic_resolve_type_ref_list(kludge, type_params, type_args)) {
    puts("ic_analyse_resolve_type: call to ic_resolve_type_ref_list failed");
    return 0;
  }
  if (type_params) {
    type_param = ic_type_param_search(type_params, sym_ch);
    if (type_param) {
      if (!ic_type_param_check_set(type_param)) {
        printf("ic_analyse_resolve_type: type_param was not set for type_param "
               "'%s', internal error\n",
               sym_ch);
        return 0;
      }
      decl_type = ic_type_param_get(type_param);
      if (!decl_type) {
        puts("ic_analyse_resolve_type: call to ic_type_param_get failed");
        return 0;
      }
      decl_type = ic_analyse_type_decl_instantiate_generic(kludge, decl_type,
                                                           type_args);
      if (!decl_type) {
        puts("ic_analyse_resolve_type: call to "
             "ic_analyse_type_decl_instantiate_generic failed");
        return 0;
      }
      return decl_type;
    }
  }
  full_name_owned = ic_parse_helper_full_name(sym, 0, type_args, 0);
  if (!full_name_owned) {
    puts("ic_analyse_resolve_type: call to ic_parse_helper_full_name failed");
    return 0;
  }
  decl_type = ic_kludge_get_decl_type_from_symbol(kludge, full_name_owned);
  if (decl_type) {
    if (!ic_symbol_destroy(full_name_owned, 1)) {
      puts("ic_analyse_resolve_type: call to ic_symbol_destroy failed");
      return 0;
    }
    return decl_type;
  }
  generic_name_owned = ic_parse_helper_generic_name(sym, type_args, 0);
  if (!generic_name_owned) {
    puts(
        "ic_analyse_resolve_type: call to ic_parse_helper_generic_name failed");
    return 0;
  }
  decl_type = ic_kludge_get_decl_type_from_symbol(kludge, generic_name_owned);
  if (!decl_type) {
    puts("ic_analyse_resolve_type: unable to resolve type");
    printf("\n    I tried to lookup both:");
    printf("\n        ");
    ic_symbol_print(stdout, full_name_owned);
    printf("\n        ");
    ic_symbol_print(stdout, generic_name_owned);
    puts("\n    and failed to find either\n");
    if (!ic_symbol_destroy(full_name_owned, 1)) {
      puts("ic_analyse_resolve_type: call to ic_symbol_destroy failed");
      return 0;
    }
    if (!ic_symbol_destroy(generic_name_owned, 1)) {
      puts("ic_analyse_resolve_type: call to ic_symbol_destroy failed");
      return 0;
    }
    return 0;
  }
  decl_type =
      ic_analyse_type_decl_instantiate_generic(kludge, decl_type, type_args);
  if (!decl_type) {
    puts("ic_analyse_resolve_type: call to "
         "ic_analyse_type_decl_instantiate_generic failed");
    printf("\n    I found the generic type:");
    printf("\n        ");
    ic_symbol_print(stdout, generic_name_owned);
    printf("\n    and tried to instantiate it as:");
    printf("\n        ");
    ic_symbol_print(stdout, full_name_owned);
    puts("\n    but failed\n");
    if (!ic_symbol_destroy(full_name_owned, 1)) {
      puts("ic_analyse_resolve_type: call to ic_symbol_destroy failed");
      return 0;
    }
    if (!ic_symbol_destroy(generic_name_owned, 1)) {
      puts("ic_analyse_resolve_type: call to ic_symbol_destroy failed");
      return 0;
    }
    return 0;
  }
  if (!ic_symbol_destroy(full_name_owned, 1)) {
    puts("ic_analyse_resolve_type: call to ic_symbol_destroy failed");
    return 0;
  }
  if (!ic_symbol_destroy(generic_name_owned, 1)) {
    puts("ic_analyse_resolve_type: call to ic_symbol_destroy failed");
    return 0;
  }
  return decl_type;
}


x86 assembly (clang, -O0):
<ic_analyse_resolve_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    123c <ic_analyse_resolve_type+0x6c>
lea    0xdd6(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
cmpq   $0x0,-0x18(%rbp)
jne    1260 <ic_analyse_resolve_type+0x90>
lea    0xddb(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
cmpq   $0x0,-0x20(%rbp)
jne    1284 <ic_analyse_resolve_type+0xb4>
lea    0xdde(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
cmpq   $0x0,-0x30(%rbp)
jne    12a8 <ic_analyse_resolve_type+0xd8>
lea    0xde6(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
cmpq   $0x0,-0x38(%rbp)
jne    12cc <ic_analyse_resolve_type+0xfc>
lea    0xde8(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x30(%rbp),%rdi
call   10a0 <ic_symbol_contents@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12fd <ic_analyse_resolve_type+0x12d>
lea    0xde3(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1060 <ic_resolve_type_ref_list@plt>
cmp    $0x0,%eax
jne    1330 <ic_analyse_resolve_type+0x160>
lea    0xdeb(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
cmpq   $0x0,-0x28(%rbp)
je     1404 <ic_analyse_resolve_type+0x234>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rsi
call   1040 <ic_type_param_search@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
je     13ff <ic_analyse_resolve_type+0x22f>
mov    -0x48(%rbp),%rdi
call   10d0 <ic_type_param_check_set@plt>
cmp    $0x0,%eax
jne    1388 <ic_analyse_resolve_type+0x1b8>
mov    -0x40(%rbp),%rsi
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x48(%rbp),%rdi
call   1070 <ic_type_param_get@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    13b9 <ic_analyse_resolve_type+0x1e9>
lea    0xdf8(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x10(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   10e0 <ic_analyse_type_decl_instantiate_generic@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    13f2 <ic_analyse_resolve_type+0x222>
lea    0xdf9(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x50(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
jmp    1404 <ic_analyse_resolve_type+0x234>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
xor    %ecx,%ecx
mov    %ecx,%esi
call   10c0 <ic_parse_helper_full_name@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jne    143d <ic_analyse_resolve_type+0x26d>
lea    0xdff(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x10(%rbp),%rdi
mov    -0x58(%rbp),%rsi
call   10b0 <ic_kludge_get_decl_type_from_symbol@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
je     1496 <ic_analyse_resolve_type+0x2c6>
mov    -0x58(%rbp),%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
cmp    $0x0,%eax
jne    1489 <ic_analyse_resolve_type+0x2b9>
lea    0xdf5(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x50(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
xor    %edx,%edx
call   10f0 <ic_parse_helper_generic_name@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
jne    14cd <ic_analyse_resolve_type+0x2fd>
lea    0xdeb(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x10(%rbp),%rdi
mov    -0x60(%rbp),%rsi
call   10b0 <ic_kludge_get_decl_type_from_symbol@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    15bc <ic_analyse_resolve_type+0x3ec>
lea    0xdfb(%rip),%rdi
call   1050 <puts@plt>
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    0x2ac8(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rsi
call   1030 <ic_symbol_print@plt>
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    0x2aa8(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%rsi
call   1030 <ic_symbol_print@plt>
lea    0xdf8(%rip),%rdi
call   1050 <puts@plt>
mov    -0x58(%rbp),%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
cmp    $0x0,%eax
jne    157f <ic_analyse_resolve_type+0x3af>
lea    0xcff(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x60(%rbp),%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
cmp    $0x0,%eax
jne    15af <ic_analyse_resolve_type+0x3df>
lea    0xccf(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x10(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   10e0 <ic_analyse_type_decl_instantiate_generic@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    16bd <ic_analyse_resolve_type+0x4ed>
lea    0xbf6(%rip),%rdi
call   1050 <puts@plt>
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    0x29d5(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%rsi
call   1030 <ic_symbol_print@plt>
lea    0xd64(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd0d(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    0x29a7(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rsi
call   1030 <ic_symbol_print@plt>
lea    0xd5b(%rip),%rdi
call   1050 <puts@plt>
mov    -0x58(%rbp),%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
cmp    $0x0,%eax
jne    1680 <ic_analyse_resolve_type+0x4b0>
lea    0xbfe(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x60(%rbp),%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
cmp    $0x0,%eax
jne    16b0 <ic_analyse_resolve_type+0x4e0>
lea    0xbce(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x58(%rbp),%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
cmp    $0x0,%eax
jne    16ed <ic_analyse_resolve_type+0x51d>
lea    0xb91(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x60(%rbp),%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
cmp    $0x0,%eax
jne    171d <ic_analyse_resolve_type+0x54d>
lea    0xb61(%rip),%rdi
call   1050 <puts@plt>
movq   $0x0,-0x8(%rbp)
jmp    1725 <ic_analyse_resolve_type+0x555>
mov    -0x50(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ic_analyse_resolve_type>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     129c <ic_analyse_resolve_type+0xcc>
test   %rsi,%rsi
je     12a8 <ic_analyse_resolve_type+0xd8>
test   %rdx,%rdx
je     12b4 <ic_analyse_resolve_type+0xe4>
mov    %r8,%r14
test   %r8,%r8
je     12c0 <ic_analyse_resolve_type+0xf0>
mov    %r9,%r12
test   %r9,%r9
je     12cc <ic_analyse_resolve_type+0xfc>
mov    %rcx,%rbx
mov    %rdi,%rbp
mov    %r14,%rdi
call   10a0 <ic_symbol_contents@plt>
mov    %rax,%r15
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1060 <ic_resolve_type_ref_list@plt>
test   %eax,%eax
je     1323 <ic_analyse_resolve_type+0x153>
test   %rbx,%rbx
je     12d8 <ic_analyse_resolve_type+0x108>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <ic_type_param_search@plt>
test   %rax,%rax
je     12d8 <ic_analyse_resolve_type+0x108>
mov    %rax,%rbx
mov    %rax,%rdi
call   10d0 <ic_type_param_check_set@plt>
test   %eax,%eax
je     133b <ic_analyse_resolve_type+0x16b>
mov    %rbx,%rdi
call   1070 <ic_type_param_get@plt>
test   %rax,%rax
je     13ad <ic_analyse_resolve_type+0x1dd>
mov    %rbp,%rdi
mov    %rax,%rsi
mov    %r12,%rdx
call   10e0 <ic_analyse_type_decl_instantiate_generic@plt>
mov    %rax,%r13
test   %rax,%rax
jne    13c5 <ic_analyse_resolve_type+0x1f5>
lea    0xf07(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xd5d(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xd7a(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xd95(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xdb5(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xdcf(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
mov    %r14,%rdi
xor    %esi,%esi
mov    %r12,%rdx
xor    %ecx,%ecx
call   10c0 <ic_parse_helper_full_name@plt>
test   %rax,%rax
je     132f <ic_analyse_resolve_type+0x15f>
mov    %rax,%r15
mov    %rbp,%rdi
mov    %rax,%rsi
call   10b0 <ic_kludge_get_decl_type_from_symbol@plt>
test   %rax,%rax
je     1351 <ic_analyse_resolve_type+0x181>
mov    %rax,%r13
mov    %r15,%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
test   %eax,%eax
jne    13c5 <ic_analyse_resolve_type+0x1f5>
lea    0xf13(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xda4(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xeb9(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xdcd(%rip),%rdi
xor    %r13d,%r13d
mov    %r15,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    13c5 <ic_analyse_resolve_type+0x1f5>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %edx,%edx
call   10f0 <ic_parse_helper_generic_name@plt>
test   %rax,%rax
je     13b6 <ic_analyse_resolve_type+0x1e6>
mov    %rax,%r14
mov    %rbp,%rdi
mov    %rax,%rsi
call   10b0 <ic_kludge_get_decl_type_from_symbol@plt>
test   %rax,%rax
je     13d7 <ic_analyse_resolve_type+0x207>
mov    %rbp,%rdi
mov    %rax,%rsi
mov    %r12,%rdx
call   10e0 <ic_analyse_type_decl_instantiate_generic@plt>
test   %rax,%rax
je     1432 <ic_analyse_resolve_type+0x262>
mov    %rax,%r13
mov    %r15,%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
test   %eax,%eax
je     1317 <ic_analyse_resolve_type+0x147>
mov    %r14,%rdi
jmp    1305 <ic_analyse_resolve_type+0x135>
lea    0xdb0(%rip),%rdi
jmp    13bd <ic_analyse_resolve_type+0x1ed>
lea    0xeae(%rip),%rdi
call   1050 <puts@plt>
xor    %r13d,%r13d
mov    %r13,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xed2(%rip),%rdi
call   1050 <puts@plt>
lea    0xef6(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xf05(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x2bd7(%rip),%rbp
mov    0x0(%rbp),%edi
mov    %r15,%rsi
call   1030 <ic_symbol_print@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x0(%rbp),%edi
mov    %r14,%rsi
call   1030 <ic_symbol_print@plt>
lea    0xed7(%rip),%rdi
jmp    1499 <ic_analyse_resolve_type+0x2c9>
lea    0xd65(%rip),%rdi
call   1050 <puts@plt>
lea    0xee2(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xeaa(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x2b7c(%rip),%rbp
mov    0x0(%rbp),%edi
mov    %r14,%rsi
call   1030 <ic_symbol_print@plt>
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x0(%rbp),%edi
mov    %r15,%rsi
call   1030 <ic_symbol_print@plt>
lea    0xed2(%rip),%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
test   %eax,%eax
je     1317 <ic_analyse_resolve_type+0x147>
mov    %r14,%rdi
mov    $0x1,%esi
call   1090 <ic_symbol_destroy@plt>
test   %eax,%eax
jne    13c2 <ic_analyse_resolve_type+0x1f2>
jmp    1317 <ic_analyse_resolve_type+0x147>

LLVM IR (-O0):
%struct.ic_decl_type = type { i32 }
%struct.ic_kludge = type { i32 }
%struct.ic_symbol = type { i32 }
%struct.ic_pvector = type { i32 }
%struct.ic_type_param = type { i32 }
@.str = [41 x i8] c"ic_analyse_resolve_type: kludge was null\00"
@.str.1 = [39 x i8] c"ic_analyse_resolve_type: unit was null\00"
@.str.2 = [44 x i8] c"ic_analyse_resolve_type: unit_name was null\00"
@.str.3 = [38 x i8] c"ic_analyse_resolve_type: sym was null\00"
@.str.4 = [44 x i8] c"ic_analyse_resolve_type: type_args was null\00"
@.str.5 = [59 x i8] c"ic_analyse_resolve_type: call to ic_symbol_contents failed\00"
@.str.6 = [65 x i8] c"ic_analyse_resolve_type: call to ic_resolve_type_ref_list failed\00"
@.str.7 = [85 x i8] c"ic_analyse_resolve_type: type_param was not set for type_param '%s', internal error\0A\00"
@.str.8 = [58 x i8] c"ic_analyse_resolve_type: call to ic_type_param_get failed\00"
@.str.9 = [81 x i8] c"ic_analyse_resolve_type: call to ic_analyse_type_decl_instantiate_generic failed\00"
@.str.10 = [66 x i8] c"ic_analyse_resolve_type: call to ic_parse_helper_full_name failed\00"
@.str.11 = [58 x i8] c"ic_analyse_resolve_type: call to ic_symbol_destroy failed\00"
@.str.12 = [69 x i8] c"ic_analyse_resolve_type: call to ic_parse_helper_generic_name failed\00"
@.str.13 = [48 x i8] c"ic_analyse_resolve_type: unable to resolve type\00"
@.str.14 = [29 x i8] c"\0A I tried to lookup both:\00"
@.str.15 = [10 x i8] c"\0A \00"
@stdout = global i32 0
@.str.16 = [32 x i8] c"\0A and failed to find either\0A\00"
@.str.17 = [31 x i8] c"\0A I found the generic type:\00"
@.str.18 = [37 x i8] c"\0A and tried to instantiate it as:\00"
@.str.19 = [17 x i8] c"\0A but failed\0A\00"
define %struct.ic_decl_type* @ic_analyse_resolve_type(%struct.ic_kludge* %0, i8* %1, i8* %2, %struct.ic_pvector* %3, %struct.ic_symbol* %4, %struct.ic_pvector* %5) {
%7 = alloca %struct.ic_decl_type*
%8 = alloca %struct.ic_kludge*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca %struct.ic_pvector*
%12 = alloca %struct.ic_symbol*
%13 = alloca %struct.ic_pvector*
%14 = alloca i8*
%15 = alloca %struct.ic_type_param*
%16 = alloca %struct.ic_decl_type*
%17 = alloca %struct.ic_symbol*
%18 = alloca %struct.ic_symbol*
store %struct.ic_kludge* %0, %struct.ic_kludge** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store %struct.ic_pvector* %3, %struct.ic_pvector** %11
store %struct.ic_symbol* %4, %struct.ic_symbol** %12
store %struct.ic_pvector* %5, %struct.ic_pvector** %13
store i8* null, i8** %14
store %struct.ic_type_param* null, %struct.ic_type_param** %15
store %struct.ic_decl_type* null, %struct.ic_decl_type** %16
store %struct.ic_symbol* null, %struct.ic_symbol** %17
store %struct.ic_symbol* null, %struct.ic_symbol** %18
%19 = load %struct.ic_kludge*, %struct.ic_kludge** %8
%20 = icmp ne %struct.ic_kludge* %19, null
br i1 %20, label %23, label %21
21: ; preds = %6
%22 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
23: ; preds = %6
%24 = load i8*, i8** %9
%25 = icmp ne i8* %24, null
br i1 %25, label %28, label %26
26: ; preds = %23
%27 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
28: ; preds = %23
%29 = load i8*, i8** %10
%30 = icmp ne i8* %29, null
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
33: ; preds = %28
%34 = load %struct.ic_symbol*, %struct.ic_symbol** %12
%35 = icmp ne %struct.ic_symbol* %34, null
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
38: ; preds = %33
%39 = load %struct.ic_pvector*, %struct.ic_pvector** %13
%40 = icmp ne %struct.ic_pvector* %39, null
br i1 %40, label %43, label %41
41: ; preds = %38
%42 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
43: ; preds = %38
%44 = load %struct.ic_symbol*, %struct.ic_symbol** %12
%45 = call i8* @ic_symbol_contents(%struct.ic_symbol* %44)
store i8* %45, i8** %14
%46 = load %struct.ic_symbol*, %struct.ic_symbol** %12
%47 = icmp ne %struct.ic_symbol* %46, null
br i1 %47, label %50, label %48
48: ; preds = %43
%49 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
50: ; preds = %43
%51 = load %struct.ic_kludge*, %struct.ic_kludge** %8
%52 = load %struct.ic_pvector*, %struct.ic_pvector** %11
%53 = load %struct.ic_pvector*, %struct.ic_pvector** %13
%54 = call i32 @ic_resolve_type_ref_list(%struct.ic_kludge* %51, %struct.ic_pvector* %52, %struct.ic_pvector* %53)
%55 = icmp ne i32 %54, 0
br i1 %55, label %58, label %56
56: ; preds = %50
%57 = call i32 @puts(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.6, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
58: ; preds = %50
%59 = load %struct.ic_pvector*, %struct.ic_pvector** %11
%60 = icmp ne %struct.ic_pvector* %59, null
br i1 %60, label %61, label %93
61: ; preds = %58
%62 = load %struct.ic_pvector*, %struct.ic_pvector** %11
%63 = load i8*, i8** %14
%64 = call %struct.ic_type_param* @ic_type_param_search(%struct.ic_pvector* %62, i8* %63)
store %struct.ic_type_param* %64, %struct.ic_type_param** %15
%65 = load %struct.ic_type_param*, %struct.ic_type_param** %15
%66 = icmp ne %struct.ic_type_param* %65, null
br i1 %66, label %67, label %92
67: ; preds = %61
%68 = load %struct.ic_type_param*, %struct.ic_type_param** %15
%69 = call i32 @ic_type_param_check_set(%struct.ic_type_param* %68)
%70 = icmp ne i32 %69, 0
br i1 %70, label %74, label %71
71: ; preds = %67
%72 = load i8*, i8** %14
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.7, i64 0, i64 0), i8* %72)
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
74: ; preds = %67
%75 = load %struct.ic_type_param*, %struct.ic_type_param** %15
%76 = call %struct.ic_decl_type* @ic_type_param_get(%struct.ic_type_param* %75)
store %struct.ic_decl_type* %76, %struct.ic_decl_type** %16
%77 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
%78 = icmp ne %struct.ic_decl_type* %77, null
br i1 %78, label %81, label %79
79: ; preds = %74
%80 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
81: ; preds = %74
%82 = load %struct.ic_kludge*, %struct.ic_kludge** %8
%83 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
%84 = load %struct.ic_pvector*, %struct.ic_pvector** %13
%85 = call %struct.ic_decl_type* @ic_analyse_type_decl_instantiate_generic(%struct.ic_kludge* %82, %struct.ic_decl_type* %83, %struct.ic_pvector* %84)
store %struct.ic_decl_type* %85, %struct.ic_decl_type** %16
%86 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
%87 = icmp ne %struct.ic_decl_type* %86, null
br i1 %87, label %90, label %88
88: ; preds = %81
%89 = call i32 @puts(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
90: ; preds = %81
%91 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
store %struct.ic_decl_type* %91, %struct.ic_decl_type** %7
br label %199
92: ; preds = %61
br label %93
93: ; preds = %92, %58
%94 = load %struct.ic_symbol*, %struct.ic_symbol** %12
%95 = load %struct.ic_pvector*, %struct.ic_pvector** %13
%96 = call %struct.ic_symbol* @ic_parse_helper_full_name(%struct.ic_symbol* %94, i32 0, %struct.ic_pvector* %95, i32 0)
store %struct.ic_symbol* %96, %struct.ic_symbol** %17
%97 = load %struct.ic_symbol*, %struct.ic_symbol** %17
%98 = icmp ne %struct.ic_symbol* %97, null
br i1 %98, label %101, label %99
99: ; preds = %93
%100 = call i32 @puts(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
101: ; preds = %93
%102 = load %struct.ic_kludge*, %struct.ic_kludge** %8
%103 = load %struct.ic_symbol*, %struct.ic_symbol** %17
%104 = call %struct.ic_decl_type* @ic_kludge_get_decl_type_from_symbol(%struct.ic_kludge* %102, %struct.ic_symbol* %103)
store %struct.ic_decl_type* %104, %struct.ic_decl_type** %16
%105 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
%106 = icmp ne %struct.ic_decl_type* %105, null
br i1 %106, label %107, label %115
107: ; preds = %101
%108 = load %struct.ic_symbol*, %struct.ic_symbol** %17
%109 = call i32 @ic_symbol_destroy(%struct.ic_symbol* %108, i32 1)
%110 = icmp ne i32 %109, 0
br i1 %110, label %113, label %111
111: ; preds = %107
%112 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
113: ; preds = %107
%114 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
store %struct.ic_decl_type* %114, %struct.ic_decl_type** %7
br label %199
115: ; preds = %101
%116 = load %struct.ic_symbol*, %struct.ic_symbol** %12
%117 = load %struct.ic_pvector*, %struct.ic_pvector** %13
%118 = call %struct.ic_symbol* @ic_parse_helper_generic_name(%struct.ic_symbol* %116, %struct.ic_pvector* %117, i32 0)
store %struct.ic_symbol* %118, %struct.ic_symbol** %18
%119 = load %struct.ic_symbol*, %struct.ic_symbol** %18
%120 = icmp ne %struct.ic_symbol* %119, null
br i1 %120, label %123, label %121
121: ; preds = %115
%122 = call i32 @puts(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.12, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
123: ; preds = %115
%124 = load %struct.ic_kludge*, %struct.ic_kludge** %8
%125 = load %struct.ic_symbol*, %struct.ic_symbol** %18
%126 = call %struct.ic_decl_type* @ic_kludge_get_decl_type_from_symbol(%struct.ic_kludge* %124, %struct.ic_symbol* %125)
store %struct.ic_decl_type* %126, %struct.ic_decl_type** %16
%127 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
%128 = icmp ne %struct.ic_decl_type* %127, null
br i1 %128, label %153, label %129
129: ; preds = %123
%130 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0))
%133 = load i32, i32* @stdout
%134 = load %struct.ic_symbol*, %struct.ic_symbol** %17
%135 = call i32 @ic_symbol_print(i32 %133, %struct.ic_symbol* %134)
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0))
%137 = load i32, i32* @stdout
%138 = load %struct.ic_symbol*, %struct.ic_symbol** %18
%139 = call i32 @ic_symbol_print(i32 %137, %struct.ic_symbol* %138)
%140 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0))
%141 = load %struct.ic_symbol*, %struct.ic_symbol** %17
%142 = call i32 @ic_symbol_destroy(%struct.ic_symbol* %141, i32 1)
%143 = icmp ne i32 %142, 0
br i1 %143, label %146, label %144
144: ; preds = %129
%145 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
146: ; preds = %129
%147 = load %struct.ic_symbol*, %struct.ic_symbol** %18
%148 = call i32 @ic_symbol_destroy(%struct.ic_symbol* %147, i32 1)
%149 = icmp ne i32 %148, 0
br i1 %149, label %152, label %150
150: ; preds = %146
%151 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
152: ; preds = %146
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
153: ; preds = %123
%154 = load %struct.ic_kludge*, %struct.ic_kludge** %8
%155 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
%156 = load %struct.ic_pvector*, %struct.ic_pvector** %13
%157 = call %struct.ic_decl_type* @ic_analyse_type_decl_instantiate_generic(%struct.ic_kludge* %154, %struct.ic_decl_type* %155, %struct.ic_pvector* %156)
store %struct.ic_decl_type* %157, %struct.ic_decl_type** %16
%158 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
%159 = icmp ne %struct.ic_decl_type* %158, null
br i1 %159, label %185, label %160
160: ; preds = %153
%161 = call i32 @puts(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0))
%163 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0))
%164 = load i32, i32* @stdout
%165 = load %struct.ic_symbol*, %struct.ic_symbol** %18
%166 = call i32 @ic_symbol_print(i32 %164, %struct.ic_symbol* %165)
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0))
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0))
%169 = load i32, i32* @stdout
%170 = load %struct.ic_symbol*, %struct.ic_symbol** %17
%171 = call i32 @ic_symbol_print(i32 %169, %struct.ic_symbol* %170)
%172 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0))
%173 = load %struct.ic_symbol*, %struct.ic_symbol** %17
%174 = call i32 @ic_symbol_destroy(%struct.ic_symbol* %173, i32 1)
%175 = icmp ne i32 %174, 0
br i1 %175, label %178, label %176
176: ; preds = %160
%177 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
178: ; preds = %160
%179 = load %struct.ic_symbol*, %struct.ic_symbol** %18
%180 = call i32 @ic_symbol_destroy(%struct.ic_symbol* %179, i32 1)
%181 = icmp ne i32 %180, 0
br i1 %181, label %184, label %182
182: ; preds = %178
%183 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
184: ; preds = %178
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
185: ; preds = %153
%186 = load %struct.ic_symbol*, %struct.ic_symbol** %17
%187 = call i32 @ic_symbol_destroy(%struct.ic_symbol* %186, i32 1)
%188 = icmp ne i32 %187, 0
br i1 %188, label %191, label %189
189: ; preds = %185
%190 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
191: ; preds = %185
%192 = load %struct.ic_symbol*, %struct.ic_symbol** %18
%193 = call i32 @ic_symbol_destroy(%struct.ic_symbol* %192, i32 1)
%194 = icmp ne i32 %193, 0
br i1 %194, label %197, label %195
195: ; preds = %191
%196 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
store %struct.ic_decl_type* null, %struct.ic_decl_type** %7
br label %199
197: ; preds = %191
%198 = load %struct.ic_decl_type*, %struct.ic_decl_type** %16
store %struct.ic_decl_type* %198, %struct.ic_decl_type** %7
br label %199
199: ; preds = %197, %195, %189, %184, %182, %176, %152, %150, %144, %121, %113, %111, %99, %90, %88, %79, %71, %56, %48, %41, %36, %31, %26, %21
%200 = load %struct.ic_decl_type*, %struct.ic_decl_type** %7
ret %struct.ic_decl_type* %200
}

LLVM IR (-O2):
%struct.ic_decl_type = type { i32 }
%struct.ic_kludge = type { i32 }
%struct.ic_symbol = type { i32 }
%struct.ic_pvector = type { i32 }
%struct.ic_type_param = type { i32 }
@.str = [41 x i8] c"ic_analyse_resolve_type: kludge was null\00"
@.str.1 = [39 x i8] c"ic_analyse_resolve_type: unit was null\00"
@.str.2 = [44 x i8] c"ic_analyse_resolve_type: unit_name was null\00"
@.str.3 = [38 x i8] c"ic_analyse_resolve_type: sym was null\00"
@.str.4 = [44 x i8] c"ic_analyse_resolve_type: type_args was null\00"
@.str.6 = [65 x i8] c"ic_analyse_resolve_type: call to ic_resolve_type_ref_list failed\00"
@.str.7 = [85 x i8] c"ic_analyse_resolve_type: type_param was not set for type_param '%s', internal error\0A\00"
@.str.8 = [58 x i8] c"ic_analyse_resolve_type: call to ic_type_param_get failed\00"
@.str.9 = [81 x i8] c"ic_analyse_resolve_type: call to ic_analyse_type_decl_instantiate_generic failed\00"
@.str.10 = [66 x i8] c"ic_analyse_resolve_type: call to ic_parse_helper_full_name failed\00"
@.str.11 = [58 x i8] c"ic_analyse_resolve_type: call to ic_symbol_destroy failed\00"
@.str.12 = [69 x i8] c"ic_analyse_resolve_type: call to ic_parse_helper_generic_name failed\00"
@.str.13 = [48 x i8] c"ic_analyse_resolve_type: unable to resolve type\00"
@.str.14 = [29 x i8] c"\0A I tried to lookup both:\00"
@.str.15 = [10 x i8] c"\0A \00"
@stdout = global i32 0
@.str.16 = [32 x i8] c"\0A and failed to find either\0A\00"
@.str.17 = [31 x i8] c"\0A I found the generic type:\00"
@.str.18 = [37 x i8] c"\0A and tried to instantiate it as:\00"
@.str.19 = [17 x i8] c"\0A but failed\0A\00"
define %struct.ic_decl_type* @ic_analyse_resolve_type(%struct.ic_kludge* %0, i8* readnone %1, i8* readnone %2, %struct.ic_pvector* %3, %struct.ic_symbol* %4, %struct.ic_pvector* %5) {
%7 = icmp eq %struct.ic_kludge* %0, null
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %125
10: ; preds = %6
%11 = icmp eq i8* %1, null
br i1 %11, label %12, label %14
12: ; preds = %10
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
br label %125
14: ; preds = %10
%15 = icmp eq i8* %2, null
br i1 %15, label %16, label %18
16: ; preds = %14
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
br label %125
18: ; preds = %14
%19 = icmp eq %struct.ic_symbol* %4, null
br i1 %19, label %20, label %22
20: ; preds = %18
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
br label %125
22: ; preds = %18
%23 = icmp eq %struct.ic_pvector* %5, null
br i1 %23, label %24, label %26
24: ; preds = %22
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
br label %125
26: ; preds = %22
%27 = tail call i8* @ic_symbol_contents(%struct.ic_symbol* %4)
%28 = tail call i32 @ic_resolve_type_ref_list(%struct.ic_kludge* %0, %struct.ic_pvector* %3, %struct.ic_pvector* %5)
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.6, i64 0, i64 0))
br label %125
32: ; preds = %26
%33 = icmp eq %struct.ic_pvector* %3, null
br i1 %33, label %52, label %34
34: ; preds = %32
%35 = tail call %struct.ic_type_param* @ic_type_param_search(%struct.ic_pvector* %3, i8* %27)
%36 = icmp eq %struct.ic_type_param* %35, null
br i1 %36, label %52, label %37
37: ; preds = %34
%38 = tail call i32 @ic_type_param_check_set(%struct.ic_type_param* %35)
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str.7, i64 0, i64 0), i8* %27)
br label %125
42: ; preds = %37
%43 = tail call %struct.ic_decl_type* @ic_type_param_get(%struct.ic_type_param* %35)
%44 = icmp eq %struct.ic_decl_type* %43, null
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0))
br label %125
47: ; preds = %42
%48 = tail call %struct.ic_decl_type* @ic_analyse_type_decl_instantiate_generic(%struct.ic_kludge* %0, %struct.ic_decl_type* %43, %struct.ic_pvector* %5)
%49 = icmp eq %struct.ic_decl_type* %48, null
br i1 %49, label %50, label %125
50: ; preds = %47
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
br label %125
52: ; preds = %34, %32
%53 = tail call %struct.ic_symbol* @ic_parse_helper_full_name(%struct.ic_symbol* %4, i32 0, %struct.ic_pvector* %5, i32 0)
%54 = icmp eq %struct.ic_symbol* %53, null
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
br label %125
57: ; preds = %52
%58 = tail call %struct.ic_decl_type* @ic_kludge_get_decl_type_from_symbol(%struct.ic_kludge* %0, %struct.ic_symbol* %53)
%59 = icmp eq %struct.ic_decl_type* %58, null
br i1 %59, label %65, label %60
60: ; preds = %57
%61 = tail call i32 @ic_symbol_destroy(%struct.ic_symbol* %53, i32 1)
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %125
63: ; preds = %60
%64 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
br label %125
65: ; preds = %57
%66 = tail call %struct.ic_symbol* @ic_parse_helper_generic_name(%struct.ic_symbol* %4, %struct.ic_pvector* %5, i32 0)
%67 = icmp eq %struct.ic_symbol* %66, null
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.12, i64 0, i64 0))
br label %125
70: ; preds = %65
%71 = tail call %struct.ic_decl_type* @ic_kludge_get_decl_type_from_symbol(%struct.ic_kludge* %0, %struct.ic_symbol* %66)
%72 = icmp eq %struct.ic_decl_type* %71, null
br i1 %72, label %73, label %92
73: ; preds = %70
%74 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0))
%77 = load i32, i32* @stdout
%78 = tail call i32 @ic_symbol_print(i32 %77, %struct.ic_symbol* %53)
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0))
%80 = load i32, i32* @stdout
%81 = tail call i32 @ic_symbol_print(i32 %80, %struct.ic_symbol* %66)
%82 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0))
%83 = tail call i32 @ic_symbol_destroy(%struct.ic_symbol* %53, i32 1)
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %87
85: ; preds = %73
%86 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
br label %125
87: ; preds = %73
%88 = tail call i32 @ic_symbol_destroy(%struct.ic_symbol* %66, i32 1)
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %125
90: ; preds = %87
%91 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
br label %125
92: ; preds = %70
%93 = tail call %struct.ic_decl_type* @ic_analyse_type_decl_instantiate_generic(%struct.ic_kludge* %0, %struct.ic_decl_type* %71, %struct.ic_pvector* %5)
%94 = icmp eq %struct.ic_decl_type* %93, null
br i1 %94, label %95, label %115
95: ; preds = %92
%96 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0))
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0))
%99 = load i32, i32* @stdout
%100 = tail call i32 @ic_symbol_print(i32 %99, %struct.ic_symbol* %66)
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0))
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0))
%103 = load i32, i32* @stdout
%104 = tail call i32 @ic_symbol_print(i32 %103, %struct.ic_symbol* %53)
%105 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0))
%106 = tail call i32 @ic_symbol_destroy(%struct.ic_symbol* %53, i32 1)
%107 = icmp eq i32 %106, 0
br i1 %107, label %108, label %110
108: ; preds = %95
%109 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
br label %125
110: ; preds = %95
%111 = tail call i32 @ic_symbol_destroy(%struct.ic_symbol* %66, i32 1)
%112 = icmp eq i32 %111, 0
br i1 %112, label %113, label %125
113: ; preds = %110
%114 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
br label %125
115: ; preds = %92
%116 = tail call i32 @ic_symbol_destroy(%struct.ic_symbol* %53, i32 1)
%117 = icmp eq i32 %116, 0
br i1 %117, label %118, label %120
118: ; preds = %115
%119 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
br label %125
120: ; preds = %115
%121 = tail call i32 @ic_symbol_destroy(%struct.ic_symbol* %66, i32 1)
%122 = icmp eq i32 %121, 0
br i1 %122, label %123, label %125
123: ; preds = %120
%124 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
br label %125
125: ; preds = %120, %110, %87, %60, %47, %123, %118, %113, %108, %90, %85, %68, %63, %55, %50, %45, %40, %30, %24, %20, %16, %12, %8
%126 = phi %struct.ic_decl_type* [ null, %50 ], [ null, %45 ], [ null, %40 ], [ null, %63 ], [ null, %123 ], [ null, %118 ], [ null, %113 ], [ null, %108 ], [ null, %90 ], [ null, %85 ], [ null, %68 ], [ null, %55 ], [ null, %30 ], [ null, %24 ], [ null, %20 ], [ null, %16 ], [ null, %12 ], [ null, %8 ], [ %48, %47 ], [ %58, %60 ], [ null, %87 ], [ null, %110 ], [ %93, %120 ]
ret %struct.ic_decl_type* %126
}