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

```asm
<test_untemper>:
  endbr64
  push   %r13
  mov    %edi,%ecx
  movd   %edi,%xmm0
  mov    %edi,%esi
  push   %r12
  sar    $0xb,%ecx
  push   %rbp
  xor    %edi,%ecx
  push   %rbx
  movd   %ecx,%xmm3
  punpckldq %xmm3,%xmm0
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    %ecx,%eax
  shl    $0x7,%eax
  and    $0x9d2c5680,%eax
  xor    %ecx,%eax
  mov    %eax,%edx
  movd   %eax,%xmm1
  shl    $0xf,%edx
  and    $0xefc60000,%edx
  xor    %eax,%edx
  mov    %edx,%ecx
  movd   %edx,%xmm2
  sar    $0x12,%ecx
  punpckldq %xmm2,%xmm1
  xor    %edx,%ecx
  punpcklqdq %xmm1,%xmm0
  mov    %ecx,%edi
  mov    %ecx,0x10(%rsp)
  sar    $0x12,%edi
  movaps %xmm0,(%rsp)
  movd   %ecx,%xmm0
  xor    %ecx,%edi
  mov    %edi,%edx
  movd   %edi,%xmm5
  shl    $0xf,%edx
  punpckldq %xmm5,%xmm0
  and    $0xefc60000,%edx
  xor    %edi,%edx
  mov    %edx,%eax
  mov    %edx,%r8d
  movd   %edx,%xmm1
  shl    $0x7,%eax
  shl    $0xe,%r8d
  and    $0x9d2c5680,%eax
  and    $0x94284000,%r8d
  xor    %edx,%eax
  xor    %r8d,%eax
  mov    %edx,%r8d
  shl    $0x15,%r8d
  and    $0x14200000,%r8d
  xor    %r8d,%eax
  mov    %edx,%r8d
  shl    $0x1c,%r8d
  and    $0x10000000,%r8d
  xor    %r8d,%eax
  mov    %eax,%edx
  mov    %eax,%ecx
  movd   %eax,%xmm4
  sar    $0xb,%edx
  sar    $0x16,%ecx
  punpckldq %xmm4,%xmm1
  xor    %ecx,%edx
  punpcklqdq %xmm1,%xmm0
  xor    %edx,%eax
  movaps %xmm0,0x20(%rsp)
  mov    %eax,0x30(%rsp)
  cmp    %esi,%eax
  jne    L33
L38:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L33:
  lea    0x20(%rsp),%rbp
  xor    %ebx,%ebx
  mov    %rsp,%r13
  lea    D1(%rip),%r12
L12:
  mov    0x10(%rbp),%ecx
  mov    0x0(%r13,%rbx,4),%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  add    $0x1,%rbx
  sub    $0x4,%rbp
  call   <printf@plt>
  cmp    $0x5,%rbx
  jne    L12
  jmp    L38
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D1
type_guessed: string

tool: D1: Tempering steps %zu: 0x%02x - 0x%02x 


assistant: ```c
void test_untemper(const uint32_t val) {
  size_t i;
  uint32_t temp_steps[5], untemp_steps[5];
  temp_steps[0] = val;
  temp_steps[1] = temp_steps[0] ^ (temp_steps[0] >> 11);
  temp_steps[2] = temp_steps[1] ^ ((temp_steps[1] << 7) & (0x9d2c5680));
  temp_steps[3] = temp_steps[2] ^ ((temp_steps[2] << 15) & (0xefc60000));
  temp_steps[4] = temp_steps[3] ^ (temp_steps[3] >> 18);
  untemp_steps[0] = temp_steps[4];
  untemp_steps[1] = untemp_steps[0] ^ (untemp_steps[0] >> 18);
  untemp_steps[2] = (untemp_steps[1]) ^ ((untemp_steps[1] << 15) & (0xefc60000));
  untemp_steps[3] = (untemp_steps[2]) ^ ((untemp_steps[2] << 7) & (0x9d2c5680)) ^ ((((untemp_steps[2] << 7) & (0x9d2c5680)) << 7) & (0x9d2c5680)) ^ ((((((untemp_steps[2] << 7) & (0x9d2c5680)) << 7) & (0x9d2c5680)) << 7) & (0x9d2c5680)) ^ ((((((((untemp_steps[2] << 7) & (0x9d2c5680)) << 7) & (0x9d2c5680)) << 7) & (0x9d2c5680)) << 7) & (0x9d2c5680));
  untemp_steps[4] = untemp_steps[3] ^ (untemp_steps[3] >> 11) ^ (untemp_steps[3] >> 22);
  for (i = 0; i < 5; i++)
    if (untemp_steps[4] != temp_steps[0])
      printf("Tempering steps %zu: 0x%02x - 0x%02x \n", i, temp_steps[i], untemp_steps[4 - i]);
}
```