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

```asm
<pad_init>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x290,%rsp
  mov    %rdi,-0x278(%rbp)
  mov    %esi,-0x27c(%rbp)
  mov    %rdx,-0x288(%rbp)
  mov    %ecx,-0x280(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x278(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x268(%rbp)
  mov    -0x280(%rbp),%edx
  mov    -0x288(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x27c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L40
  mov    -0x27c(%rbp),%eax
  and    $0x1e7,%eax
  test   %eax,%eax
  jne    L154
L40:
  movl   $0x0,-0x26c(%rbp)
  jmp    L77
L163:
  mov    -0x268(%rbp),%eax
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    %eax,-0x268(%rbp)
  mov    -0x268(%rbp),%eax
  shr    $0x11,%eax
  mov    %eax,-0x264(%rbp)
  mov    -0x264(%rbp),%eax
  mov    %eax,%edx
  shr    $0x5,%edx
  mov    %edx,%edx
  imul   $0x24924929,%rdx,%rdx
  shr    $0x20,%rdx
  imul   $0xe0,%edx,%edx
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x26c(%rbp),%eax
  mov    %dl,-0x210(%rbp,%rax,1)
  addl   $0x1,-0x26c(%rbp)
L77:
  cmpl   $0xfe,-0x26c(%rbp)
  jbe    L163
  lea    -0x210(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <enc_type_1@plt>
  movl   $0x0,-0x26c(%rbp)
  jmp    L68
L55:
  mov    -0x26c(%rbp),%edx
  mov    -0x288(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x26c(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%edx
  mov    -0x26c(%rbp),%esi
  mov    -0x288(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x26c(%rbp)
L68:
  mov    -0x26c(%rbp),%eax
  cmp    -0x280(%rbp),%eax
  jb     L55
L154:
  mov    -0x27c(%rbp),%eax
  and    $0x1e6,%eax
  test   %eax,%eax
  je     L24
  movl   $0x0,-0x26c(%rbp)
  jmp    L111
L127:
  mov    -0x268(%rbp),%eax
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    %eax,-0x268(%rbp)
  mov    -0x26c(%rbp),%eax
  mov    -0x268(%rbp),%edx
  mov    %edx,-0x260(%rbp,%rax,4)
  addl   $0x1,-0x26c(%rbp)
L111:
  cmpl   $0x13,-0x26c(%rbp)
  jbe    L127
  mov    -0x27c(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L63
  mov    -0x268(%rbp),%eax
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    %eax,-0x268(%rbp)
  mov    -0x268(%rbp),%edx
  lea    -0x260(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <enc_type_2@plt>
L63:
  mov    -0x27c(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L169
  mov    -0x268(%rbp),%eax
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    %eax,-0x268(%rbp)
  mov    $0x0,%eax
  jmp    L143
L169:
  mov    -0x27c(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L104
  mov    -0x268(%rbp),%eax
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    %eax,-0x268(%rbp)
  mov    -0x268(%rbp),%edx
  lea    -0x260(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <enc_type_20@plt>
L104:
  mov    -0x27c(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L44
  mov    -0x268(%rbp),%eax
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    %eax,-0x268(%rbp)
  mov    -0x268(%rbp),%edx
  lea    -0x260(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <enc_type_80@plt>
L44:
  mov    -0x27c(%rbp),%eax
  and    $0x100,%eax
  test   %eax,%eax
  je     L139
  mov    -0x268(%rbp),%eax
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    %eax,-0x268(%rbp)
  mov    $0x0,%eax
  jmp    L143
L139:
  lea    -0x260(%rbp),%rax
  mov    $0x14,%esi
  mov    %rax,%rdi
  call   <reverse_bytes@plt>
  movl   $0x0,-0x26c(%rbp)
  jmp    L179
L73:
  mov    -0x26c(%rbp),%edx
  mov    -0x288(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x26c(%rbp),%eax
  lea    -0x260(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x26c(%rbp),%esi
  mov    -0x288(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x26c(%rbp)
L179:
  mov    -0x26c(%rbp),%eax
  cmp    -0x280(%rbp),%eax
  jb     L73
L24:
  mov    -0x278(%rbp),%rax
  mov    -0x268(%rbp),%edx
  mov    %edx,(%rax)
  mov    $0x1,%eax
L143:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L114
  call   <__stack_chk_fail@plt>
L114:
  leave
  ret
```

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;
}
```