// File: /workspace/github_c_makefile_star2_O0/gmcvicker[P]check_fastq/util.c
// Function: util_str_concat
char *util_str_concat(const char *str1, ...) {
  size_t ttl_len;
  char *next_str, *new_str;
  va_list args;
  
  if(str1 == NULL) {
    return NULL;
  }

  /* first pass through variable args: determine total size of str */
  va_start(args, str1);

  ttl_len = strlen(str1);

  while(1) {
    next_str = va_arg(args, char *);
    if(next_str == NULL) {
      /* end of args list */
      break;
    }
    ttl_len += strlen(next_str);
  }

  va_end(args);


  /* second pass through args: paste strings together */
  new_str = my_new(char, ttl_len + 1);
  
  strcpy(new_str, str1);
  ttl_len = strlen(str1);

  va_start(args, str1);
  while(1) {
    next_str = va_arg(args, char *);
    if(next_str == NULL) {
      break;
    }

    /* append next string to end of current str */
    strcpy(&new_str[ttl_len], next_str);

    ttl_len += strlen(next_str);
  }
  va_end(args);

  return new_str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
testb %al, %al
je 0x2cfb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rsi, -0xe8(%rbp)
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2d36
movq $0x0, -0x8(%rbp)
jmp 0x2ee5
leaq -0x40(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x10(%rbp), %rdi
callq 0x2150
movq %rax, -0x18(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x2da2
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x2dbf
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2dd6
jmp 0x2dec
movq -0x20(%rbp), %rdi
callq 0x2150
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2d67
leaq -0x40(%rbp), %rax
movq -0x18(%rbp), %rdi
shlq $0x0, %rdi
addq $0x1, %rdi
callq 0x4220
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2200
movq -0x10(%rbp), %rdi
callq 0x2150
movq %rax, -0x18(%rbp)
leaq -0x40(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq -0x40(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x10c(%rbp)
cmpl $0x28, %eax
ja 0x2e7e
movq -0x118(%rbp), %rcx
movl -0x10c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x120(%rbp)
jmp 0x2e9b
movq -0x118(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2eb2
jmp 0x2ed9
movq -0x28(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2200
movq -0x20(%rbp), %rdi
callq 0x2150
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2e43
leaq -0x40(%rbp), %rax
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)