#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 *asig(char *, char *);
int check_update_transitions(char *, char *);
char *concat(char *, char *);
char *construct_update(char *, char **, char *);
int /*<<< orphan*/ exec_nonquery(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *format_string(char *);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *upper(char *);
void update_task(char *filter, char *name, char *state, char *desc, char *notes,
                 char *est_start, char *est_end, char *start, char *end,
                 char *prior, char *type, char *est_time, char *time) {
  char *update = NULL;
  char *asig_name = NULL;
  char *asig_state = NULL;
  char *asig_desc = NULL;
  char *asig_notes = NULL;
  char *asig_est_start = NULL;
  char *asig_est_end = NULL;
  char *asig_start = NULL;
  char *asig_end = NULL;
  char *asig_prior = NULL;
  char *asig_type = NULL;
  char *asig_est_time = NULL;
  char *asig_time = NULL;
  char *f_name, *f_desc, *f_notes, *f_est_start, *f_est_end, *f_start, *f_end,
      *f_est_time, *f_time;
  char *f_state, *f_prior, *f_type;
  char *u_state, *u_prior, *u_type;
  char *concatDesc, *concatNotes;
  char *add_time;
  char *asignations[13];
  int i = 0;
  if (state != NULL) {
    int check = check_update_transitions(state, filter);
    if (!check) {
      printf("Invalid state transition\n");
      exit(0);
    }
  }
  if (name != NULL) {
    f_name = format_string(name);
    asig_name = asig("NOMBRE_TAREA", f_name);
    asignations[i] = asig_name;
    i++;
  }
  if (state != NULL) {
    f_state = format_string(state);
    u_state = upper(f_state);
    asig_state = asig("ESTADO_TAREA", u_state);
    asignations[i] = asig_state;
    i++;
  }
  if (desc != NULL) {
    f_desc = format_string(desc);
    concatDesc = concat("DESCRIPCION", f_desc);
    asig_desc = asig("DESCRIPCION", concatDesc);
    asignations[i] = asig_desc;
    i++;
  }
  if (notes != NULL) {
    f_notes = format_string(notes);
    concatNotes = concat("NOTAS", f_notes);
    asig_notes = asig("NOTAS", concatNotes);
    asignations[i] = asig_notes;
    i++;
  }
  if (est_start != NULL) {
    f_est_start = format_string(est_start);
    asig_est_start = asig("FECHA_INICIO_ESTIMADA", f_est_start);
    asignations[i] = asig_est_start;
    i++;
  }
  if (est_end != NULL) {
    f_est_end = format_string(est_end);
    asig_est_end = asig("FECHA_FINAL_ESTIMADA", f_est_end);
    asignations[i] = asig_est_end;
    i++;
  }
  if (start != NULL) {
    f_start = format_string(start);
    asig_start = asig("FECHA_INICIO_REAL", f_start);
    asignations[i] = asig_start;
    i++;
  }
  if (end != NULL) {
    f_end = format_string(end);
    asig_end = asig("FECHA_FINAL_REAL", f_end);
    asignations[i] = asig_end;
    i++;
  }
  if (prior != NULL) {
    f_prior = format_string(prior);
    u_prior = upper(f_prior);
    asig_prior = asig("PRIORIDAD_TAREA", u_prior);
    asignations[i] = asig_prior;
    i++;
  }
  if (type != NULL) {
    f_type = format_string(type);
    u_type = upper(f_type);
    asig_type = asig("TIPO_TAREA", u_type);
    asignations[i] = asig_type;
    i++;
  }
  if (est_time != NULL) {
    f_est_time = format_string(est_time);
    asig_est_time = asig("TIEMPO_ESTIMADO", f_est_time);
    asignations[i] = asig_est_time;
    i++;
  }
  if (time != NULL) {
    f_time = format_string(time);
    add_time = (char *)malloc(strlen("TIEMPO_REAL") + 1 + strlen(f_time) + 1);
    strcpy(add_time, "TIEMPO_REAL");
    strcat(add_time, "+");
    strcat(add_time, f_time);
    asig_time = asig("TIEMPO_REAL", add_time);
    asignations[i] = asig_time;
    i++;
  }
  asignations[i] = 0;
  update = construct_update("GP_TAREA", asignations, filter);
  exec_nonquery(update);
  free(update);
  if (name != NULL) {
    free(f_name);
  }
  if (state != NULL) {
    free(f_state);
    free(u_state);
  }
  if (desc != NULL) {
    free(f_desc);
    free(concatDesc);
  }
  if (notes != NULL) {
    free(f_notes);
    free(concatNotes);
  }
  if (est_start != NULL) {
    free(f_est_start);
  }
  if (est_end != NULL) {
    free(f_est_end);
  }
  if (start != NULL) {
    free(f_start);
  }
  if (end != NULL) {
    free(f_end);
  }
  if (prior != NULL) {
    free(f_prior);
    free(u_prior);
  }
  if (type != NULL) {
    free(f_type);
    free(u_type);
  }
  if (est_time != NULL) {
    free(f_est_time);
  }
  if (time != NULL) {
    free(f_time);
    free(add_time);
  }
  printf("+ Tasks updated successfully\n");
}


x86 assembly (clang, -O0):
<update_task>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
movq   $0x0,-0x68(%rbp)
movq   $0x0,-0x70(%rbp)
movq   $0x0,-0x78(%rbp)
movq   $0x0,-0x80(%rbp)
movq   $0x0,-0x88(%rbp)
movq   $0x0,-0x90(%rbp)
movq   $0x0,-0x98(%rbp)
movl   $0x0,-0x194(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     12dd <update_task+0xfd>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   10c0 <check_update_transitions@plt>
mov    %eax,-0x198(%rbp)
cmpl   $0x0,-0x198(%rbp)
jne    12d8 <update_task+0xf8>
lea    0xd34(%rip),%rdi
call   1070 <printf@plt>
xor    %edi,%edi
call   1100 <exit@plt>
jmp    12dd <update_task+0xfd>
cmpq   $0x0,-0x10(%rbp)
je     1331 <update_task+0x151>
mov    -0x10(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rsi
lea    0xd14(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1398 <update_task+0x1b8>
mov    -0x18(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rdi
call   10d0 <upper@plt>
mov    %rax,-0x100(%rbp)
mov    -0x100(%rbp),%rsi
lea    0xcba(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1406 <update_task+0x226>
mov    -0x20(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rsi
lea    0xc73(%rip),%rdi
call   1080 <concat@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rsi
lea    0xc59(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1474 <update_task+0x294>
mov    -0x28(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rsi
lea    0xc11(%rip),%rdi
call   1080 <concat@plt>
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rsi
lea    0xbf7(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     14c8 <update_task+0x2e8>
mov    -0x30(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rsi
lea    0xba9(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,0x10(%rbp)
je     151c <update_task+0x33c>
mov    0x10(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rsi
lea    0xb6b(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,0x18(%rbp)
je     1570 <update_task+0x390>
mov    0x18(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rsi
lea    0xb2c(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,0x20(%rbp)
je     15c4 <update_task+0x3e4>
mov    0x20(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rsi
lea    0xaea(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,0x28(%rbp)
je     162b <update_task+0x44b>
mov    0x28(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
call   10d0 <upper@plt>
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rsi
lea    0xa94(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,0x30(%rbp)
je     1698 <update_task+0x4b8>
mov    0x30(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rdi
call   10d0 <upper@plt>
mov    %rax,-0x110(%rbp)
mov    -0x110(%rbp),%rsi
lea    0xa3d(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,0x38(%rbp)
je     16f2 <update_task+0x512>
mov    0x38(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rsi
lea    0x9ee(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpq   $0x0,0x40(%rbp)
je     17c2 <update_task+0x5e2>
mov    0x40(%rbp),%rdi
call   10b0 <format_string@plt>
mov    %rax,-0xe0(%rbp)
lea    0x9ab(%rip),%rdi
call   1060 <strlen@plt>
add    $0x1,%rax
mov    %rax,-0x1a0(%rbp)
mov    -0xe0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x1a0(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rdi
lea    0x967(%rip),%rsi
call   1050 <strcpy@plt>
mov    -0x128(%rbp),%rdi
lea    0x960(%rip),%rsi
call   10f0 <strcat@plt>
mov    -0x128(%rbp),%rdi
mov    -0xe0(%rbp),%rsi
call   10f0 <strcat@plt>
mov    -0x128(%rbp),%rsi
lea    0x92e(%rip),%rdi
call   1040 <asig@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rcx
movslq -0x194(%rbp),%rax
mov    %rcx,-0x190(%rbp,%rax,8)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
movslq -0x194(%rbp),%rax
movq   $0x0,-0x190(%rbp,%rax,8)
lea    -0x190(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0x8e6(%rip),%rdi
call   10e0 <construct_update@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   10a0 <exec_nonquery@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
je     1819 <update_task+0x639>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x18(%rbp)
je     183c <update_task+0x65c>
mov    -0xe8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x100(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x20(%rbp)
je     185f <update_task+0x67f>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x118(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x28(%rbp)
je     1882 <update_task+0x6a2>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x120(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x30(%rbp)
je     1899 <update_task+0x6b9>
mov    -0xb8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x10(%rbp)
je     18b0 <update_task+0x6d0>
mov    -0xc0(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x18(%rbp)
je     18c7 <update_task+0x6e7>
mov    -0xc8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x20(%rbp)
je     18de <update_task+0x6fe>
mov    -0xd0(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x28(%rbp)
je     1901 <update_task+0x721>
mov    -0xf0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x108(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x30(%rbp)
je     1924 <update_task+0x744>
mov    -0xf8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x110(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x38(%rbp)
je     193b <update_task+0x75b>
mov    -0xd8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x40(%rbp)
je     195e <update_task+0x77e>
mov    -0xe0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x128(%rbp),%rdi
call   1030 <free@plt>
lea    0x771(%rip),%rdi
call   1070 <printf@plt>
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_task>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %r9,%r15
mov    %r8,%r12
mov    %rcx,%r13
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rbp
test   %rdx,%rdx
je     121b <update_task+0x3b>
mov    %r14,%rdi
mov    %rbp,%rsi
call   10c0 <check_update_transitions@plt>
test   %eax,%eax
je     16ef <update_task+0x50f>
test   %rbx,%rbx
mov    %rbx,0x90(%rsp)
je     1291 <update_task+0xb1>
mov    %rbx,%rdi
call   10b0 <format_string@plt>
lea    0xdc9(%rip),%rdi
mov    %rax,0x80(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %rax,0xa0(%rsp)
mov    $0x1,%ebx
test   %r14,%r14
je     1298 <update_task+0xb8>
mov    %r14,%rdi
call   10b0 <format_string@plt>
mov    %rax,0x78(%rsp)
mov    %rax,%rdi
call   10d0 <upper@plt>
lea    0xd98(%rip),%rdi
mov    %rax,0x70(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
add    $0x1,%ebx
jmp    1298 <update_task+0xb8>
xor    %ebx,%ebx
test   %r14,%r14
jne    1259 <update_task+0x79>
mov    %rbp,0x88(%rsp)
test   %r13,%r13
je     1324 <update_task+0x144>
mov    %r13,%rdi
call   10b0 <format_string@plt>
lea    0xd66(%rip),%rbp
mov    %rbp,%rdi
mov    %rax,0x68(%rsp)
mov    %rax,%rsi
call   1080 <concat@plt>
mov    %rbp,%rdi
mov    %rax,0x60(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
add    $0x1,%ebx
test   %r12,%r12
je     1329 <update_task+0x149>
mov    %r12,%rdi
call   10b0 <format_string@plt>
lea    0xd31(%rip),%rbp
mov    %rbp,%rdi
mov    %rax,0x58(%rsp)
mov    %rax,%rsi
call   1080 <concat@plt>
mov    %rbp,%rdi
mov    %rax,0x50(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
add    $0x1,%ebx
jmp    1329 <update_task+0x149>
test   %r12,%r12
jne    12e6 <update_task+0x106>
mov    0x140(%rsp),%rbp
test   %r15,%r15
je     1361 <update_task+0x181>
mov    %r15,%rdi
call   10b0 <format_string@plt>
lea    0xce7(%rip),%rdi
mov    %rax,0x48(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
add    $0x1,%ebx
jmp    1361 <update_task+0x181>
mov    0x148(%rsp),%rdx
test   %rbp,%rbp
je     13a1 <update_task+0x1c1>
mov    %rbp,%rdi
call   10b0 <format_string@plt>
lea    0xcc5(%rip),%rdi
mov    %rax,0x40(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    0x148(%rsp),%rdx
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
add    $0x1,%ebx
jmp    13a1 <update_task+0x1c1>
mov    0x150(%rsp),%rdi
test   %rdx,%rdx
je     13e1 <update_task+0x201>
mov    %rdx,%rdi
call   10b0 <format_string@plt>
lea    0xc9a(%rip),%rdi
mov    %rax,0x38(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
mov    0x150(%rsp),%rdi
add    $0x1,%ebx
jmp    13e1 <update_task+0x201>
mov    0x158(%rsp),%rax
test   %rdi,%rdi
je     141e <update_task+0x23e>
call   10b0 <format_string@plt>
lea    0xc6f(%rip),%rdi
mov    %rax,0x30(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
mov    0x158(%rsp),%rax
add    $0x1,%ebx
jmp    141e <update_task+0x23e>
mov    0x160(%rsp),%rdx
test   %rax,%rax
je     146b <update_task+0x28b>
mov    %rax,%rdi
call   10b0 <format_string@plt>
mov    %rax,0x28(%rsp)
mov    %rax,%rdi
call   10d0 <upper@plt>
lea    0xc33(%rip),%rdi
mov    %rax,0x20(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    0x160(%rsp),%rdx
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
add    $0x1,%ebx
jmp    146b <update_task+0x28b>
mov    0x168(%rsp),%rdi
test   %rdx,%rdx
je     14b8 <update_task+0x2d8>
mov    %rdx,%rdi
call   10b0 <format_string@plt>
mov    %rax,0x18(%rsp)
mov    %rax,%rdi
call   10d0 <upper@plt>
lea    0xbf6(%rip),%rdi
mov    %rax,0x10(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
mov    0x168(%rsp),%rdi
add    $0x1,%ebx
jmp    14b8 <update_task+0x2d8>
mov    0x170(%rsp),%rax
test   %rdi,%rdi
je     14f5 <update_task+0x315>
call   10b0 <format_string@plt>
lea    0xbc4(%rip),%rdi
mov    %rax,0x8(%rsp)
mov    %rax,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
mov    0x170(%rsp),%rax
add    $0x1,%ebx
jmp    14f5 <update_task+0x315>
mov    %r14,0x98(%rsp)
test   %rax,%rax
je     1574 <update_task+0x394>
mov    %rax,%rdi
call   10b0 <format_string@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1070 <strlen@plt>
lea    0xd(%rax),%rdi
call   1090 <malloc@plt>
mov    %rax,%r14
lea    0xb7d(%rip),%rsi
mov    %rax,%rdi
call   1050 <strcpy@plt>
lea    0xb7a(%rip),%rsi
mov    %r14,%rdi
call   10f0 <strcat@plt>
mov    %r14,%rdi
mov    %rbp,(%rsp)
mov    %rbp,%rsi
call   10f0 <strcat@plt>
lea    0xb50(%rip),%rdi
mov    0x140(%rsp),%rbp
mov    %r14,%rsi
call   1040 <asig@plt>
mov    %ebx,%ecx
mov    %rax,0xa0(%rsp,%rcx,8)
add    $0x1,%ebx
jmp    1574 <update_task+0x394>
mov    %ebx,%eax
movq   $0x0,0xa0(%rsp,%rax,8)
lea    0xb2a(%rip),%rdi
lea    0xa0(%rsp),%rsi
mov    0x88(%rsp),%rdx
call   10e0 <construct_update@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   10a0 <exec_nonquery@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
cmpq   $0x0,0x90(%rsp)
je     15c9 <update_task+0x3e9>
mov    0x80(%rsp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x98(%rsp)
je     15e8 <update_task+0x408>
mov    0x78(%rsp),%rdi
call   1030 <free@plt>
mov    0x70(%rsp),%rdi
call   1030 <free@plt>
test   %r13,%r13
je     1601 <update_task+0x421>
mov    0x68(%rsp),%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rdi
call   1030 <free@plt>
test   %r12,%r12
je     161a <update_task+0x43a>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
test   %r15,%r15
je     1629 <update_task+0x449>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
test   %rbp,%rbp
je     1638 <update_task+0x458>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x148(%rsp)
je     164d <update_task+0x46d>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x150(%rsp)
je     1662 <update_task+0x482>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x158(%rsp)
je     1681 <update_task+0x4a1>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x160(%rsp)
je     16a0 <update_task+0x4c0>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x168(%rsp)
je     16b5 <update_task+0x4d5>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x170(%rsp)
je     16d1 <update_task+0x4f1>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
lea    0x9e4(%rip),%rdi
call   1060 <puts@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x9e3(%rip),%rdi
call   1060 <puts@plt>
xor    %edi,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Invalid state transition\0A\00"
@.str.1 = [13 x i8] c"NOMBRE_TAREA\00"
@.str.2 = [13 x i8] c"ESTADO_TAREA\00"
@.str.3 = [12 x i8] c"DESCRIPCION\00"
@.str.4 = [6 x i8] c"NOTAS\00"
@.str.5 = [22 x i8] c"FECHA_INICIO_ESTIMADA\00"
@.str.6 = [21 x i8] c"FECHA_FINAL_ESTIMADA\00"
@.str.7 = [18 x i8] c"FECHA_INICIO_REAL\00"
@.str.8 = [17 x i8] c"FECHA_FINAL_REAL\00"
@.str.9 = [16 x i8] c"PRIORIDAD_TAREA\00"
@.str.10 = [11 x i8] c"TIPO_TAREA\00"
@.str.11 = [16 x i8] c"TIEMPO_ESTIMADO\00"
@.str.12 = [12 x i8] c"TIEMPO_REAL\00"
@.str.13 = [2 x i8] c"+\00"
@.str.14 = [9 x i8] c"GP_TAREA\00"
@.str.15 = [30 x i8] c"+ Tasks updated successfully\0A\00"
define void @update_task(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i8* %10, i8* %11, i8* %12) {
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca i8*
%24 = alloca i8*
%25 = alloca i8*
%26 = alloca i8*
%27 = alloca i8*
%28 = alloca i8*
%29 = alloca i8*
%30 = alloca i8*
%31 = alloca i8*
%32 = alloca i8*
%33 = alloca i8*
%34 = alloca i8*
%35 = alloca i8*
%36 = alloca i8*
%37 = alloca i8*
%38 = alloca i8*
%39 = alloca i8*
%40 = alloca i8*
%41 = alloca i8*
%42 = alloca i8*
%43 = alloca i8*
%44 = alloca i8*
%45 = alloca i8*
%46 = alloca i8*
%47 = alloca i8*
%48 = alloca i8*
%49 = alloca i8*
%50 = alloca i8*
%51 = alloca i8*
%52 = alloca i8*
%53 = alloca i8*
%54 = alloca i8*
%55 = alloca i8*
%56 = alloca i8*
%57 = alloca i8*
%58 = alloca [13 x i8*]
%59 = alloca i32
%60 = alloca i32
store i8* %0, i8** %14
store i8* %1, i8** %15
store i8* %2, i8** %16
store i8* %3, i8** %17
store i8* %4, i8** %18
store i8* %5, i8** %19
store i8* %6, i8** %20
store i8* %7, i8** %21
store i8* %8, i8** %22
store i8* %9, i8** %23
store i8* %10, i8** %24
store i8* %11, i8** %25
store i8* %12, i8** %26
store i8* null, i8** %27
store i8* null, i8** %28
store i8* null, i8** %29
store i8* null, i8** %30
store i8* null, i8** %31
store i8* null, i8** %32
store i8* null, i8** %33
store i8* null, i8** %34
store i8* null, i8** %35
store i8* null, i8** %36
store i8* null, i8** %37
store i8* null, i8** %38
store i8* null, i8** %39
store i32 0, i32* %59
%61 = load i8*, i8** %16
%62 = icmp ne i8* %61, null
br i1 %62, label %63, label %73
63: ; preds = %13
%64 = load i8*, i8** %16
%65 = load i8*, i8** %14
%66 = call i32 @check_update_transitions(i8* %64, i8* %65)
store i32 %66, i32* %60
%67 = load i32, i32* %60
%68 = icmp ne i32 %67, 0
br i1 %68, label %72, label %69
69: ; preds = %63
%70 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%71 = call i32 @exit(i32 0)
unreachable
72: ; preds = %63
br label %73
73: ; preds = %72, %13
%74 = load i8*, i8** %15
%75 = icmp ne i8* %74, null
br i1 %75, label %76, label %87
76: ; preds = %73
%77 = load i8*, i8** %15
%78 = call i8* @format_string(i8* %77)
store i8* %78, i8** %40
%79 = load i8*, i8** %40
%80 = call i8* @asig(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %79)
store i8* %80, i8** %28
%81 = load i8*, i8** %28
%82 = load i32, i32* %59
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %83
store i8* %81, i8** %84
%85 = load i32, i32* %59
%86 = add nsw i32 %85, 1
store i32 %86, i32* %59
br label %87
87: ; preds = %76, %73
%88 = load i8*, i8** %16
%89 = icmp ne i8* %88, null
br i1 %89, label %90, label %103
90: ; preds = %87
%91 = load i8*, i8** %16
%92 = call i8* @format_string(i8* %91)
store i8* %92, i8** %49
%93 = load i8*, i8** %49
%94 = call i8* @upper(i8* %93)
store i8* %94, i8** %52
%95 = load i8*, i8** %52
%96 = call i8* @asig(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %95)
store i8* %96, i8** %29
%97 = load i8*, i8** %29
%98 = load i32, i32* %59
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %99
store i8* %97, i8** %100
%101 = load i32, i32* %59
%102 = add nsw i32 %101, 1
store i32 %102, i32* %59
br label %103
103: ; preds = %90, %87
%104 = load i8*, i8** %17
%105 = icmp ne i8* %104, null
br i1 %105, label %106, label %119
106: ; preds = %103
%107 = load i8*, i8** %17
%108 = call i8* @format_string(i8* %107)
store i8* %108, i8** %41
%109 = load i8*, i8** %41
%110 = call i8* @concat(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %109)
store i8* %110, i8** %55
%111 = load i8*, i8** %55
%112 = call i8* @asig(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %111)
store i8* %112, i8** %30
%113 = load i8*, i8** %30
%114 = load i32, i32* %59
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %115
store i8* %113, i8** %116
%117 = load i32, i32* %59
%118 = add nsw i32 %117, 1
store i32 %118, i32* %59
br label %119
119: ; preds = %106, %103
%120 = load i8*, i8** %18
%121 = icmp ne i8* %120, null
br i1 %121, label %122, label %135
122: ; preds = %119
%123 = load i8*, i8** %18
%124 = call i8* @format_string(i8* %123)
store i8* %124, i8** %42
%125 = load i8*, i8** %42
%126 = call i8* @concat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %125)
store i8* %126, i8** %56
%127 = load i8*, i8** %56
%128 = call i8* @asig(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %127)
store i8* %128, i8** %31
%129 = load i8*, i8** %31
%130 = load i32, i32* %59
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %131
store i8* %129, i8** %132
%133 = load i32, i32* %59
%134 = add nsw i32 %133, 1
store i32 %134, i32* %59
br label %135
135: ; preds = %122, %119
%136 = load i8*, i8** %19
%137 = icmp ne i8* %136, null
br i1 %137, label %138, label %149
138: ; preds = %135
%139 = load i8*, i8** %19
%140 = call i8* @format_string(i8* %139)
store i8* %140, i8** %43
%141 = load i8*, i8** %43
%142 = call i8* @asig(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* %141)
store i8* %142, i8** %32
%143 = load i8*, i8** %32
%144 = load i32, i32* %59
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %145
store i8* %143, i8** %146
%147 = load i32, i32* %59
%148 = add nsw i32 %147, 1
store i32 %148, i32* %59
br label %149
149: ; preds = %138, %135
%150 = load i8*, i8** %20
%151 = icmp ne i8* %150, null
br i1 %151, label %152, label %163
152: ; preds = %149
%153 = load i8*, i8** %20
%154 = call i8* @format_string(i8* %153)
store i8* %154, i8** %44
%155 = load i8*, i8** %44
%156 = call i8* @asig(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %155)
store i8* %156, i8** %33
%157 = load i8*, i8** %33
%158 = load i32, i32* %59
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %159
store i8* %157, i8** %160
%161 = load i32, i32* %59
%162 = add nsw i32 %161, 1
store i32 %162, i32* %59
br label %163
163: ; preds = %152, %149
%164 = load i8*, i8** %21
%165 = icmp ne i8* %164, null
br i1 %165, label %166, label %177
166: ; preds = %163
%167 = load i8*, i8** %21
%168 = call i8* @format_string(i8* %167)
store i8* %168, i8** %45
%169 = load i8*, i8** %45
%170 = call i8* @asig(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* %169)
store i8* %170, i8** %34
%171 = load i8*, i8** %34
%172 = load i32, i32* %59
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %173
store i8* %171, i8** %174
%175 = load i32, i32* %59
%176 = add nsw i32 %175, 1
store i32 %176, i32* %59
br label %177
177: ; preds = %166, %163
%178 = load i8*, i8** %22
%179 = icmp ne i8* %178, null
br i1 %179, label %180, label %191
180: ; preds = %177
%181 = load i8*, i8** %22
%182 = call i8* @format_string(i8* %181)
store i8* %182, i8** %46
%183 = load i8*, i8** %46
%184 = call i8* @asig(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %183)
store i8* %184, i8** %35
%185 = load i8*, i8** %35
%186 = load i32, i32* %59
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %187
store i8* %185, i8** %188
%189 = load i32, i32* %59
%190 = add nsw i32 %189, 1
store i32 %190, i32* %59
br label %191
191: ; preds = %180, %177
%192 = load i8*, i8** %23
%193 = icmp ne i8* %192, null
br i1 %193, label %194, label %207
194: ; preds = %191
%195 = load i8*, i8** %23
%196 = call i8* @format_string(i8* %195)
store i8* %196, i8** %50
%197 = load i8*, i8** %50
%198 = call i8* @upper(i8* %197)
store i8* %198, i8** %53
%199 = load i8*, i8** %53
%200 = call i8* @asig(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i8* %199)
store i8* %200, i8** %36
%201 = load i8*, i8** %36
%202 = load i32, i32* %59
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %203
store i8* %201, i8** %204
%205 = load i32, i32* %59
%206 = add nsw i32 %205, 1
store i32 %206, i32* %59
br label %207
207: ; preds = %194, %191
%208 = load i8*, i8** %24
%209 = icmp ne i8* %208, null
br i1 %209, label %210, label %223
210: ; preds = %207
%211 = load i8*, i8** %24
%212 = call i8* @format_string(i8* %211)
store i8* %212, i8** %51
%213 = load i8*, i8** %51
%214 = call i8* @upper(i8* %213)
store i8* %214, i8** %54
%215 = load i8*, i8** %54
%216 = call i8* @asig(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* %215)
store i8* %216, i8** %37
%217 = load i8*, i8** %37
%218 = load i32, i32* %59
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %219
store i8* %217, i8** %220
%221 = load i32, i32* %59
%222 = add nsw i32 %221, 1
store i32 %222, i32* %59
br label %223
223: ; preds = %210, %207
%224 = load i8*, i8** %25
%225 = icmp ne i8* %224, null
br i1 %225, label %226, label %237
226: ; preds = %223
%227 = load i8*, i8** %25
%228 = call i8* @format_string(i8* %227)
store i8* %228, i8** %47
%229 = load i8*, i8** %47
%230 = call i8* @asig(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8* %229)
store i8* %230, i8** %38
%231 = load i8*, i8** %38
%232 = load i32, i32* %59
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %233
store i8* %231, i8** %234
%235 = load i32, i32* %59
%236 = add nsw i32 %235, 1
store i32 %236, i32* %59
br label %237
237: ; preds = %226, %223
%238 = load i8*, i8** %26
%239 = icmp ne i8* %238, null
br i1 %239, label %240, label %266
240: ; preds = %237
%241 = load i8*, i8** %26
%242 = call i8* @format_string(i8* %241)
store i8* %242, i8** %48
%243 = call i64 @strlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
%244 = add nsw i64 %243, 1
%245 = load i8*, i8** %48
%246 = call i64 @strlen(i8* %245)
%247 = add nsw i64 %244, %246
%248 = add nsw i64 %247, 1
%249 = call i64 @malloc(i64 %248)
%250 = inttoptr i64 %249 to i8*
store i8* %250, i8** %57
%251 = load i8*, i8** %57
%252 = call i32 @strcpy(i8* %251, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
%253 = load i8*, i8** %57
%254 = call i32 @strcat(i8* %253, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%255 = load i8*, i8** %57
%256 = load i8*, i8** %48
%257 = call i32 @strcat(i8* %255, i8* %256)
%258 = load i8*, i8** %57
%259 = call i8* @asig(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i8* %258)
store i8* %259, i8** %39
%260 = load i8*, i8** %39
%261 = load i32, i32* %59
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %262
store i8* %260, i8** %263
%264 = load i32, i32* %59
%265 = add nsw i32 %264, 1
store i32 %265, i32* %59
br label %266
266: ; preds = %240, %237
%267 = load i32, i32* %59
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 %268
store i8* null, i8** %269
%270 = getelementptr inbounds [13 x i8*], [13 x i8*]* %58, i64 0, i64 0
%271 = load i8*, i8** %14
%272 = call i8* @construct_update(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8** %270, i8* %271)
store i8* %272, i8** %27
%273 = load i8*, i8** %27
%274 = call i32 @exec_nonquery(i8* %273)
%275 = load i8*, i8** %27
%276 = call i32 @free(i8* %275)
%277 = load i8*, i8** %15
%278 = icmp ne i8* %277, null
br i1 %278, label %279, label %282
279: ; preds = %266
%280 = load i8*, i8** %40
%281 = call i32 @free(i8* %280)
br label %282
282: ; preds = %279, %266
%283 = load i8*, i8** %16
%284 = icmp ne i8* %283, null
br i1 %284, label %285, label %290
285: ; preds = %282
%286 = load i8*, i8** %49
%287 = call i32 @free(i8* %286)
%288 = load i8*, i8** %52
%289 = call i32 @free(i8* %288)
br label %290
290: ; preds = %285, %282
%291 = load i8*, i8** %17
%292 = icmp ne i8* %291, null
br i1 %292, label %293, label %298
293: ; preds = %290
%294 = load i8*, i8** %41
%295 = call i32 @free(i8* %294)
%296 = load i8*, i8** %55
%297 = call i32 @free(i8* %296)
br label %298
298: ; preds = %293, %290
%299 = load i8*, i8** %18
%300 = icmp ne i8* %299, null
br i1 %300, label %301, label %306
301: ; preds = %298
%302 = load i8*, i8** %42
%303 = call i32 @free(i8* %302)
%304 = load i8*, i8** %56
%305 = call i32 @free(i8* %304)
br label %306
306: ; preds = %301, %298
%307 = load i8*, i8** %19
%308 = icmp ne i8* %307, null
br i1 %308, label %309, label %312
309: ; preds = %306
%310 = load i8*, i8** %43
%311 = call i32 @free(i8* %310)
br label %312
312: ; preds = %309, %306
%313 = load i8*, i8** %20
%314 = icmp ne i8* %313, null
br i1 %314, label %315, label %318
315: ; preds = %312
%316 = load i8*, i8** %44
%317 = call i32 @free(i8* %316)
br label %318
318: ; preds = %315, %312
%319 = load i8*, i8** %21
%320 = icmp ne i8* %319, null
br i1 %320, label %321, label %324
321: ; preds = %318
%322 = load i8*, i8** %45
%323 = call i32 @free(i8* %322)
br label %324
324: ; preds = %321, %318
%325 = load i8*, i8** %22
%326 = icmp ne i8* %325, null
br i1 %326, label %327, label %330
327: ; preds = %324
%328 = load i8*, i8** %46
%329 = call i32 @free(i8* %328)
br label %330
330: ; preds = %327, %324
%331 = load i8*, i8** %23
%332 = icmp ne i8* %331, null
br i1 %332, label %333, label %338
333: ; preds = %330
%334 = load i8*, i8** %50
%335 = call i32 @free(i8* %334)
%336 = load i8*, i8** %53
%337 = call i32 @free(i8* %336)
br label %338
338: ; preds = %333, %330
%339 = load i8*, i8** %24
%340 = icmp ne i8* %339, null
br i1 %340, label %341, label %346
341: ; preds = %338
%342 = load i8*, i8** %51
%343 = call i32 @free(i8* %342)
%344 = load i8*, i8** %54
%345 = call i32 @free(i8* %344)
br label %346
346: ; preds = %341, %338
%347 = load i8*, i8** %25
%348 = icmp ne i8* %347, null
br i1 %348, label %349, label %352
349: ; preds = %346
%350 = load i8*, i8** %47
%351 = call i32 @free(i8* %350)
br label %352
352: ; preds = %349, %346
%353 = load i8*, i8** %26
%354 = icmp ne i8* %353, null
br i1 %354, label %355, label %360
355: ; preds = %352
%356 = load i8*, i8** %48
%357 = call i32 @free(i8* %356)
%358 = load i8*, i8** %57
%359 = call i32 @free(i8* %358)
br label %360
360: ; preds = %355, %352
%361 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"NOMBRE_TAREA\00"
@.str.2 = [13 x i8] c"ESTADO_TAREA\00"
@.str.3 = [12 x i8] c"DESCRIPCION\00"
@.str.4 = [6 x i8] c"NOTAS\00"
@.str.5 = [22 x i8] c"FECHA_INICIO_ESTIMADA\00"
@.str.6 = [21 x i8] c"FECHA_FINAL_ESTIMADA\00"
@.str.7 = [18 x i8] c"FECHA_INICIO_REAL\00"
@.str.8 = [17 x i8] c"FECHA_FINAL_REAL\00"
@.str.9 = [16 x i8] c"PRIORIDAD_TAREA\00"
@.str.10 = [11 x i8] c"TIPO_TAREA\00"
@.str.11 = [16 x i8] c"TIEMPO_ESTIMADO\00"
@.str.12 = [12 x i8] c"TIEMPO_REAL\00"
@.str.13 = [2 x i8] c"+\00"
@.str.14 = [9 x i8] c"GP_TAREA\00"
@str = [29 x i8] c"+ Tasks updated successfully\00"
@str.16 = [25 x i8] c"Invalid state transition\00"
define void @update_task(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i8* %10, i8* %11, i8* %12) {
%14 = alloca [13 x i8*]
%15 = bitcast [13 x i8*]* %14 to i8*
%16 = icmp eq i8* %2, null
br i1 %16, label %23, label %17
17: ; preds = %13
%18 = tail call i32 @check_update_transitions(i8* %2, i8* %0)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.16, i64 0, i64 0))
%22 = tail call i32 @exit(i32 0)
unreachable
23: ; preds = %17, %13
%24 = icmp eq i8* %1, null
br i1 %24, label %29, label %25
25: ; preds = %23
%26 = tail call i8* @format_string(i8* %1)
%27 = tail call i8* @asig(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 0
store i8* %27, i8** %28
br label %29
29: ; preds = %25, %23
%30 = phi i8* [ %26, %25 ], [ undef, %23 ]
%31 = phi i32 [ 1, %25 ], [ 0, %23 ]
br i1 %16, label %39, label %32
32: ; preds = %29
%33 = tail call i8* @format_string(i8* %2)
%34 = tail call i8* @upper(i8* %33)
%35 = tail call i8* @asig(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %34)
%36 = zext i32 %31 to i64
%37 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %36
store i8* %35, i8** %37
%38 = add nuw nsw i32 %31, 1
br label %39
39: ; preds = %32, %29
%40 = phi i8* [ %33, %32 ], [ undef, %29 ]
%41 = phi i8* [ %34, %32 ], [ undef, %29 ]
%42 = phi i32 [ %38, %32 ], [ %31, %29 ]
%43 = icmp eq i8* %3, null
br i1 %43, label %51, label %44
44: ; preds = %39
%45 = tail call i8* @format_string(i8* %3)
%46 = tail call i8* @concat(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %45)
%47 = tail call i8* @asig(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %46)
%48 = zext i32 %42 to i64
%49 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %48
store i8* %47, i8** %49
%50 = add nuw nsw i32 %42, 1
br label %51
51: ; preds = %44, %39
%52 = phi i8* [ %45, %44 ], [ undef, %39 ]
%53 = phi i8* [ %46, %44 ], [ undef, %39 ]
%54 = phi i32 [ %50, %44 ], [ %42, %39 ]
%55 = icmp eq i8* %4, null
br i1 %55, label %63, label %56
56: ; preds = %51
%57 = tail call i8* @format_string(i8* %4)
%58 = tail call i8* @concat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %57)
%59 = tail call i8* @asig(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %58)
%60 = zext i32 %54 to i64
%61 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %60
store i8* %59, i8** %61
%62 = add nuw nsw i32 %54, 1
br label %63
63: ; preds = %56, %51
%64 = phi i8* [ %57, %56 ], [ undef, %51 ]
%65 = phi i8* [ %58, %56 ], [ undef, %51 ]
%66 = phi i32 [ %62, %56 ], [ %54, %51 ]
%67 = icmp eq i8* %5, null
br i1 %67, label %74, label %68
68: ; preds = %63
%69 = tail call i8* @format_string(i8* %5)
%70 = tail call i8* @asig(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* %69)
%71 = zext i32 %66 to i64
%72 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %71
store i8* %70, i8** %72
%73 = add nuw nsw i32 %66, 1
br label %74
74: ; preds = %68, %63
%75 = phi i8* [ %69, %68 ], [ undef, %63 ]
%76 = phi i32 [ %73, %68 ], [ %66, %63 ]
%77 = icmp eq i8* %6, null
br i1 %77, label %84, label %78
78: ; preds = %74
%79 = tail call i8* @format_string(i8* %6)
%80 = tail call i8* @asig(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %79)
%81 = zext i32 %76 to i64
%82 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %81
store i8* %80, i8** %82
%83 = add nuw nsw i32 %76, 1
br label %84
84: ; preds = %78, %74
%85 = phi i8* [ %79, %78 ], [ undef, %74 ]
%86 = phi i32 [ %83, %78 ], [ %76, %74 ]
%87 = icmp eq i8* %7, null
br i1 %87, label %94, label %88
88: ; preds = %84
%89 = tail call i8* @format_string(i8* %7)
%90 = tail call i8* @asig(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* %89)
%91 = zext i32 %86 to i64
%92 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %91
store i8* %90, i8** %92
%93 = add nuw nsw i32 %86, 1
br label %94
94: ; preds = %88, %84
%95 = phi i8* [ %89, %88 ], [ undef, %84 ]
%96 = phi i32 [ %93, %88 ], [ %86, %84 ]
%97 = icmp eq i8* %8, null
br i1 %97, label %104, label %98
98: ; preds = %94
%99 = tail call i8* @format_string(i8* %8)
%100 = tail call i8* @asig(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %99)
%101 = zext i32 %96 to i64
%102 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %101
store i8* %100, i8** %102
%103 = add nuw nsw i32 %96, 1
br label %104
104: ; preds = %98, %94
%105 = phi i8* [ %99, %98 ], [ undef, %94 ]
%106 = phi i32 [ %103, %98 ], [ %96, %94 ]
%107 = icmp eq i8* %9, null
br i1 %107, label %115, label %108
108: ; preds = %104
%109 = tail call i8* @format_string(i8* %9)
%110 = tail call i8* @upper(i8* %109)
%111 = tail call i8* @asig(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i8* %110)
%112 = zext i32 %106 to i64
%113 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %112
store i8* %111, i8** %113
%114 = add nuw nsw i32 %106, 1
br label %115
115: ; preds = %108, %104
%116 = phi i8* [ %109, %108 ], [ undef, %104 ]
%117 = phi i8* [ %110, %108 ], [ undef, %104 ]
%118 = phi i32 [ %114, %108 ], [ %106, %104 ]
%119 = icmp eq i8* %10, null
br i1 %119, label %127, label %120
120: ; preds = %115
%121 = tail call i8* @format_string(i8* %10)
%122 = tail call i8* @upper(i8* %121)
%123 = tail call i8* @asig(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* %122)
%124 = zext i32 %118 to i64
%125 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %124
store i8* %123, i8** %125
%126 = add nuw nsw i32 %118, 1
br label %127
127: ; preds = %120, %115
%128 = phi i8* [ %121, %120 ], [ undef, %115 ]
%129 = phi i8* [ %122, %120 ], [ undef, %115 ]
%130 = phi i32 [ %126, %120 ], [ %118, %115 ]
%131 = icmp eq i8* %11, null
br i1 %131, label %138, label %132
132: ; preds = %127
%133 = tail call i8* @format_string(i8* %11)
%134 = tail call i8* @asig(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8* %133)
%135 = zext i32 %130 to i64
%136 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %135
store i8* %134, i8** %136
%137 = add nuw nsw i32 %130, 1
br label %138
138: ; preds = %132, %127
%139 = phi i8* [ %133, %132 ], [ undef, %127 ]
%140 = phi i32 [ %137, %132 ], [ %130, %127 ]
%141 = icmp eq i8* %12, null
br i1 %141, label %155, label %142
142: ; preds = %138
%143 = tail call i8* @format_string(i8* %12)
%144 = tail call i64 @strlen(i8* dereferenceable(1) %143)
%145 = add nsw i64 %144, 13
%146 = tail call i64 @malloc(i64 %145)
%147 = inttoptr i64 %146 to i8*
%148 = tail call i32 @strcpy(i8* %147, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
%149 = tail call i32 @strcat(i8* %147, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%150 = tail call i32 @strcat(i8* %147, i8* %143)
%151 = tail call i8* @asig(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i8* %147)
%152 = zext i32 %140 to i64
%153 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %152
store i8* %151, i8** %153
%154 = add nuw nsw i32 %140, 1
br label %155
155: ; preds = %142, %138
%156 = phi i8* [ %143, %142 ], [ undef, %138 ]
%157 = phi i8* [ %147, %142 ], [ undef, %138 ]
%158 = phi i32 [ %154, %142 ], [ %140, %138 ]
%159 = zext i32 %158 to i64
%160 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 %159
store i8* null, i8** %160
%161 = getelementptr inbounds [13 x i8*], [13 x i8*]* %14, i64 0, i64 0
%162 = call i8* @construct_update(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8** %161, i8* %0)
%163 = call i32 @exec_nonquery(i8* %162)
%164 = call i32 @free(i8* %162)
br i1 %24, label %167, label %165
165: ; preds = %155
%166 = call i32 @free(i8* %30)
br label %167
167: ; preds = %165, %155
br i1 %16, label %171, label %168
168: ; preds = %167
%169 = call i32 @free(i8* %40)
%170 = call i32 @free(i8* %41)
br label %171
171: ; preds = %168, %167
br i1 %43, label %175, label %172
172: ; preds = %171
%173 = call i32 @free(i8* %52)
%174 = call i32 @free(i8* %53)
br label %175
175: ; preds = %172, %171
br i1 %55, label %179, label %176
176: ; preds = %175
%177 = call i32 @free(i8* %64)
%178 = call i32 @free(i8* %65)
br label %179
179: ; preds = %176, %175
br i1 %67, label %182, label %180
180: ; preds = %179
%181 = call i32 @free(i8* %75)
br label %182
182: ; preds = %180, %179
br i1 %77, label %185, label %183
183: ; preds = %182
%184 = call i32 @free(i8* %85)
br label %185
185: ; preds = %183, %182
br i1 %87, label %188, label %186
186: ; preds = %185
%187 = call i32 @free(i8* %95)
br label %188
188: ; preds = %186, %185
br i1 %97, label %191, label %189
189: ; preds = %188
%190 = call i32 @free(i8* %105)
br label %191
191: ; preds = %189, %188
br i1 %107, label %195, label %192
192: ; preds = %191
%193 = call i32 @free(i8* %116)
%194 = call i32 @free(i8* %117)
br label %195
195: ; preds = %192, %191
br i1 %119, label %199, label %196
196: ; preds = %195
%197 = call i32 @free(i8* %128)
%198 = call i32 @free(i8* %129)
br label %199
199: ; preds = %196, %195
br i1 %131, label %202, label %200
200: ; preds = %199
%201 = call i32 @free(i8* %139)
br label %202
202: ; preds = %200, %199
br i1 %141, label %206, label %203
203: ; preds = %202
%204 = call i32 @free(i8* %156)
%205 = call i32 @free(i8* %157)
br label %206
206: ; preds = %203, %202
%207 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}