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

```asm
<pad_init>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x278,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %esi,%r15d
  mov    %rdx,%r13
  mov    %ecx,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0x268(%rsp)
  xor    %eax,%eax
  mov    (%rdi),%ebx
  mov    %ecx,%edx
  mov    $0x0,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  test   $0x1,%r15b
  je     L191
L57:
  lea    0x60(%rsp),%rbp
  lea    0x15f(%rsp),%r12
L5:
  mov    %ebx,%edi
  call   <seed_step@plt>
  mov    %eax,%ebx
  mov    %eax,%edx
  shr    $0x11,%edx
  shr    $0x16,%eax
  mov    %eax,%eax
  imul   $0x24924929,%rax,%rax
  shr    $0x20,%rax
  imul   $0xe0,%eax,%eax
  sub    %eax,%edx
  mov    %dl,0x0(%rbp)
  add    $0x1,%rbp
  cmp    %r12,%rbp
  jne    L5
  lea    0x60(%rsp),%rsi
  lea    0x160(%rsp),%rdi
  call   <enc_type_1@plt>
  test   %r14d,%r14d
  je     L22
  mov    %r14d,%ecx
  mov    $0x0,%eax
L89:
  movzbl 0x160(%rsp,%rax,1),%edx
  xor    %dl,0x0(%r13,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L89
L22:
  test   $0x1e6,%r15d
  je     L79
  lea    0x10(%rsp),%rbp
  lea    0x60(%rsp),%r12
L164:
  mov    %ebx,%edi
  call   <seed_step@plt>
  mov    %eax,%ebx
  mov    %eax,0x0(%rbp)
  add    $0x4,%rbp
  cmp    %rbp,%r12
  jne    L164
  test   $0x2,%r15b
  jne    L196
L81:
  test   $0x4,%r15b
  jne    L132
  test   $0x20,%r15b
  jne    L7
L86:
  test   $0x80,%r15b
  jne    L149
L47:
  test   $0x100,%r15d
  jne    L72
  lea    0x10(%rsp),%rdi
  mov    $0x14,%esi
  call   <reverse_bytes@plt>
  test   %r14d,%r14d
  je     L79
  mov    %r14d,%r14d
  mov    $0x0,%eax
L29:
  movzbl 0x10(%rsp,%rax,1),%edx
  xor    %dl,0x0(%r13,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%r14
  jne    L29
L79:
  mov    0x8(%rsp),%rax
  mov    %ebx,(%rax)
  mov    $0x1,%eax
L139:
  mov    0x268(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L17
  add    $0x278,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L191:
  test   $0x1e7,%r15d
  je     L57
  jmp    L22
L196:
  mov    %eax,%edi
  call   <seed_step@plt>
  mov    %eax,%ebx
  lea    0x10(%rsp),%rdi
  mov    %eax,%esi
  call   <enc_type_2@plt>
  jmp    L81
L132:
  mov    %ebx,%edi
  call   <seed_step@plt>
  jmp    L49
L7:
  mov    %ebx,%edi
  call   <seed_step@plt>
  mov    %eax,%ebx
  lea    0x10(%rsp),%rdi
  mov    %eax,%esi
  call   <enc_type_20@plt>
  jmp    L86
L149:
  mov    %ebx,%edi
  call   <seed_step@plt>
  mov    %eax,%ebx
  lea    0x10(%rsp),%rdi
  mov    %eax,%esi
  call   <enc_type_80@plt>
  jmp    L47
L72:
  mov    %ebx,%edi
  call   <seed_step@plt>
L49:
  mov    $0x0,%eax
  jmp    L139
L17:
  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;
}
```