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

```asm
<pad_init>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  xor    %esi,%esi
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rdx,%rbp
  mov    %ecx,%edx
  push   %rbx
  sub    $0x278,%rsp
  mov    (%rdi),%r14d
  mov    %rdi,0x8(%rsp)
  mov    %rbp,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x268(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  test   $0x1,%r13b
  jne    L250
  test   $0x1e7,%r13d
  je     L250
L131:
  test   $0x1e6,%r13d
  je     L86
  lea    0x10(%rsp),%r15
  lea    0x60(%rsp),%rbx
  mov    %r15,(%rsp)
  nopw   0x0(%rax,%rax,1)
L402:
  mov    %r14d,%edi
  add    $0x4,%r15
  call   <seed_step@plt>
  mov    %eax,-0x4(%r15)
  mov    %eax,%r14d
  cmp    %rbx,%r15
  jne    L402
  test   $0x2,%r13b
  jne    L522
L412:
  test   $0x4,%r13b
  jne    L351
  test   $0x20,%r13b
  jne    L529
L53:
  test   $0x80,%r13b
  jne    L279
L242:
  and    $0x100,%r13d
  jne    L351
  mov    (%rsp),%rdi
  mov    $0x14,%esi
  call   <reverse_bytes@plt>
  test   %r12d,%r12d
  je     L86
  lea    -0x1(%r12),%eax
  cmp    $0xe,%eax
  jbe    L457
  mov    %r12d,%edx
  xor    %eax,%eax
  shr    $0x4,%edx
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L376:
  mov    (%rsp),%rsi
  movdqu 0x0(%rbp,%rax,1),%xmm0
  pxor   (%rsi,%rax,1),%xmm0
  movups %xmm0,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L376
  mov    %r12d,%r13d
  and    $0xfffffff0,%r13d
  test   $0xf,%r12b
  je     L86
L457:
  mov    %r12d,%ecx
  sub    %r13d,%ecx
  lea    -0x1(%rcx),%eax
  cmp    $0x6,%eax
  jbe    L306
  mov    %r13d,%edx
  lea    0x0(%rbp,%rdx,1),%rax
  movq   0x10(%rsp,%rdx,1),%xmm1
  movq   (%rax),%xmm0
  pxor   %xmm1,%xmm0
  movq   %xmm0,(%rax)
  mov    %ecx,%eax
  and    $0xfffffff8,%eax
  add    %eax,%r13d
  cmp    %eax,%ecx
  je     L86
L306:
  mov    %r13d,%eax
  movzbl 0x10(%rsp,%rax,1),%edx
  xor    %dl,0x0(%rbp,%rax,1)
  lea    0x1(%r13),%eax
  cmp    %eax,%r12d
  jbe    L86
  movzbl 0x10(%rsp,%rax,1),%edx
  xor    %dl,0x0(%rbp,%rax,1)
  lea    0x2(%r13),%eax
  cmp    %r12d,%eax
  jae    L86
  movzbl 0x10(%rsp,%rax,1),%edx
  xor    %dl,0x0(%rbp,%rax,1)
  lea    0x3(%r13),%eax
  cmp    %eax,%r12d
  jbe    L86
  movzbl 0x10(%rsp,%rax,1),%edx
  xor    %dl,0x0(%rbp,%rax,1)
  lea    0x4(%r13),%eax
  cmp    %eax,%r12d
  jbe    L86
  movzbl 0x10(%rsp,%rax,1),%edx
  xor    %dl,0x0(%rbp,%rax,1)
  lea    0x5(%r13),%eax
  cmp    %eax,%r12d
  jbe    L86
  add    $0x6,%r13d
  movzbl 0x10(%rsp,%rax,1),%edx
  xor    %dl,0x0(%rbp,%rax,1)
  cmp    %r13d,%r12d
  jbe    L86
  mov    %r13d,%eax
  movzbl 0x10(%rsp,%rax,1),%edx
  xor    %dl,0x0(%rbp,%rax,1)
  nopl   (%rax)
L86:
  mov    0x8(%rsp),%rax
  mov    %r14d,(%rax)
  mov    $0x1,%eax
L333:
  mov    0x268(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L441
  add    $0x278,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L250:
  lea    0x60(%rsp),%rax
  lea    0x15f(%rsp),%rbx
  mov    %rax,(%rsp)
  mov    %rax,%r15
  nopw   0x0(%rax,%rax,1)
L33:
  mov    %r14d,%edi
  add    $0x1,%r15
  call   <seed_step@plt>
  mov    %eax,%ecx
  mov    %eax,%r14d
  shr    $0x16,%eax
  imul   $0x24924929,%rax,%rax
  shr    $0x11,%ecx
  shr    $0x20,%rax
  imul   $0xe0,%eax,%eax
  sub    %eax,%ecx
  mov    %cl,-0x1(%r15)
  cmp    %rbx,%r15
  jne    L33
  mov    (%rsp),%rsi
  lea    0x160(%rsp),%rdi
  call   <enc_type_1@plt>
  test   %r12d,%r12d
  je     L131
  lea    -0x1(%r12),%eax
  cmp    $0xe,%eax
  jbe    L62
  movdqu 0x0(%rbp),%xmm0
  mov    %r12d,%eax
  pxor   0x160(%rsp),%xmm0
  shr    $0x4,%eax
  movups %xmm0,0x0(%rbp)
  cmp    $0x1,%eax
  je     L45
  movdqu 0x10(%rbp),%xmm0
  pxor   0x170(%rsp),%xmm0
  movups %xmm0,0x10(%rbp)
  cmp    $0x2,%eax
  je     L45
  movdqu 0x20(%rbp),%xmm0
  pxor   0x180(%rsp),%xmm0
  movups %xmm0,0x20(%rbp)
  cmp    $0x3,%eax
  je     L45
  movdqu 0x30(%rbp),%xmm0
  pxor   0x190(%rsp),%xmm0
  movups %xmm0,0x30(%rbp)
  cmp    $0x4,%eax
  je     L45
  movdqu 0x40(%rbp),%xmm0
  pxor   0x1a0(%rsp),%xmm0
  movups %xmm0,0x40(%rbp)
  cmp    $0x5,%eax
  je     L45
  movdqu 0x50(%rbp),%xmm0
  pxor   0x1b0(%rsp),%xmm0
  movups %xmm0,0x50(%rbp)
  cmp    $0x6,%eax
  je     L45
  movdqu 0x60(%rbp),%xmm0
  pxor   0x1c0(%rsp),%xmm0
  movups %xmm0,0x60(%rbp)
  cmp    $0x7,%eax
  je     L45
  movdqu 0x70(%rbp),%xmm0
  pxor   0x1d0(%rsp),%xmm0
  movups %xmm0,0x70(%rbp)
  cmp    $0x8,%eax
  je     L45
  movdqu 0x80(%rbp),%xmm0
  pxor   0x1e0(%rsp),%xmm0
  movups %xmm0,0x80(%rbp)
  cmp    $0x9,%eax
  je     L45
  movdqu 0x90(%rbp),%xmm0
  pxor   0x1f0(%rsp),%xmm0
  movups %xmm0,0x90(%rbp)
  cmp    $0xa,%eax
  je     L45
  movdqu 0xa0(%rbp),%xmm0
  pxor   0x200(%rsp),%xmm0
  movups %xmm0,0xa0(%rbp)
  cmp    $0xb,%eax
  je     L45
  movdqu 0xb0(%rbp),%xmm0
  pxor   0x210(%rsp),%xmm0
  movups %xmm0,0xb0(%rbp)
  cmp    $0xc,%eax
  je     L45
  movdqu 0xc0(%rbp),%xmm0
  pxor   0x220(%rsp),%xmm0
  movups %xmm0,0xc0(%rbp)
  cmp    $0xd,%eax
  je     L45
  movdqu 0xd0(%rbp),%xmm0
  pxor   0x230(%rsp),%xmm0
  movups %xmm0,0xd0(%rbp)
  cmp    $0xe,%eax
  je     L45
  movdqu 0xe0(%rbp),%xmm0
  pxor   0x240(%rsp),%xmm0
  movups %xmm0,0xe0(%rbp)
  cmp    $0xf,%eax
  je     L45
  movdqu 0xf0(%rbp),%xmm0
  pxor   0x250(%rsp),%xmm0
  movups %xmm0,0xf0(%rbp)
L45:
  mov    %r12d,%eax
  and    $0xfffffff0,%eax
  test   $0xf,%r12b
  je     L131
L225:
  mov    %r12d,%edx
  sub    %eax,%edx
  lea    -0x1(%rdx),%ecx
  cmp    $0x6,%ecx
  jbe    L490
  mov    %eax,%esi
  movq   0x160(%rsp,%rsi,1),%xmm1
  lea    0x0(%rbp,%rsi,1),%rcx
  movq   (%rcx),%xmm0
  pxor   %xmm1,%xmm0
  movq   %xmm0,(%rcx)
  mov    %edx,%ecx
  and    $0xfffffff8,%ecx
  add    %ecx,%eax
  cmp    %ecx,%edx
  je     L131
L490:
  mov    %eax,%edx
  movzbl 0x160(%rsp,%rdx,1),%ecx
  xor    %cl,0x0(%rbp,%rdx,1)
  lea    0x1(%rax),%edx
  cmp    %edx,%r12d
  jbe    L131
  movzbl 0x160(%rsp,%rdx,1),%ecx
  xor    %cl,0x0(%rbp,%rdx,1)
  lea    0x2(%rax),%edx
  cmp    %edx,%r12d
  jbe    L131
  movzbl 0x160(%rsp,%rdx,1),%ecx
  xor    %cl,0x0(%rbp,%rdx,1)
  lea    0x3(%rax),%edx
  cmp    %edx,%r12d
  jbe    L131
  movzbl 0x160(%rsp,%rdx,1),%ecx
  xor    %cl,0x0(%rbp,%rdx,1)
  lea    0x4(%rax),%edx
  cmp    %edx,%r12d
  jbe    L131
  movzbl 0x160(%rsp,%rdx,1),%ecx
  xor    %cl,0x0(%rbp,%rdx,1)
  lea    0x5(%rax),%edx
  cmp    %edx,%r12d
  jbe    L131
  add    $0x6,%eax
  movzbl 0x160(%rsp,%rdx,1),%ecx
  xor    %cl,0x0(%rbp,%rdx,1)
  cmp    %eax,%r12d
  jbe    L131
  movzbl 0x160(%rsp,%rax,1),%edx
  xor    %dl,0x0(%rbp,%rax,1)
  jmp    L131
L351:
  mov    %r14d,%edi
  call   <seed_step@plt>
  xor    %eax,%eax
  jmp    L333
L522:
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    (%rsp),%rdi
  mov    %eax,%esi
  mov    %eax,%r14d
  call   <enc_type_2@plt>
  jmp    L412
L279:
  mov    %r14d,%edi
  call   <seed_step@plt>
  mov    (%rsp),%rdi
  mov    %eax,%esi
  mov    %eax,%r14d
  call   <enc_type_80@plt>
  jmp    L242
L529:
  mov    %r14d,%edi
  call   <seed_step@plt>
  mov    (%rsp),%rdi
  mov    %eax,%esi
  mov    %eax,%r14d
  call   <enc_type_20@plt>
  jmp    L53
L62:
  xor    %eax,%eax
  jmp    L225
L441:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int pad_init(unsigned int *pseed, unsigned int enc_type, unsigned char *pad, unsigned int pad_size) {
  unsigned int temp, i, seed = *pseed;
  memset(pad, 0, pad_size);
  if ((enc_type & 1) || !(enc_type & 0x1E7)) {
    unsigned char key_256_in[256];
    unsigned char key_256_out[256];
    ;
    for (i = 0; i < 0xFF; i++) {
      seed = seed_step(seed);
      temp = seed >> 0x11;
      key_256_in[i] = (unsigned char)(temp % 0xE0);
    }
    enc_type_1(key_256_out, key_256_in);
    for (i = 0; i < pad_size; i++)
      pad[i] ^= key_256_out[i];
  }
  if (enc_type & 0x1E6) {
    unsigned int key_80[20];
    ;
    for (i = 0; i < 20; i++) {
      seed = seed_step(seed);
      key_80[i] = seed;
    }
    if (enc_type & 0x02) {
      ;
      seed = seed_step(seed);
      enc_type_2(key_80, seed);
    }
    if (enc_type & 0x04) {
      seed = seed_step(seed);
      return 0;
    }
    if (enc_type & 0x20) {
      ;
      seed = seed_step(seed);
      enc_type_20(key_80, seed);
    }
    if (enc_type & 0x80) {
      ;
      seed = seed_step(seed);
      enc_type_80(key_80, seed);
    }
    if (enc_type & 0x100) {
      seed = seed_step(seed);
      return 0;
    }
    reverse_bytes(key_80, 20);
    for (i = 0; i < pad_size; i++)
      pad[i] ^= ((unsigned char *)key_80)[i];
  }
  *pseed = seed;
  return 1;
}
```