user: What is the c source code of the assembly code below?

```asm
<aaip_set_attr_list>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rcx,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L464
  mov    %r9d,%eax
  mov    %rdx,%rbp
  mov    %r9d,%edx
  mov    %rsi,%r12
  and    $0x4,%eax
  and    $0x8,%edx
  and    $0x1,%r9d
  mov    %r8,%r15
  je     L252
  test   %edx,%edx
  jne    L143
  test   %eax,%eax
  jne    L331
  mov    $0x1,%ebx
  xor    %r13d,%r13d
  lea    D8(%rip),%r14
  jmp    L181
L238:
  mov    $0x6,%edx
  mov    %r14,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L489
  mov    -0x8(%rbp,%rbx,8),%rdi
  mov    $0x5,%edx
  lea    D31(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L193
L489:
  lea    0x1(%rbx),%rax
  cmp    %rbx,%r12
  jbe    L300
L397:
  mov    %rax,%rbx
L181:
  mov    -0x8(%rbp,%rbx,8),%rdi
  test   %rdi,%rdi
  je     L489
  cmpq   $0x0,-0x8(%r15,%rbx,8)
  je     L489
  cmpb   $0x0,(%rdi)
  jne    L238
  mov    %rbx,%r13
  lea    0x1(%rbx),%rax
  cmp    %rbx,%r12
  ja     L397
L300:
  test   %r13,%r13
  je     L464
  lea    -0x8(,%r13,8),%rax
  mov    0x8(%rsp),%r13
  lea    0x18(%rsp),%r14
  xor    %ecx,%ecx
  lea    (%r15,%rax,1),%rbx
  lea    0x20(%rsp),%r15
  sub    $0x8,%rsp
  xor    %r8d,%r8d
  push   $0x1
  add    %rax,%r13
  mov    (%rbx),%rdi
  mov    %r15,%r9
  mov    0x0(%r13),%rsi
  mov    %r14,%rdx
  call   <aaip_decode_acl@plt>
  pop    %rcx
  pop    %rsi
  mov    %eax,%r12d
  cmp    $0xfffffffd,%eax
  jl     L477
  test   %eax,%eax
  jle    L349
  mov    0x20(%rsp),%rdi
  mov    $0x1,%esi
  mov    $0xffffffff,%r12d
  call   <calloc@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L477
  sub    $0x8,%rsp
  mov    0x0(%r13),%rsi
  mov    (%rbx),%rdi
  mov    %r14,%rdx
  push   $0x0
  mov    0x30(%rsp),%r8
  mov    %r15,%r9
  mov    %rax,%rcx
  call   <aaip_decode_acl@plt>
  mov    %eax,%r12d
  pop    %rax
  pop    %rdx
  cmp    $0xfffffffd,%r12d
  jl     L457
  test   %r12d,%r12d
  setle  %r12b
  movzbl %r12b,%r12d
  lea    -0x7(%r12,%r12,4),%r12d
L457:
  mov    %rbp,%rdi
  call   <free@plt>
  jmp    L477
L252:
  test   %eax,%eax
  jne    L464
  mov    $0x1,%ebx
  lea    D8(%rip),%r13
  lea    D31(%rip),%r14
  test   %edx,%edx
  je     L432
  jmp    L219
L175:
  mov    %rax,%rbx
L432:
  mov    -0x8(%rbp,%rbx,8),%rdi
  test   %rdi,%rdi
  je     L196
  cmpq   $0x0,-0x8(%r15,%rbx,8)
  je     L196
  cmpb   $0x0,(%rdi)
  je     L196
  mov    $0x6,%edx
  mov    %r13,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L196
  mov    -0x8(%rbp,%rbx,8),%rdi
  mov    $0x5,%edx
  mov    %r14,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L193
  nopw   0x0(%rax,%rax,1)
L196:
  lea    0x1(%rbx),%rax
  cmp    %rbx,%r12
  ja     L175
L464:
  mov    $0x1,%r12d
L477:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L198
  add    $0x38,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L331:
  mov    $0x1,%eax
  xor    %r13d,%r13d
  jmp    L46
  nopw   0x0(%rax,%rax,1)
L326:
  mov    %rdx,%rax
L46:
  mov    -0x8(%rbp,%rax,8),%rdx
  test   %rdx,%rdx
  je     L334
  cmpq   $0x0,-0x8(%r15,%rax,8)
  je     L334
  cmpb   $0x0,(%rdx)
  cmove  %rax,%r13
L334:
  lea    0x1(%rax),%rdx
  cmp    %rax,%r12
  ja     L326
  jmp    L300
L172:
  lea    0x1(%rbx),%rax
  cmp    %rbx,%r12
  jbe    L464
  mov    %rax,%rbx
L219:
  mov    -0x8(%rbp,%rbx,8),%rdi
  test   %rdi,%rdi
  je     L172
  cmpq   $0x0,-0x8(%r15,%rbx,8)
  je     L172
  cmpb   $0x0,(%rdi)
  je     L172
  mov    $0x6,%edx
  mov    %r13,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L172
L193:
  mov    $0xfffffffa,%r12d
  jmp    L477
L143:
  test   %eax,%eax
  jne    L433
  mov    $0x1,%ebx
  xor    %r13d,%r13d
  lea    D8(%rip),%r14
  jmp    L456
L205:
  mov    $0x6,%edx
  mov    %r14,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L193
L511:
  lea    0x1(%rbx),%rax
  cmp    %rbx,%r12
  jbe    L300
  mov    %rax,%rbx
L456:
  mov    -0x8(%rbp,%rbx,8),%rdi
  test   %rdi,%rdi
  je     L511
  cmpq   $0x0,-0x8(%r15,%rbx,8)
  je     L511
  cmpb   $0x0,(%rdi)
  jne    L205
  mov    %rbx,%r13
  jmp    L511
L433:
  mov    $0x1,%eax
  xor    %r13d,%r13d
  jmp    L78
  nop
L88:
  mov    %rdx,%rax
L78:
  mov    -0x8(%rbp,%rax,8),%rdx
  test   %rdx,%rdx
  je     L379
  cmpq   $0x0,-0x8(%r15,%rax,8)
  je     L379
  cmpb   $0x0,(%rdx)
  cmove  %rax,%r13
L379:
  lea    0x1(%rax),%rdx
  cmp    %rax,%r12
  ja     L88
  jmp    L300
L349:
  mov    $0xfffffffe,%r12d
  jmp    L477
L198:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D8
data_type: string
name: unpack_data
arguments: label: D31
data_type: string

tool: D8: isofs.

tool: D31: user.

assistant: ```c
int aaip_set_attr_list(char *path, size_t num_attrs, char **names, size_t *value_lengths, char **values, int flag) {
  int ret, has_default_acl = 0;
  size_t i, consumed, acl_text_fill, acl_idx = 0, h_consumed;
  char *acl_text = NULL, *list = NULL;
  for (i = 0; i < num_attrs; i++) {
    if (names[i] == NULL || values[i] == NULL)
      continue;
    if (names[i][0] == 0) {
      if (flag & 1)
        acl_idx = i + 1;
      continue;
    }
    if (flag & 4)
      continue;
    if (strncmp(names[i], "isofs.", 6) == 0)
      continue;
    if (!(flag & 8))
      if (strncmp(names[i], "user.", 5))
        continue;
    {
      ret = -6;
      goto ex;
    }
  }
  if (acl_idx == 0) {
    ret = 1;
    goto ex;
  }
  i = acl_idx - 1;
  ret = aaip_decode_acl((unsigned char *)values[i], value_lengths[i], &consumed, NULL, 0, &acl_text_fill, 1);
  if (ret < -3)
    goto ex;
  if (ret <= 0) {
    ret = -2;
    goto ex;
  }
  acl_text = calloc(acl_text_fill, 1);
  if (acl_text == NULL) {
    ret = -1;
    goto ex;
  }
  ret = aaip_decode_acl((unsigned char *)values[i], value_lengths[i], &consumed, acl_text, acl_text_fill, &acl_text_fill, 0);
  if (ret < -3)
    goto ex;
  if (ret <= 0) {
    ret = -2;
    goto ex;
  }
  has_default_acl = (ret == 2);
  {
    ret = -7;
    goto ex;
  }
  if (has_default_acl) {
    free(acl_text);
    acl_text = NULL;
    ret = aaip_decode_acl((unsigned char *)(values[i] + consumed), value_lengths[i] - consumed, &h_consumed, NULL, 0, &acl_text_fill, 1);
    if (ret < -3)
      goto ex;
    if (ret <= 0) {
      ret = -2;
      goto ex;
    }
    acl_text = calloc(acl_text_fill, 1);
    if (acl_text == NULL) {
      ret = -1;
      goto ex;
    }
    ret = aaip_decode_acl((unsigned char *)(values[i] + consumed), value_lengths[i] - consumed, &h_consumed, acl_text, acl_text_fill, &acl_text_fill, 0);
    if (ret < -3)
      goto ex;
    if (ret <= 0) {
      ret = -2;
      goto ex;
    }
    ret = aaip_set_acl_text(path, acl_text, 1 | (flag & 32));
    if (ret <= 0) {
      ret = -3;
      goto ex;
    }
  } else {
    if (!(flag & 64)) {
      ;
    }
  }
  ret = 1;
ex:;
  if (acl_text != NULL)
    free(acl_text);
  if (list != NULL)
    free(list);
  return (ret);
}
```