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

```asm
<test_add>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   <add_i8@plt>
  cmp    $0x2,%eax
  je     L139
  mov    $0x7c,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
  nopl   0x0(%rax)
L139:
  mov    $0xffffffff,%esi
  mov    $0x1,%edi
  call   <add_i8@plt>
  test   %eax,%eax
  jne    L56
  mov    $0xffffffff,%esi
  mov    $0xffffffff,%edi
  call   <add_i8@plt>
  cmp    $0xfffffffe,%eax
  jne    L103
  mov    $0x1,%esi
  mov    $0xff,%edi
  call   <add_i8@plt>
  test   %eax,%eax
  jne    L119
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   <add_i16@plt>
  cmp    $0x2,%eax
  je     L105
  mov    $0x85,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
  xchg   %ax,%ax
L103:
  mov    $0x80,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
L56:
  mov    $0x7e,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
L119:
  mov    $0x82,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
L105:
  mov    $0xffffffff,%esi
  mov    $0x1,%edi
  call   <add_i16@plt>
  test   %eax,%eax
  jne    L46
  mov    $0xffffffff,%esi
  mov    $0xffffffff,%edi
  call   <add_i16@plt>
  cmp    $0xfffffffe,%eax
  je     L72
  mov    $0x89,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
  nopw   0x0(%rax,%rax,1)
L46:
  mov    $0x87,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
L72:
  mov    $0x1,%esi
  mov    $0xffff,%edi
  call   <add_i16@plt>
  test   %eax,%eax
  jne    L63
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   <add_i32@plt>
  cmp    $0x2,%eax
  je     L120
  mov    $0x8e,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
L63:
  mov    $0x8b,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
L120:
  mov    $0xffffffff,%esi
  mov    $0x1,%edi
  call   <add_i32@plt>
  test   %eax,%eax
  jne    L29
  mov    $0xffffffff,%esi
  mov    $0xffffffff,%edi
  call   <add_i32@plt>
  cmp    $0xfffffffe,%eax
  je     L101
  mov    $0x92,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
L29:
  mov    $0x90,%esi
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    10b0 <fail_real@plt>
L101:
  mov    $0x1,%esi
  mov    $0xffffffff,%edi
  call   <add_i32@plt>
  test   %eax,%eax
  jne    L108
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   <add_i64@plt>
  cmp    $0x2,%eax
  je     L106
  mov    $0x97,%esi
  xor    %edi,%edi
  pop    %r10
  jmp    10b0 <fail_real@plt>
L108:
  mov    $0x94,%esi
  xor    %edi,%edi
  pop    %r11
  jmp    10b0 <fail_real@plt>
L106:
  or     $0xffffffff,%esi
  mov    $0x1,%edi
  call   <add_i64@plt>
  test   %eax,%eax
  jne    L141
  or     $0xffffffff,%esi
  or     $0xffffffffffffffff,%rdi
  call   <add_i64@plt>
  cmp    $0xfffffffe,%eax
  je     L48
  mov    $0x9b,%esi
  xor    %edi,%edi
  pop    %r8
  jmp    10b0 <fail_real@plt>
L141:
  mov    $0x99,%esi
  xor    %edi,%edi
  pop    %r9
  jmp    10b0 <fail_real@plt>
L48:
  or     $0xffffffffffffffff,%rdi
  mov    $0x1,%esi
  call   <add_i64@plt>
  test   %eax,%eax
  jne    L83
  mov    $0x1,%eax
  pop    %rdx
  ret
L83:
  mov    $0x9d,%esi
  xor    %edi,%edi
  pop    %rcx
  jmp    10b0 <fail_real@plt>
```

assistant: ```c
int test_add(void) {
  if (add_i8(1, 1) != 2)
    return fail_real(0, 124);
  if (add_i8(1, -1) != 0)
    return fail_real(0, 126);
  if (add_i8(-1, -1) != -2)
    return fail_real(0, 128);
  if (add_i8(255, 1) != 0)
    return fail_real(0, 130);
  if (add_i16(1, 1) != 2)
    return fail_real(0, 133);
  if (add_i16(1, -1) != 0)
    return fail_real(0, 135);
  if (add_i16(-1, -1) != -2)
    return fail_real(0, 137);
  if (add_i16(65535, 1) != 0)
    return fail_real(0, 139);
  if (add_i32(1, 1) != 2)
    return fail_real(0, 142);
  if (add_i32(1, -1) != 0)
    return fail_real(0, 144);
  if (add_i32(-1, -1) != -2)
    return fail_real(0, 146);
  if (add_i32(~0u, 1) != 0)
    return fail_real(0, 148);
  if (add_i64(1, 1) != 2)
    return fail_real(0, 151);
  if (add_i64(1, -1) != 0)
    return fail_real(0, 153);
  if (add_i64(-1, -1) != -2)
    return fail_real(0, 155);
  if (add_i64(~0ull, 1) != 0)
    return fail_real(0, 157);
  return 0x1;
}
```