user: 请将以下的汇编代码转换成C语言代码:

```asm
<pnx833x_gpio_setup_irq>:
  endbr64
  cmp    $0x5,%edi
  ja     L3
  mov    %edi,%edi
  lea    D0(%rip),%rdx
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0xb7e0f020,%r8d
  mov    (%r8),%rdi
  mov    $0x1,%eax
  mov    %esi,%ecx
  shl    %cl,%eax
  mov    %eax,%edx
  not    %edx
  movslq %edx,%rdx
  and    %rdx,%rdi
  mov    %rdi,(%r8)
  mov    $0xb7e0f024,%ecx
  mov    (%rcx),%rsi
  and    %rsi,%rdx
  mov    %rdx,(%rcx)
  mov    $0xb7e0f028,%edx
  mov    (%rdx),%rcx
  cltq
  or     %rcx,%rax
  mov    %rax,(%rdx)
  ret
  mov    $0xb7e0f020,%r8d
  mov    (%r8),%rdi
  mov    $0x1,%eax
  mov    %esi,%ecx
  shl    %cl,%eax
  mov    %eax,%edx
  not    %edx
  movslq %edx,%rdx
  and    %rdx,%rdi
  mov    %rdi,(%r8)
  mov    $0xb7e0f024,%ecx
  mov    (%rcx),%rsi
  cltq
  or     %rsi,%rax
  mov    %rax,(%rcx)
  mov    $0xb7e0f028,%eax
  mov    (%rax),%rcx
  and    %rcx,%rdx
  mov    %rdx,(%rax)
  ret
  mov    $0xb7e0f020,%r8d
  mov    (%r8),%rdi
  mov    $0x1,%eax
  mov    %esi,%ecx
  shl    %cl,%eax
  movslq %eax,%rdx
  or     %rdx,%rdi
  mov    %rdi,(%r8)
  mov    $0xb7e0f024,%ecx
  mov    (%rcx),%rsi
  or     %rsi,%rdx
  mov    %rdx,(%rcx)
  mov    $0xb7e0f028,%edx
  mov    (%rdx),%rcx
  not    %eax
  cltq
  and    %rcx,%rax
  mov    %rax,(%rdx)
  ret
  mov    $0xb7e0f020,%r8d
  mov    (%r8),%rdi
  mov    $0x1,%eax
  mov    %esi,%ecx
  shl    %cl,%eax
  movslq %eax,%rdx
  or     %rdx,%rdi
  mov    %rdi,(%r8)
  mov    $0xb7e0f024,%ecx
  mov    (%rcx),%rsi
  not    %eax
  cltq
  and    %rsi,%rax
  mov    %rax,(%rcx)
  mov    $0xb7e0f028,%eax
  mov    (%rax),%rcx
  or     %rcx,%rdx
  mov    %rdx,(%rax)
  ret
  mov    $0xb7e0f020,%edi
  mov    (%rdi),%rdx
  mov    $0x1,%eax
  mov    %esi,%ecx
  shl    %cl,%eax
  cltq
  or     %rax,%rdx
  mov    %rdx,(%rdi)
  mov    $0xb7e0f024,%ecx
  mov    (%rcx),%rdx
  or     %rax,%rdx
  mov    %rdx,(%rcx)
  mov    $0xb7e0f028,%edx
  mov    (%rdx),%rcx
  or     %rcx,%rax
  mov    %rax,(%rdx)
  ret
L3:
  mov    $0xb7e0f020,%edi
  mov    (%rdi),%rdx
  mov    $0xfffffffe,%eax
  mov    %esi,%ecx
  rol    %cl,%eax
  cltq
  and    %rax,%rdx
  mov    %rdx,(%rdi)
  mov    $0xb7e0f024,%ecx
  mov    (%rcx),%rdx
  and    %rax,%rdx
  mov    %rdx,(%rcx)
  mov    $0xb7e0f028,%edx
  mov    (%rdx),%rcx
  and    %rcx,%rax
  mov    %rax,(%rdx)
  ret
```

assistant: ```c
void pnx833x_gpio_setup_irq(int when, unsigned int pin) {
  switch (when) {
  case 1:
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF020))) &= ~(1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF024))) &= ~(1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF028))) |= (1 << (pin)));
    } while (0);
    break;
  case 2:
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF020))) &= ~(1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF024))) |= (1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF028))) &= ~(1 << (pin)));
    } while (0);
    break;
  case 3:
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF020))) |= (1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF024))) |= (1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF028))) &= ~(1 << (pin)));
    } while (0);
    break;
  case 4:
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF020))) |= (1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF024))) &= ~(1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF028))) |= (1 << (pin)));
    } while (0);
    break;
  case 5:
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF020))) |= (1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF024))) |= (1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF028))) |= (1 << (pin)));
    } while (0);
    break;
  default:
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF020))) &= ~(1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF024))) &= ~(1 << (pin)));
    } while (0);
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) + 0xF028))) &= ~(1 << (pin)));
    } while (0);
    break;
  }
}
```