#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);
char *charalloc(char *);
int /*<<< orphan*/ create_adrs_getelementptr(char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ get_irtype_llvm(char *, char *);
int /*<<< orphan*/ get_token_llvm(char *, char *);
int get_width(char *);
char *regalloc(char *);
int /*<<< orphan*/ register_call_signal_tree(char *, char *, int, int, int);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int create_verilog_call_args(char *name, char *args, char *buf, int is_call) {
  char *token;
  char *line;
  char *temp;
  char *type;
  int args_num = 0;
  char *str;
  int width;
  token = calloc(1024, 1);
  temp = calloc(1024, 1);
  type = calloc(1024, 1);
  line = charalloc(args);
  strcpy(buf, "");
  get_token_llvm(line, token);
  while (strlen(line) > 0) {
    get_irtype_llvm(line, token);
    if (!strcmp(token, "") || !strcmp(token, ")"))
      break;
    strcpy(type, token);
    {
      do {
        get_token_llvm(line, token);
        if (!strcmp(token, "align")) {
          get_token_llvm(line, token);
          get_token_llvm(line, token);
        }
      } while (!strcmp(token, "zeroext") || !strcmp(token, "signext") ||
               !strcmp(token, "inreg") || !strcmp(token, "byval") ||
               !strcmp(token, "sret") || !strcmp(token, "align") ||
               !strcmp(token, "noalias") || !strcmp(token, "nocapture") ||
               !strcmp(token, "nest") || !strcmp(token, "readonly") ||
               !strcmp(token, "readnone") || !strcmp(token, "returned") ||
               !strcmp(token, "dereferenceable") ||
               !strcmp(token, "dereferenceable_or_null"));
    }
    if (!strcmp(token, "getelementptr")) {
      sprintf(temp, "%s%s", token, line);
      free(line);
      line = calloc(strlen(temp) + 1, 1);
      strcpy(line, temp);
      get_irtype_llvm(line, token);
    }
    create_adrs_getelementptr(token, token);
    str = regalloc(token);
    sprintf(temp, "\t\t\t__call_%s_args_%d <= %s;\n", name, args_num, str);
    free(str);
    strcat(buf, temp);
    width = get_width(type);
    if (!is_call)
      register_call_signal_tree(name, "args", args_num, width, 1);
    args_num++;
    do {
      get_token_llvm(line, token);
    } while (strcmp(token, ",") && strcmp(token, ")"));
  }
  free(token);
  free(type);
  free(temp);
  free(line);
  return 0;
}


x86 assembly (clang, -O0):
<create_verilog_call_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x44(%rbp)
mov    $0x400,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x400,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x38(%rbp)
mov    $0x400,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
call   1100 <charalloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe63(%rip),%rsi
call   1050 <strcpy@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x30(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x0,%eax
jle    1641 <create_verilog_call_args+0x461>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1060 <get_irtype_llvm@plt>
mov    -0x28(%rbp),%rdi
lea    0xe27(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     12b4 <create_verilog_call_args+0xd4>
mov    -0x28(%rbp),%rdi
lea    0xd5b(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    12b9 <create_verilog_call_args+0xd9>
jmp    1641 <create_verilog_call_args+0x461>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <strcpy@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x28(%rbp),%rdi
lea    0xd24(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    1307 <create_verilog_call_args+0x127>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
jmp    130c <create_verilog_call_args+0x12c>
mov    -0x28(%rbp),%rdi
lea    0xcf1(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xcd7(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xcbd(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xca1(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xc85(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xc41(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xc46(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xc2c(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xc14(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xbf7(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xbde(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xbc5(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xbac(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x55(%rbp)
je     14e2 <create_verilog_call_args+0x302>
mov    -0x28(%rbp),%rdi
lea    0xb9a(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0x55(%rbp)
mov    -0x55(%rbp),%al
test   $0x1,%al
jne    12c6 <create_verilog_call_args+0xe6>
mov    -0x28(%rbp),%rdi
lea    0xb8b(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    1560 <create_verilog_call_args+0x380>
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xb77(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
mov    -0x30(%rbp),%rdi
call   1040 <free@plt>
mov    -0x38(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1050 <strcpy@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1060 <get_irtype_llvm@plt>
mov    -0x28(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10b0 <create_adrs_getelementptr@plt>
mov    -0x28(%rbp),%rdi
call   1030 <regalloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x44(%rbp),%ecx
mov    -0x50(%rbp),%r8
lea    0xb06(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
mov    -0x50(%rbp),%rdi
call   1040 <free@plt>
mov    -0x18(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   10e0 <strcat@plt>
mov    -0x40(%rbp),%rdi
call   10d0 <get_width@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    15df <create_verilog_call_args+0x3ff>
mov    -0x8(%rbp),%rdi
mov    -0x44(%rbp),%edx
mov    -0x54(%rbp),%ecx
lea    0xadf(%rip),%rsi
mov    $0x1,%r8d
call   10c0 <register_call_signal_tree@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x28(%rbp),%rdi
lea    0xab8(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x56(%rbp)
je     1631 <create_verilog_call_args+0x451>
mov    -0x28(%rbp),%rdi
lea    0x9de(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x56(%rbp)
mov    -0x56(%rbp),%al
test   $0x1,%al
jne    15e8 <create_verilog_call_args+0x408>
jmp    1261 <create_verilog_call_args+0x81>
mov    -0x28(%rbp),%rdi
call   1040 <free@plt>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
mov    -0x38(%rbp),%rdi
call   1040 <free@plt>
mov    -0x30(%rbp),%rdi
call   1040 <free@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_verilog_call_args>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %ecx,0x1c(%rsp)
mov    %rdx,%rbp
mov    %rsi,%r14
mov    %rdi,0x20(%rsp)
mov    $0x400,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,%rbx
mov    $0x400,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,0x8(%rsp)
mov    $0x400,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,0x10(%rsp)
mov    %r14,%rdi
call   1100 <charalloc@plt>
mov    %rax,%r15
lea    0xe69(%rip),%rsi
mov    %rbp,0x28(%rsp)
mov    %rbp,%rdi
call   1050 <strcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <get_token_llvm@plt>
mov    %r15,%rdi
call   1070 <strlen@plt>
test   %eax,%eax
jle    158c <create_verilog_call_args+0x3ac>
lea    0xd8a(%rip),%r13
lea    0xd89(%rip),%rbp
lea    0xd8a(%rip),%r14
lea    0xd8b(%rip),%r12
movl   $0x0,0x4(%rsp)
jmp    12b0 <create_verilog_call_args+0xd0>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1070 <strlen@plt>
test   %eax,%eax
jle    158c <create_verilog_call_args+0x3ac>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <get_irtype_llvm@plt>
mov    %rbx,%rdi
lea    0xded(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     158c <create_verilog_call_args+0x3ac>
mov    %rbx,%rdi
lea    0xd23(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     158c <create_verilog_call_args+0x3ac>
mov    0x10(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <get_token_llvm@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
jne    1331 <create_verilog_call_args+0x151>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <get_token_llvm@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <get_token_llvm@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
mov    %r14,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xcb3(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xca5(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc7e(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc6e(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc60(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc4d(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc3e(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc2f(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc20(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc18(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1300 <create_verilog_call_args+0x120>
mov    %rbx,%rdi
lea    0xc18(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
jne    14c8 <create_verilog_call_args+0x2e8>
mov    0x8(%rsp),%rdi
lea    0xc10(%rip),%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   10f0 <sprintf@plt>
mov    %r15,%rdi
call   1040 <free@plt>
mov    0x8(%rsp),%rdi
call   1070 <strlen@plt>
lea    0x1(%rax),%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    0x8(%rsp),%rsi
call   1050 <strcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <get_irtype_llvm@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   10b0 <create_adrs_getelementptr@plt>
mov    %rbx,%rdi
call   1030 <regalloc@plt>
mov    %rax,0x30(%rsp)
mov    0x8(%rsp),%rdi
lea    0xbaa(%rip),%rsi
mov    0x20(%rsp),%rdx
mov    0x4(%rsp),%ecx
mov    %rax,%r8
xor    %eax,%eax
call   10f0 <sprintf@plt>
mov    0x30(%rsp),%rdi
call   1040 <free@plt>
mov    0x28(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   10e0 <strcat@plt>
mov    0x10(%rsp),%rdi
call   10d0 <get_width@plt>
cmpl   $0x0,0x1c(%rsp)
jne    1546 <create_verilog_call_args+0x366>
mov    0x20(%rsp),%rdi
lea    0xb7e(%rip),%rsi
mov    0x4(%rsp),%edx
mov    %eax,%ecx
mov    $0x1,%r8d
call   10c0 <register_call_signal_tree@plt>
addl   $0x1,0x4(%rsp)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <get_token_llvm@plt>
mov    %rbx,%rdi
lea    0xb53(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     12a0 <create_verilog_call_args+0xc0>
mov    %rbx,%rdi
lea    0xa83(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
jne    1550 <create_verilog_call_args+0x370>
jmp    12a0 <create_verilog_call_args+0xc0>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    0x10(%rsp),%rdi
call   1040 <free@plt>
mov    0x8(%rsp),%rdi
call   1040 <free@plt>
mov    %r15,%rdi
call   1040 <free@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c")\00"
@.str.2 = [6 x i8] c"align\00"
@.str.3 = [8 x i8] c"zeroext\00"
@.str.4 = [8 x i8] c"signext\00"
@.str.5 = [6 x i8] c"inreg\00"
@.str.6 = [6 x i8] c"byval\00"
@.str.7 = [5 x i8] c"sret\00"
@.str.8 = [8 x i8] c"noalias\00"
@.str.9 = [10 x i8] c"nocapture\00"
@.str.10 = [5 x i8] c"nest\00"
@.str.11 = [9 x i8] c"readonly\00"
@.str.12 = [9 x i8] c"readnone\00"
@.str.13 = [9 x i8] c"returned\00"
@.str.14 = [16 x i8] c"dereferenceable\00"
@.str.15 = [24 x i8] c"dereferenceable_or_null\00"
@.str.16 = [14 x i8] c"getelementptr\00"
@.str.17 = [5 x i8] c"%s%s\00"
@.str.18 = [29 x i8] c"\09\09\09__call_%s_args_%d <= %s;\0A\00"
@.str.19 = [5 x i8] c"args\00"
@.str.20 = [2 x i8] c",\00"
define i32 @create_verilog_call_args(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
store i32 0, i32* %13
%16 = call i8* @calloc(i32 1024, i32 1)
store i8* %16, i8** %9
%17 = call i8* @calloc(i32 1024, i32 1)
store i8* %17, i8** %11
%18 = call i8* @calloc(i32 1024, i32 1)
store i8* %18, i8** %12
%19 = load i8*, i8** %6
%20 = call i8* @charalloc(i8* %19)
store i8* %20, i8** %10
%21 = load i8*, i8** %7
%22 = call i32 @strcpy(i8* %21, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%23 = load i8*, i8** %10
%24 = load i8*, i8** %9
%25 = call i32 @get_token_llvm(i8* %23, i8* %24)
br label %26
26: ; preds = %183, %4
%27 = load i8*, i8** %10
%28 = call i32 @strlen(i8* %27)
%29 = icmp sgt i32 %28, 0
br i1 %29, label %30, label %184
30: ; preds = %26
%31 = load i8*, i8** %10
%32 = load i8*, i8** %9
%33 = call i32 @get_irtype_llvm(i8* %31, i8* %32)
%34 = load i8*, i8** %9
%35 = call i64 @strcmp(i8* %34, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %41
37: ; preds = %30
%38 = load i8*, i8** %9
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp ne i64 %39, 0
br i1 %40, label %42, label %41
41: ; preds = %37, %30
br label %184
42: ; preds = %37
%43 = load i8*, i8** %12
%44 = load i8*, i8** %9
%45 = call i32 @strcpy(i8* %43, i8* %44)
br label %46
46: ; preds = %118, %42
%47 = load i8*, i8** %10
%48 = load i8*, i8** %9
%49 = call i32 @get_token_llvm(i8* %47, i8* %48)
%50 = load i8*, i8** %9
%51 = call i64 @strcmp(i8* %50, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%52 = icmp ne i64 %51, 0
br i1 %52, label %60, label %53
53: ; preds = %46
%54 = load i8*, i8** %10
%55 = load i8*, i8** %9
%56 = call i32 @get_token_llvm(i8* %54, i8* %55)
%57 = load i8*, i8** %10
%58 = load i8*, i8** %9
%59 = call i32 @get_token_llvm(i8* %57, i8* %58)
br label %60
60: ; preds = %53, %46
br label %61
61: ; preds = %60
%62 = load i8*, i8** %9
%63 = call i64 @strcmp(i8* %62, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%64 = icmp ne i64 %63, 0
br i1 %64, label %65, label %118
65: ; preds = %61
%66 = load i8*, i8** %9
%67 = call i64 @strcmp(i8* %66, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %118
69: ; preds = %65
%70 = load i8*, i8** %9
%71 = call i64 @strcmp(i8* %70, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %118
73: ; preds = %69
%74 = load i8*, i8** %9
%75 = call i64 @strcmp(i8* %74, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%76 = icmp ne i64 %75, 0
br i1 %76, label %77, label %118
77: ; preds = %73
%78 = load i8*, i8** %9
%79 = call i64 @strcmp(i8* %78, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %118
81: ; preds = %77
%82 = load i8*, i8** %9
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%84 = icmp ne i64 %83, 0
br i1 %84, label %85, label %118
85: ; preds = %81
%86 = load i8*, i8** %9
%87 = call i64 @strcmp(i8* %86, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %118
89: ; preds = %85
%90 = load i8*, i8** %9
%91 = call i64 @strcmp(i8* %90, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%92 = icmp ne i64 %91, 0
br i1 %92, label %93, label %118
93: ; preds = %89
%94 = load i8*, i8** %9
%95 = call i64 @strcmp(i8* %94, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%96 = icmp ne i64 %95, 0
br i1 %96, label %97, label %118
97: ; preds = %93
%98 = load i8*, i8** %9
%99 = call i64 @strcmp(i8* %98, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%100 = icmp ne i64 %99, 0
br i1 %100, label %101, label %118
101: ; preds = %97
%102 = load i8*, i8** %9
%103 = call i64 @strcmp(i8* %102, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%104 = icmp ne i64 %103, 0
br i1 %104, label %105, label %118
105: ; preds = %101
%106 = load i8*, i8** %9
%107 = call i64 @strcmp(i8* %106, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
%108 = icmp ne i64 %107, 0
br i1 %108, label %109, label %118
109: ; preds = %105
%110 = load i8*, i8** %9
%111 = call i64 @strcmp(i8* %110, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%112 = icmp ne i64 %111, 0
br i1 %112, label %113, label %118
113: ; preds = %109
%114 = load i8*, i8** %9
%115 = call i64 @strcmp(i8* %114, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%116 = icmp ne i64 %115, 0
%117 = xor i1 %116, true
br label %118
118: ; preds = %113, %109, %105, %101, %97, %93, %89, %85, %81, %77, %73, %69, %65, %61
%119 = phi i1 [ true, %109 ], [ true, %105 ], [ true, %101 ], [ true, %97 ], [ true, %93 ], [ true, %89 ], [ true, %85 ], [ true, %81 ], [ true, %77 ], [ true, %73 ], [ true, %69 ], [ true, %65 ], [ true, %61 ], [ %117, %113 ]
br i1 %119, label %46, label %120
120: ; preds = %118
%121 = load i8*, i8** %9
%122 = call i64 @strcmp(i8* %121, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0))
%123 = icmp ne i64 %122, 0
br i1 %123, label %141, label %124
124: ; preds = %120
%125 = load i8*, i8** %11
%126 = load i8*, i8** %9
%127 = load i8*, i8** %10
%128 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %125, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* %126, i8* %127)
%129 = load i8*, i8** %10
%130 = call i32 @free(i8* %129)
%131 = load i8*, i8** %11
%132 = call i32 @strlen(i8* %131)
%133 = add nsw i32 %132, 1
%134 = call i8* @calloc(i32 %133, i32 1)
store i8* %134, i8** %10
%135 = load i8*, i8** %10
%136 = load i8*, i8** %11
%137 = call i32 @strcpy(i8* %135, i8* %136)
%138 = load i8*, i8** %10
%139 = load i8*, i8** %9
%140 = call i32 @get_irtype_llvm(i8* %138, i8* %139)
br label %141
141: ; preds = %124, %120
%142 = load i8*, i8** %9
%143 = load i8*, i8** %9
%144 = call i32 @create_adrs_getelementptr(i8* %142, i8* %143)
%145 = load i8*, i8** %9
%146 = call i8* @regalloc(i8* %145)
store i8* %146, i8** %14
%147 = load i8*, i8** %11
%148 = load i8*, i8** %5
%149 = load i32, i32* %13
%150 = load i8*, i8** %14
%151 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %147, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0), i8* %148, i32 %149, i8* %150)
%152 = load i8*, i8** %14
%153 = call i32 @free(i8* %152)
%154 = load i8*, i8** %7
%155 = load i8*, i8** %11
%156 = call i32 @strcat(i8* %154, i8* %155)
%157 = load i8*, i8** %12
%158 = call i32 @get_width(i8* %157)
store i32 %158, i32* %15
%159 = load i32, i32* %8
%160 = icmp ne i32 %159, 0
br i1 %160, label %166, label %161
161: ; preds = %141
%162 = load i8*, i8** %5
%163 = load i32, i32* %13
%164 = load i32, i32* %15
%165 = call i32 @register_call_signal_tree(i8* %162, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i32 %163, i32 %164, i32 1)
br label %166
166: ; preds = %161, %141
%167 = load i32, i32* %13
%168 = add nsw i32 %167, 1
store i32 %168, i32* %13
br label %169
169: ; preds = %181, %166
%170 = load i8*, i8** %10
%171 = load i8*, i8** %9
%172 = call i32 @get_token_llvm(i8* %170, i8* %171)
br label %173
173: ; preds = %169
%174 = load i8*, i8** %9
%175 = call i64 @strcmp(i8* %174, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
%176 = icmp ne i64 %175, 0
br i1 %176, label %177, label %181
177: ; preds = %173
%178 = load i8*, i8** %9
%179 = call i64 @strcmp(i8* %178, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%180 = icmp ne i64 %179, 0
br label %181
181: ; preds = %177, %173
%182 = phi i1 [ false, %173 ], [ %180, %177 ]
br i1 %182, label %169, label %183
183: ; preds = %181
br label %26
184: ; preds = %41, %26
%185 = load i8*, i8** %9
%186 = call i32 @free(i8* %185)
%187 = load i8*, i8** %12
%188 = call i32 @free(i8* %187)
%189 = load i8*, i8** %11
%190 = call i32 @free(i8* %189)
%191 = load i8*, i8** %10
%192 = call i32 @free(i8* %191)
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c")\00"
@.str.2 = [6 x i8] c"align\00"
@.str.3 = [8 x i8] c"zeroext\00"
@.str.4 = [8 x i8] c"signext\00"
@.str.5 = [6 x i8] c"inreg\00"
@.str.6 = [6 x i8] c"byval\00"
@.str.7 = [5 x i8] c"sret\00"
@.str.8 = [8 x i8] c"noalias\00"
@.str.9 = [10 x i8] c"nocapture\00"
@.str.10 = [5 x i8] c"nest\00"
@.str.11 = [9 x i8] c"readonly\00"
@.str.12 = [9 x i8] c"readnone\00"
@.str.13 = [9 x i8] c"returned\00"
@.str.14 = [16 x i8] c"dereferenceable\00"
@.str.15 = [24 x i8] c"dereferenceable_or_null\00"
@.str.16 = [14 x i8] c"getelementptr\00"
@.str.17 = [5 x i8] c"%s%s\00"
@.str.18 = [29 x i8] c"\09\09\09__call_%s_args_%d <= %s;\0A\00"
@.str.19 = [5 x i8] c"args\00"
@.str.20 = [2 x i8] c",\00"
define i32 @create_verilog_call_args(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call dereferenceable_or_null(1024) i8* @calloc(i32 1024, i32 1)
%6 = tail call dereferenceable_or_null(1024) i8* @calloc(i32 1024, i32 1)
%7 = tail call dereferenceable_or_null(1024) i8* @calloc(i32 1024, i32 1)
%8 = tail call i8* @charalloc(i8* %1)
%9 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @get_token_llvm(i8* %8, i8* %5)
%11 = tail call i32 @strlen(i8* %8)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %109
13: ; preds = %4
%14 = icmp eq i32 %3, 0
br label %15
15: ; preds = %13, %106
%16 = phi i8* [ %8, %13 ], [ %88, %106 ]
%17 = phi i32 [ 0, %13 ], [ %98, %106 ]
%18 = tail call i32 @get_irtype_llvm(i8* %16, i8* %5)
%19 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %109, label %21
21: ; preds = %15
%22 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %109, label %24
24: ; preds = %21
%25 = tail call i32 @strcpy(i8* %7, i8* %5)
br label %26
26: ; preds = %75, %24
%27 = tail call i32 @get_token_llvm(i8* %16, i8* %5)
%28 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = tail call i32 @get_token_llvm(i8* %16, i8* %5)
%32 = tail call i32 @get_token_llvm(i8* %16, i8* %5)
br label %33
33: ; preds = %26, %30
%34 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %75, label %36
36: ; preds = %33
%37 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %75, label %39
39: ; preds = %36
%40 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %75, label %42
42: ; preds = %39
%43 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %75, label %45
45: ; preds = %42
%46 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %75, label %48
48: ; preds = %45
%49 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %75, label %51
51: ; preds = %48
%52 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %75, label %54
54: ; preds = %51
%55 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %75, label %57
57: ; preds = %54
%58 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %75, label %60
60: ; preds = %57
%61 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %75, label %63
63: ; preds = %60
%64 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %75, label %66
66: ; preds = %63
%67 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %75, label %69
69: ; preds = %66
%70 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%71 = icmp eq i64 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %69
%73 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %76
75: ; preds = %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33
br label %26
76: ; preds = %72
%77 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0))
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %87
79: ; preds = %76
%80 = tail call i32 (i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %6, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* %5, i8* %16)
%81 = tail call i32 @free(i8* %16)
%82 = tail call i32 @strlen(i8* %6)
%83 = add nsw i32 %82, 1
%84 = tail call i8* @calloc(i32 %83, i32 1)
%85 = tail call i32 @strcpy(i8* %84, i8* %6)
%86 = tail call i32 @get_irtype_llvm(i8* %84, i8* %5)
br label %87
87: ; preds = %79, %76
%88 = phi i8* [ %16, %76 ], [ %84, %79 ]
%89 = tail call i32 @create_adrs_getelementptr(i8* %5, i8* %5)
%90 = tail call i8* @regalloc(i8* %5)
%91 = tail call i32 (i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %6, i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0), i8* %0, i32 %17, i8* %90)
%92 = tail call i32 @free(i8* %90)
%93 = tail call i32 @strcat(i8* %2, i8* %6)
%94 = tail call i32 @get_width(i8* %7)
br i1 %14, label %95, label %97
95: ; preds = %87
%96 = tail call i32 @register_call_signal_tree(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i32 %17, i32 %94, i32 1)
br label %97
97: ; preds = %95, %87
%98 = add nuw nsw i32 %17, 1
br label %99
99: ; preds = %103, %97
%100 = tail call i32 @get_token_llvm(i8* %88, i8* %5)
%101 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
%102 = icmp eq i64 %101, 0
br i1 %102, label %106, label %103
103: ; preds = %99
%104 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %99
106: ; preds = %99, %103
%107 = tail call i32 @strlen(i8* %88)
%108 = icmp sgt i32 %107, 0
br i1 %108, label %15, label %109
109: ; preds = %106, %21, %15, %4
%110 = phi i8* [ %8, %4 ], [ %16, %15 ], [ %16, %21 ], [ %88, %106 ]
%111 = tail call i32 @free(i8* %5)
%112 = tail call i32 @free(i8* %7)
%113 = tail call i32 @free(i8* %6)
%114 = tail call i32 @free(i8* %110)
ret i32 0
}