user: 请从给定的汇编指令推导出C源代码:

```asm
<i2c_read>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8d,-0x2c(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movl   $0x3,(%rax)
  nop
L28:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <i2c_is_busy@plt>
  test   %rax,%rax
  jne    L28
  cmpl   $0x1,-0x2c(%rbp)
  jne    L76
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  or     $0x1,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movl   $0x3,(%rax)
  nop
L56:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <i2c_is_busy@plt>
  test   %rax,%rax
  jne    L56
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movl   $0x4,(%rax)
  jmp    L73
L76:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  or     $0x1,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movl   $0xb,(%rax)
  nop
L43:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <i2c_is_busy@plt>
  test   %rax,%rax
  jne    L43
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  movl   $0x1,-0x4(%rbp)
  jmp    L45
L18:
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movl   $0x9,(%rax)
  nop
L22:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <i2c_is_busy@plt>
  test   %rax,%rax
  jne    L22
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x4(%rbp)
L45:
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x4(%rbp)
  jl     L18
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movl   $0x1,(%rax)
  nop
L63:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <i2c_is_busy@plt>
  test   %rax,%rax
  jne    L63
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movl   $0x4,(%rax)
  nop
L93:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <i2c_is_busy@plt>
  test   %rax,%rax
  jne    L93
L73:
  leave
  ret
```

assistant: ```c
void i2c_read(uint32_t *i2c, uint8_t address, uint8_t s_address, uint8_t *data, uint32_t size) {
  uint8_t i = 0;
  i2c[0x000 / 4] = address << 1;
  i2c[0x008 / 4] = s_address;
  i2c[0x004 / 4] = 0x03;
  while (i2c_is_busy(i2c))
    ;
  if (size == 1) {
    i2c[0x000 / 4] = i2c[0x000 / 4] | 0x01;
    i2c[0x004 / 4] = 0x03;
    while (i2c_is_busy(i2c))
      ;
    data[0] = i2c[0x008 / 4];
    i2c[0x004 / 4] = 0x04;
    return;
  }
  i2c[0x000 / 4] = i2c[0x000 / 4] | 0x01;
  i2c[0x004 / 4] = 0x0B;
  while (i2c_is_busy(i2c))
    ;
  data[0] = i2c[0x008 / 4];
  for (i = 1; i < size - 1; ++i) {
    i2c[0x004 / 4] = 0x09;
    while (i2c_is_busy(i2c))
      ;
    data[i] = i2c[0x008 / 4];
  }
  i2c[0x004 / 4] = 0x01;
  while (i2c_is_busy(i2c))
    ;
  data[size - 1] = i2c[0x008 / 4];
  i2c[0x004 / 4] = 0x04;
  while (i2c_is_busy(i2c))
    ;
}
```