user: What would the C source look like for the assembly code provided here?

```asm
<spd_set_nbxcfg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movl   $0xff,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x50,-0x8(%rbp)
  jmp    L7
L30:
  mov    -0x8(%rbp),%eax
  mov    $0xb,%esi
  mov    %eax,%edi
  call   <smbus_read_byte@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  js     L89
  movl   $0x0,-0x4(%rbp)
  cmpl   $0x2,-0x4(%rbp)
  jne    L81
  mov    -0xc(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  xor    %eax,-0x10(%rbp)
  mov    -0x8(%rbp),%eax
  mov    $0x5,%esi
  mov    %eax,%edi
  call   <smbus_read_byte@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x1,-0x4(%rbp)
  jle    L79
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  xor    %eax,-0x10(%rbp)
  jmp    L23
L89:
  nop
  jmp    L23
L81:
  nop
  jmp    L23
L79:
  nop
L23:
  addl   $0x2,-0xc(%rbp)
  addl   $0x1,-0x8(%rbp)
L7:
  cmpl   $0x53,-0x8(%rbp)
  jbe    L30
  mov    -0x10(%rbp),%eax
  movzbl %al,%eax
  mov    %eax,%ecx
  mov    $0x53,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <pcibios_write_config_byte@plt>
  cmpl   $0xff,-0x10(%rbp)
  je     L53
  mov    $0x50,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <pcibios_read_config_byte@plt>
  mov    %al,-0x11(%rbp)
  orb    $0x80,-0x11(%rbp)
  movzbl -0x11(%rbp),%eax
  mov    %eax,%ecx
  mov    $0x50,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <pcibios_write_config_byte@plt>
  mov    $0x51,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <pcibios_read_config_byte@plt>
  mov    %al,-0x11(%rbp)
  orb    $0x1,-0x11(%rbp)
  movzbl -0x11(%rbp),%eax
  mov    %eax,%ecx
  mov    $0x51,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <pcibios_write_config_byte@plt>
  mov    $0x76,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <pcibios_read_config_byte@plt>
  mov    %al,-0x11(%rbp)
  orb    $0x4,-0x11(%rbp)
  movzbl -0x11(%rbp),%eax
  mov    %eax,%ecx
  mov    $0x76,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <pcibios_write_config_byte@plt>
L53:
  nop
  leave
  ret
```

assistant: ```c
void spd_set_nbxcfg(void) {
  unsigned reg;
  unsigned index;
  unsigned device;
  reg = 0xff;
  index = 0;
  device = 0x50;
  for (; device <= 0x53; index += 2, device += 1) {
    int byte;
    byte = smbus_read_byte(device, 11);
    if (byte < 0)
      continue;
    byte = 0;
    if (byte != 2)
      continue;
    reg ^= (1 << index);
    byte = smbus_read_byte(device, 5);
    if (byte <= 1)
      continue;
    reg ^= (1 << (index + 1));
  }
  pcibios_write_config_byte(0, ((0x00 << 3) + 0), 0x53, reg);
  if (reg != 0xff) {
    unsigned char byte;
    byte = pcibios_read_config_byte(0, ((0x00 << 3) + 0), 0x50);
    byte |= 0x80;
    pcibios_write_config_byte(0, ((0x00 << 3) + 0), 0x50, byte);
    byte = pcibios_read_config_byte(0, ((0x00 << 3) + 0), 0x51);
    byte |= 1;
    pcibios_write_config_byte(0, ((0x00 << 3) + 0), 0x51, byte);
    byte = pcibios_read_config_byte(0, ((0x00 << 3) + 0), 0x76);
    byte |= 4;
    pcibios_write_config_byte(0, ((0x00 << 3) + 0), 0x76, byte);
  }
}
```