user: Translate the below assembly code into C programming language:

```asm
<set_ics_data>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %edx,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  call   <smbus_reset@plt>
  mov    $0x505,%esi
  xor    %edi,%edi
  call   <outb@plt>
  mov    $0x80,%esi
  mov    $0x80,%edi
  call   <outb@plt>
  xor    %eax,%eax
  call   <smbus_wait_until_ready@plt>
  mov    $0x502,%edi
  call   <inb@plt>
  mov    $0x507,%esi
  cmp    $0xd2,%bl
  je     L5
  mov    $0x8,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xff,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x3f,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  xor    %edi,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  xor    %edi,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xff,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xff,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xff,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xff,%edi
  call   <outb@plt>
L15:
  movzbl %bl,%edi
  mov    $0x504,%esi
  call   <outb@plt>
  mov    $0x503,%esi
  xor    %edi,%edi
  call   <outb@plt>
  movsbl %bpl,%edi
  mov    $0x505,%esi
  call   <outb@plt>
  mov    $0x502,%esi
  mov    $0x74,%edi
  call   <outb@plt>
  mov    $0x80,%esi
  mov    $0x80,%edi
  call   <outb@plt>
  xor    %eax,%eax
  call   <smbus_wait_until_ready@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  jmp    1090 <smbus_reset@plt>
  nopl   0x0(%rax)
L5:
  mov    $0xd,%edi
  call   <outb@plt>
  xor    %edi,%edi
  mov    $0x507,%esi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x3f,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xcd,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x7f,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xbf,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x1a,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x2a,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x1,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xf,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0xb,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x80,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x8d,%edi
  call   <outb@plt>
  mov    $0x507,%esi
  mov    $0x9b,%edi
  call   <outb@plt>
  jmp    L15
```

assistant: ```c
void set_ics_data(unsigned char dev, int data, char len) {
  smbus_reset();
  outb(0x00, 0x0500 + 0x5);
  outb(0x80, 0x80);
  smbus_wait_until_ready();
  inb(0x0500 + 0x2);
  if (dev == 0xd2) {
    outb(0x0d, 0x0500 + 0x7);
    outb(0x00, 0x0500 + 0x7);
    outb(0x3f, 0x0500 + 0x7);
    outb(0xcd, 0x0500 + 0x7);
    outb(0x7f, 0x0500 + 0x7);
    outb(0xbf, 0x0500 + 0x7);
    outb(0x1a, 0x0500 + 0x7);
    outb(0x2a, 0x0500 + 0x7);
    outb(0x01, 0x0500 + 0x7);
    outb(0x0f, 0x0500 + 0x7);
    outb(0x0b, 0x0500 + 0x7);
    outb(0x80, 0x0500 + 0x7);
    outb(0x8d, 0x0500 + 0x7);
    outb(0x9b, 0x0500 + 0x7);
  } else {
    outb(0x08, 0x0500 + 0x7);
    outb(0xff, 0x0500 + 0x7);
    outb(0x3f, 0x0500 + 0x7);
    outb(0x00, 0x0500 + 0x7);
    outb(0x00, 0x0500 + 0x7);
    outb(0xff, 0x0500 + 0x7);
    outb(0xff, 0x0500 + 0x7);
    outb(0xff, 0x0500 + 0x7);
    outb(0xff, 0x0500 + 0x7);
  }
  outb(dev, 0x0500 + 0x4);
  outb(0, 0x0500 + 0x3);
  outb(len, 0x0500 + 0x5);
  outb(0x74, 0x0500 + 0x2);
  outb(0x80, 0x80);
  smbus_wait_until_ready();
  smbus_reset();
}
```