user: Converte this assembly snippet into its equivalent C code:

```asm
<SysCtlClockSet>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    0x400fe000,%rax
  test   $0x70000000,%eax
  je     L174
  mov    0x400fe000,%rax
  and    $0x70ff0000,%eax
  cmp    $0x10000000,%rax
  je     L174
L95:
  mov    0x400fe060,%rax
  mov    0x400fe070,%rbx
  mov    %rax,%r12
  mov    %rbx,%rdx
  and    $0xffffffffffbfffff,%r12
  or     $0x8,%dh
  or     $0x800,%r12
  mov    %r12,0x400fe060
  mov    %rdx,0x400fe070
  test   $0x2,%al
  je     L186
  test   $0x2,%bpl
  jne    L186
L157:
  mov    %rbp,%rax
  or     $0xfffffffffffffffc,%rax
  and    %rax,%r12
  mov    %r12,0x400fe060
  test   $0x80000000,%ebx
  je     L69
  mov    %rbx,%rax
  and    $0x30,%eax
  cmp    $0x30,%rax
  jne    L90
L158:
  mov    $0x1000,%edi
  call   <SysCtlDelay@plt>
  nopl   0x0(%rax,%rax,1)
L77:
  mov    %rbp,%rax
  and    $0x7fffff8f,%ebx
  mov    $0x10,%edi
  and    $0xfffffffffffff80f,%r12
  and    $0x7f0,%eax
  or     %rax,%r12
  mov    %rbp,%rax
  and    $0x80000030,%eax
  mov    %r12,0x400fe060
  and    $0xffffffffffffcfff,%r12
  or     %rax,%rbx
  lea    0x0(,%rbp,8),%rax
  and    $0x40,%eax
  or     %rax,%rbx
  mov    %rbx,%rax
  or     $0x8,%ah
  mov    %rax,0x400fe070
  call   <SysCtlDelay@plt>
  mov    %rbx,%rax
  mov    %rbp,%rcx
  mov    %rbp,%rdx
  and    $0x2000,%ecx
  and    $0xdf,%ah
  and    $0x3000,%edx
  movq   $0x40,0x400fe058
  or     %rcx,%rax
  or     %r12,%rdx
  mov    %rax,%rcx
  or     $0x8,%ch
  test   $0x80000000,%eax
  jne    L187
  mov    %rdx,0x400fe060
  mov    %rcx,0x400fe070
L2:
  mov    %rbp,%rcx
  and    $0xfffffffff83ffffc,%rdx
  and    $0xffffffffe07fffff,%rax
  and    $0x7c00003,%ecx
  or     $0x8,%ah
  or     %rdx,%rcx
  mov    %rbp,%rdx
  and    $0x1f800000,%edx
  or     %rdx,%rax
  mov    %rax,%rsi
  and    $0xffffffffbfffffff,%rsi
  test   $0x40000000,%ebp
  je     L38
  mov    %rbp,%rsi
  and    $0xffffffffffbfffff,%rax
  or     $0x400000,%rcx
  and    $0x40400000,%esi
  or     %rax,%rsi
L38:
  test   $0x800,%ebp
  jne    L185
  mov    $0x8000,%eax
  jmp    L150
  nopl   (%rax)
L136:
  sub    $0x1,%rax
  je     L146
L150:
  mov    0x400fe050,%rdx
  and    $0x40,%edx
  je     L136
L146:
  and    $0xf7,%ch
  and    $0xfffffffffffff7ff,%rsi
L185:
  mov    %rcx,0x400fe060
  mov    $0x10,%edi
  mov    %rsi,0x400fe070
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    1050 <SysCtlDelay@plt>
  nopl   0x0(%rax,%rax,1)
L186:
  test   $0x1,%al
  je     L77
  test   $0x1,%bpl
  jne    L77
  jmp    L157
  nop
L174:
  test   $0x80000000,%ebp
  je     L95
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L187:
  mov    %rcx,0x400fe070
  mov    %rdx,0x400fe060
  jmp    L2
  nopl   (%rax)
L69:
  mov    %r12,%rax
  and    $0x30,%eax
  cmp    $0x30,%rax
  je     L158
L90:
  mov    $0x80000,%edi
  call   <SysCtlDelay@plt>
  jmp    L77
```

assistant: ```c
void SysCtlClockSet(unsigned long ulConfig) {
  unsigned long ulDelay, ulRCC, ulRCC2;
  if (((((*((volatile unsigned long *)(0x400FE000))) & 0x70000000) == 0x00000000) || (((*((volatile unsigned long *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00000000))) && (ulConfig & 0x80000000)) {
    return;
  }
  ulRCC = (*((volatile unsigned long *)(0x400FE060)));
  ulRCC2 = (*((volatile unsigned long *)(0x400FE070)));
  ulRCC |= 0x00000800;
  ulRCC &= ~(0x00400000);
  ulRCC2 |= 0x00000800;
  (*((volatile unsigned long *)(0x400FE060))) = ulRCC;
  (*((volatile unsigned long *)(0x400FE070))) = ulRCC2;
  if (((ulRCC & 0x00000002) && !(ulConfig & 0x00000002)) || ((ulRCC & 0x00000001) && !(ulConfig & 0x00000001))) {
    ulRCC &= (~(0x00000002 | 0x00000001) | (ulConfig & (0x00000002 | 0x00000001)));
    (*((volatile unsigned long *)(0x400FE060))) = ulRCC;
    if (((ulRCC2 & 0x80000000) && (((ulRCC2 & 0x00000070) == 0x00000030) || ((ulRCC2 & 0x00000070) == 0x00000070))) || (!(ulRCC2 & 0x80000000) && ((ulRCC & 0x00000030) == 0x00000030))) {
      SysCtlDelay(4096);
    } else {
      SysCtlDelay(524288);
    }
  }
  ulRCC &= ~(0x000007C0 | 0x00000030);
  ulRCC |= ulConfig & (0x000007C0 | 0x00000030);
  ulRCC2 &= ~(0x80000000 | 0x00000070);
  ulRCC2 |= ulConfig & (0x80000000 | 0x00000030);
  ulRCC2 |= (ulConfig & 0x00000008) << 3;
  (*((volatile unsigned long *)(0x400FE060))) = ulRCC;
  (*((volatile unsigned long *)(0x400FE070))) = ulRCC2;
  SysCtlDelay(16);
  ulRCC &= ~(0x00002000 | 0x00001000);
  ulRCC |= ulConfig & (0x00002000 | 0x00001000);
  ulRCC2 &= ~(0x00002000);
  ulRCC2 |= ulConfig & 0x00002000;
  (*((volatile unsigned long *)(0x400FE058))) = 0x00000040;
  if (ulRCC2 & 0x80000000) {
    (*((volatile unsigned long *)(0x400FE070))) = ulRCC2;
    (*((volatile unsigned long *)(0x400FE060))) = ulRCC;
  } else {
    (*((volatile unsigned long *)(0x400FE060))) = ulRCC;
    (*((volatile unsigned long *)(0x400FE070))) = ulRCC2;
  }
  ulRCC &= ~(0x07800000 | 0x00400000 | 0x00000002 | 0x00000001);
  ulRCC |= ulConfig & (0x07800000 | 0x00400000 | 0x00000002 | 0x00000001);
  ulRCC2 &= ~(0x1F800000);
  ulRCC2 |= ulConfig & 0x1F800000;
  if (ulConfig & 0x40000000) {
    ulRCC |= 0x00400000;
    ulRCC2 &= ~(0x00400000);
    ulRCC2 |= ulConfig & (0x40000000 | 0x00400000);
  } else {
    ulRCC2 &= ~(0x40000000);
  }
  if (!(ulConfig & 0x00000800)) {
    for (ulDelay = 32768; ulDelay > 0; ulDelay--) {
      if ((*((volatile unsigned long *)(0x400FE050))) & 0x00000040) {
        break;
      }
    }
    ulRCC &= ~(0x00000800);
    ulRCC2 &= ~(0x00000800);
  }
  (*((volatile unsigned long *)(0x400FE060))) = ulRCC;
  (*((volatile unsigned long *)(0x400FE070))) = ulRCC2;
  SysCtlDelay(16);
}
```