user: Converte this assembly snippet into its equivalent C code:

```asm
<init_can>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  lea    D120(%rip),%rax
  cmp    %rax,%rdi
  je     L32
  mov    %rsi,%rbx
  lea    D165(%rip),%rax
  cmp    %rax,%rdi
  je     L46
L56:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L32:
  lea    D69(%rip),%rbx
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D59(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D264(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0000,%ebx
  movzbl (%rbx),%esi
  or     $0x1,%esi
  mov    %sil,(%rbx)
  movzbl %sil,%esi
  lea    D365(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D57(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc001f,%eax
  movzbl (%rax),%esi
  and    $0x78,%esi
  or     $0x7,%esi
  mov    %sil,(%rax)
  movzbl %sil,%esi
  lea    D274(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D173(%rip),%rdi
  call   <puts@plt>
  lea    D334(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0006,%eax
  movb   $0xa8,(%rax)
  mov    $0xa8,%esi
  lea    D4(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D318(%rip),%rdi
  call   <puts@plt>
  lea    D245(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0007,%eax
  movb   $0x34,(%rax)
  mov    $0x34,%esi
  lea    D428(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D303(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0004,%eax
  movb   $0xea,(%rax)
  mov    $0xea,%esi
  lea    D10(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D63(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0005,%eax
  movb   $0xf,(%rax)
  mov    $0xf,%esi
  lea    D188(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x32,%edi
  call   <kill_time@plt>
  lea    D385(%rip),%rdi
  call   <puts@plt>
  movzbl (%rbx),%esi
  and    $0xfffffffe,%esi
  mov    %sil,(%rbx)
  movzbl %sil,%esi
  lea    D133(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x32,%edi
  call   <kill_time@plt>
  jmp    L56
L46:
  lea    D69(%rip),%rbp
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    D140(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    D264(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0000,%eax
  movzbl (%rax),%esi
  or     $0x1,%esi
  mov    %sil,(%rax)
  movzbl %sil,%esi
  lea    D365(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x32,%edi
  call   <kill_time@plt>
  lea    D217(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc001f,%eax
  movzbl (%rax),%esi
  or     $0xffffff87,%esi
  mov    %sil,(%rax)
  movzbl %sil,%esi
  lea    D274(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x32,%edi
  call   <kill_time@plt>
  lea    D173(%rip),%rdi
  call   <puts@plt>
  lea    D334(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0006,%eax
  movb   $0xa8,(%rax)
  mov    $0xa8,%esi
  lea    D4(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D318(%rip),%rdi
  call   <puts@plt>
  lea    D245(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0007,%eax
  movb   $0x34,(%rax)
  mov    $0x34,%esi
  lea    D428(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D303(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0010,%eax
  movb   $0xa6,(%rax)
  mov    $0xa6,%esi
  lea    D45(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffc0011,%eax
  movb   $0xb0,(%rax)
  mov    $0xb0,%esi
  lea    D121(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffc0012,%eax
  movb   $0x12,(%rax)
  mov    $0x12,%esi
  lea    D288(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffc0013,%eax
  movb   $0x30,(%rax)
  mov    $0x30,%esi
  lea    D31(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D63(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0014,%eax
  movb   $0x0,(%rax)
  mov    $0x0,%esi
  lea    D72(%rip),%rbp
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffc0015,%eax
  movb   $0x0,(%rax)
  mov    $0x0,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffc0016,%eax
  movb   $0x0,(%rax)
  mov    $0x0,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffc0017,%eax
  movb   $0x0,(%rax)
  mov    $0x0,%esi
  lea    D188(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D304(%rip),%rax
  cmp    %rax,%rbx
  je     L8
L36:
  lea    D385(%rip),%rdi
  call   <puts@plt>
  mov    $0xfffc0000,%eax
  movzbl (%rax),%esi
  and    $0xfffffffe,%esi
  mov    %sil,(%rax)
  movzbl %sil,%esi
  lea    D133(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x32,%edi
  call   <kill_time@plt>
  jmp    L56
L8:
  mov    $0x0,%eax
  call   <self_testing_mode@plt>
  jmp    L36
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D120
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D165
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D69
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D59
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D264
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D365
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D57
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D274
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D173
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D334
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D4
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D318
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D245
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D428
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D303
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D10
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D63
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D188
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D385
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D133
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D140
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D217
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D45
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D121
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D288
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D31
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D72
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D304
type_guessed: string

tool: D120: Basic

tool: D165: Extended

tool: D69: ************************************

tool: D59: ********** Basic Can Mode **********

tool: D264: Switch on Reset Mode

tool: D365: control_register: 0x%X 



tool: D57: Set clock divider register to basic can mode

tool: D274: clock_divider_register: 0x%X 



tool: D173: Set bus timing register 0

tool: D334: Sync Jump Width = 2  Baudrate Prescaler = 1

tool: D4: bus timing register 0: 0x%X 



tool: D318: Set bus timing register 1

tool: D245: SAM = 0 ---> Single Sampling

tool: D428: bus timing register 1: 0x%X 



tool: D303: Set acceptance code register

tool: D10: acceptance code register: 0x%X 



tool: D63: Set acceptance mask register

tool: D188: acceptance mask register: 0x%X 



tool: D385: Switch off reset mode

tool: D133: control_register 0x%X 



tool: D140: ******** Extended Can Mode *********

tool: D217: Set clock divider register to extended can mode

tool: D45: acceptance code register 0: 0x%X 


tool: D121: acceptance code register 1: 0x%X 


tool: D288: acceptance code register 2: 0x%X 


tool: D31: acceptance code register 3: 0x%X 



tool: D72: acceptance mask register: 0x%X 


tool: D304: self_test

assistant: ```c
void init_can(char *mode, char *self_test) {
  unsigned char r_val;
  if (mode == "Basic") {
    printf("************************************\n");
    printf("********** Basic Can Mode **********\n");
    printf("************************************\n");
    printf("Switch on Reset Mode\n");
    r_val = *((unsigned char *)(0xfffc0000)) | 0x01;
    *((unsigned char *)(0xfffc0000)) = r_val;
    printf("control_register: 0x%X \n\n", *((unsigned char *)(0xfffc0000)));
    printf("Set clock divider register to basic can mode\n");
    r_val = *((unsigned char *)(0xfffc001F)) & 0x7F | 0x07;
    *((unsigned char *)(0xfffc001F)) = r_val;
    printf("clock_divider_register: 0x%X \n\n", *((unsigned char *)(0xfffc001F)));
    printf("Set bus timing register 0\n");
    printf("Sync Jump Width = 2  Baudrate Prescaler = 1\n");
    *((unsigned char *)(0xfffc0006)) = 0xA8;
    printf("bus timing register 0: 0x%X \n\n", *((unsigned char *)(0xfffc0006)));
    printf("Set bus timing register 1\n");
    printf("SAM = 0 ---> Single Sampling\n");
    *((unsigned char *)(0xfffc0007)) = 0x34;
    printf("bus timing register 1: 0x%X \n\n", *((unsigned char *)(0xfffc0007)));
    printf("Set acceptance code register\n");
    *((unsigned char *)(0xfffc0004)) = 0xEA;
    printf("acceptance code register: 0x%X \n\n", *((unsigned char *)(0xfffc0004)));
    printf("Set acceptance mask register\n");
    *((unsigned char *)(0xfffc0005)) = 0x0F;
    printf("acceptance mask register: 0x%X \n\n", *((unsigned char *)(0xfffc0005)));
    kill_time(50);
    printf("Switch off reset mode\n");
    r_val = *((unsigned char *)(0xfffc0000)) & 0xFE;
    *((unsigned char *)(0xfffc0000)) = r_val;
    printf("control_register 0x%X \n\n", *((unsigned char *)(0xfffc0000)));
    kill_time(50);
  } else if (mode == "Extended") {
    printf("************************************\n");
    printf("******** Extended Can Mode *********\n");
    printf("************************************\n");
    printf("Switch on Reset Mode\n");
    r_val = *((unsigned char *)(0xfffc0000)) | 0x01;
    *((unsigned char *)(0xfffc0000)) = r_val;
    printf("control_register: 0x%X \n\n", *((unsigned char *)(0xfffc0000)));
    kill_time(50);
    printf("Set clock divider register to extended can mode\n");
    r_val = *((unsigned char *)(0xfffc001F)) | 0x80 | 0x07;
    *((unsigned char *)(0xfffc001F)) = r_val;
    printf("clock_divider_register: 0x%X \n\n", *((unsigned char *)(0xfffc001F)));
    kill_time(50);
    printf("Set bus timing register 0\n");
    printf("Sync Jump Width = 2  Baudrate Prescaler = 1\n");
    *((unsigned char *)(0xfffc0006)) = 0xA8;
    printf("bus timing register 0: 0x%X \n\n", *((unsigned char *)(0xfffc0006)));
    printf("Set bus timing register 1\n");
    printf("SAM = 0 ---> Single Sampling\n");
    *((unsigned char *)(0xfffc0007)) = 0x34;
    printf("bus timing register 1: 0x%X \n\n", *((unsigned char *)(0xfffc0007)));
    printf("Set acceptance code register\n");
    *((unsigned char *)(0xfffc0010)) = 0xA6;
    printf("acceptance code register 0: 0x%X \n", *((unsigned char *)(0xfffc0010)));
    *((unsigned char *)(0xfffc0011)) = 0xB0;
    printf("acceptance code register 1: 0x%X \n", *((unsigned char *)(0xfffc0011)));
    *((unsigned char *)(0xfffc0012)) = 0x12;
    printf("acceptance code register 2: 0x%X \n", *((unsigned char *)(0xfffc0012)));
    *((unsigned char *)(0xfffc0013)) = 0x30;
    printf("acceptance code register 3: 0x%X \n\n", *((unsigned char *)(0xfffc0013)));
    printf("Set acceptance mask register\n");
    *((unsigned char *)(0xfffc0014)) = 0x00;
    printf("acceptance mask register: 0x%X \n", *((unsigned char *)(0xfffc0014)));
    *((unsigned char *)(0xfffc0015)) = 0x00;
    printf("acceptance mask register: 0x%X \n", *((unsigned char *)(0xfffc0015)));
    *((unsigned char *)(0xfffc0016)) = 0x00;
    printf("acceptance mask register: 0x%X \n", *((unsigned char *)(0xfffc0016)));
    *((unsigned char *)(0xfffc0017)) = 0x00;
    printf("acceptance mask register: 0x%X \n\n", *((unsigned char *)(0xfffc0017)));
    if (self_test == "self_test") {
      self_testing_mode();
    }
    printf("Switch off reset mode\n");
    r_val = *((unsigned char *)(0xfffc0000)) & 0xFE;
    *((unsigned char *)(0xfffc0000)) = r_val;
    printf("control_register 0x%X \n\n", *((unsigned char *)(0xfffc0000)));
    kill_time(50);
  }
}
```