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

```asm
<pnx833x_gpio_setup_irq>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    %esi,-0x8(%rbp)
  cmpl   $0x5,-0x4(%rbp)
  ja     L36
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D9(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D9(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0xb7e0f020,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f020,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f024,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f024,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f028,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f028,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  jmp    L13
  mov    $0xb7e0f020,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f020,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f024,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f024,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f028,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f028,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  jmp    L13
  mov    $0xb7e0f020,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f020,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f024,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f024,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f028,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f028,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  jmp    L13
  mov    $0xb7e0f020,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f020,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f024,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f024,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f028,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f028,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  jmp    L13
  mov    $0xb7e0f020,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f020,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f024,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f024,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f028,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    $0xb7e0f028,%eax
  or     %rsi,%rdx
  mov    %rdx,(%rax)
  jmp    L13
L36:
  mov    $0xb7e0f020,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f020,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f024,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f024,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  mov    $0xb7e0f028,%eax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  movslq %eax,%rdx
  mov    $0xb7e0f028,%eax
  and    %rsi,%rdx
  mov    %rdx,(%rax)
  nop
L13:
  nop
  pop    %rbp
  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;
  }
}
```