user: Converte this assembly snippet into its equivalent C code:

```asm
<login_page>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0x98(%rbp)
  mov    %rsi,-0xa0(%rbp)
  mov    %rdx,-0xa8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x98(%rbp),%rax
  lea    D21(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mg_get_var@plt>
  mov    %rax,-0x88(%rbp)
  mov    -0x98(%rbp),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mg_get_var@plt>
  mov    %rax,-0x80(%rbp)
  mov    -0x98(%rbp),%rax
  lea    D43(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mg_get_header@plt>
  mov    %rax,-0x78(%rbp)
  cmpq   $0x0,-0x88(%rbp)
  je     L41
  cmpq   $0x0,-0x80(%rbp)
  je     L41
  mov    -0x88(%rbp),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L41
  mov    -0x80(%rbp),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L41
  cmpq   $0x0,-0x78(%rbp)
  je     L97
  lea    -0x70(%rbp),%rdx
  mov    -0x78(%rbp),%rax
  lea    D60(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L36
L97:
  lea    -0x70(%rbp),%rax
  lea    D1(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L36:
  lea    -0x70(%rbp),%rdx
  mov    -0x98(%rbp),%rax
  lea    D37(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <mg_printf@plt>
  jmp    L32
L41:
  mov    -0x98(%rbp),%rax
  lea    D27(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <mg_printf@plt>
L32:
  cmpq   $0x0,-0x88(%rbp)
  je     L18
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <mg_free@plt>
L18:
  cmpq   $0x0,-0x80(%rbp)
  je     L90
  mov    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <mg_free@plt>
L90:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D21
type: string
name: parse_data
arguments: data_label: D66
type: string
name: parse_data
arguments: data_label: D43
type: string
name: parse_data
arguments: data_label: D40
type: string
name: parse_data
arguments: data_label: D60
type: string
name: parse_data
arguments: data_label: D1
type: string
name: parse_data
arguments: data_label: D37
type: string
name: parse_data
arguments: data_label: D27
type: string

tool: D21: name

tool: D66: pass

tool: D43: Cookie

tool: D40: admin

tool: D60: uri=%99s

tool: D1: /

tool: D37: HTTP/1.1 301 Moved Permanently
Location: %s
Set-Cookie: allow=yes;



tool: D27: HTTP/1.1 200 OK
content-Type: text/html

Please login (enter admin/admin to pass)<br><form method=post>Name: <input type=text name=name></input><br/>Password: <input type=password name=pass></input><br/><input type=submit value=Login></input></form>

assistant: ```c
void login_page(struct mg_connection *conn, const struct mg_request_info *ri, void *data) {
  char *name, *pass, uri[100];
  const char *cookie;
  name = mg_get_var(conn, "name");
  pass = mg_get_var(conn, "pass");
  cookie = mg_get_header(conn, "Cookie");
  if (name != NULL && pass != NULL && strcmp(name, "admin") == 0 && strcmp(pass, "admin") == 0) {
    if (cookie == NULL || sscanf(cookie, "uri=%99s", uri) != 1)
      (void)strcpy(uri, "/");
    mg_printf(conn,
              "HTTP/1.1 301 Moved Permanently\r\n"
              "Location: %s\r\n"
              "Set-Cookie: allow=yes;\r\n\r\n",
              uri);
  } else {
    mg_printf(conn, "HTTP/1.1 200 OK\r\n"
                    "content-Type: text/html\r\n\r\n"
                    "Please login (enter admin/admin to pass)<br>"
                    "<form method=post>"
                    "Name: <input type=text name=name></input><br/>"
                    "Password: <input type=password name=pass></input><br/>"
                    "<input type=submit value=Login></input>"
                    "</form>");
  }
  if (name != NULL)
    mg_free(name);
  if (pass != NULL)
    mg_free(pass);
}
```