user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<libdax_msgs__sev_to_text>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L36
  mov    -0x10(%rbp),%rax
  lea    D88(%rip),%rdx
  mov    %rdx,(%rax)
  mov    $0x1,%eax
  jmp    L35
L36:
  mov    -0x10(%rbp),%rax
  lea    D158(%rip),%rdx
  mov    %rdx,(%rax)
  cmpl   $0x7fffffff,-0x4(%rbp)
  jne    L185
  mov    -0x10(%rbp),%rax
  lea    D108(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L185:
  cmpl   $0x70ffffff,-0x4(%rbp)
  jle    L120
  mov    -0x10(%rbp),%rax
  lea    D27(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L120:
  cmpl   $0x6fffffff,-0x4(%rbp)
  jle    L116
  mov    -0x10(%rbp),%rax
  lea    D156(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L116:
  cmpl   $0x67ffffff,-0x4(%rbp)
  jle    L21
  mov    -0x10(%rbp),%rax
  lea    D51(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L21:
  cmpl   $0x63ffffff,-0x4(%rbp)
  jle    L159
  mov    -0x10(%rbp),%rax
  lea    D31(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L159:
  cmpl   $0x5fffffff,-0x4(%rbp)
  jle    L63
  mov    -0x10(%rbp),%rax
  lea    D38(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L63:
  cmpl   $0x4fffffff,-0x4(%rbp)
  jle    L252
  mov    -0x10(%rbp),%rax
  lea    D25(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L252:
  cmpl   $0x3fffffff,-0x4(%rbp)
  jle    L93
  mov    -0x10(%rbp),%rax
  lea    D119(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L93:
  cmpl   $0x2fffffff,-0x4(%rbp)
  jle    L152
  mov    -0x10(%rbp),%rax
  lea    D129(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L152:
  cmpl   $0x1fffffff,-0x4(%rbp)
  jle    L156
  mov    -0x10(%rbp),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L156:
  cmpl   $0xfffffff,-0x4(%rbp)
  jle    L5
  mov    -0x10(%rbp),%rax
  lea    D37(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L5:
  cmpl   $0x7ffffff,-0x4(%rbp)
  jle    L147
  mov    -0x10(%rbp),%rax
  lea    D128(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L147:
  cmpl   $0x0,-0x4(%rbp)
  js     L14
  mov    -0x10(%rbp),%rax
  lea    D62(%rip),%rdx
  mov    %rdx,(%rax)
  jmp    L130
L14:
  mov    -0x10(%rbp),%rax
  lea    D158(%rip),%rdx
  mov    %rdx,(%rax)
  mov    $0x0,%eax
  jmp    L35
L130:
  mov    $0x1,%eax
L35:
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D88
datatype: string
name: retrieve_data
arguments: tag: D158
datatype: string
name: retrieve_data
arguments: tag: D108
datatype: string
name: retrieve_data
arguments: tag: D27
datatype: string
name: retrieve_data
arguments: tag: D156
datatype: string
name: retrieve_data
arguments: tag: D51
datatype: string
name: retrieve_data
arguments: tag: D31
datatype: string
name: retrieve_data
arguments: tag: D38
datatype: string
name: retrieve_data
arguments: tag: D25
datatype: string
name: retrieve_data
arguments: tag: D119
datatype: string
name: retrieve_data
arguments: tag: D129
datatype: string
name: retrieve_data
arguments: tag: D2
datatype: string
name: retrieve_data
arguments: tag: D37
datatype: string
name: retrieve_data
arguments: tag: D128
datatype: string
name: retrieve_data
arguments: tag: D62
datatype: string

tool: D88: ALL ERRFILE DEBUG UPDATE NOTE HINT WARNING SORRY MISHAP FAILURE FATAL ABORT NEVER

tool: 

tool: D108: NEVER

tool: D27: ABORT

tool: D156: FATAL

tool: D51: FAILURE

tool: D31: MISHAP

tool: D38: SORRY

tool: D25: WARNING

tool: D119: HINT

tool: D129: NOTE

tool: D2: UPDATE

tool: D37: DEBUG

tool: D128: ERRFILE

tool: D62: ALL

assistant: ```c
int libdax_msgs__sev_to_text(int severity, char **severity_name, int flag) {
  if (flag & 1) {
    *severity_name = "ALL ERRFILE DEBUG UPDATE NOTE HINT WARNING SORRY MISHAP FAILURE FATAL ABORT NEVER";
    return (1);
  }
  *severity_name = "";
  if (severity >= 0x7fffffff)
    *severity_name = "NEVER";
  else if (severity >= 0x71000000)
    *severity_name = "ABORT";
  else if (severity >= 0x70000000)
    *severity_name = "FATAL";
  else if (severity >= 0x68000000)
    *severity_name = "FAILURE";
  else if (severity >= 0x64000000)
    *severity_name = "MISHAP";
  else if (severity >= 0x60000000)
    *severity_name = "SORRY";
  else if (severity >= 0x50000000)
    *severity_name = "WARNING";
  else if (severity >= 0x40000000)
    *severity_name = "HINT";
  else if (severity >= 0x30000000)
    *severity_name = "NOTE";
  else if (severity >= 0x20000000)
    *severity_name = "UPDATE";
  else if (severity >= 0x10000000)
    *severity_name = "DEBUG";
  else if (severity >= 0x08000000)
    *severity_name = "ERRFILE";
  else if (severity >= 0x00000000)
    *severity_name = "ALL";
  else {
    *severity_name = "";
    return (0);
  }
  return (1);
}
```