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

```asm
<test_untemper>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  mov    %edi,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    %edi,(%rsp)
  mov    %edi,%eax
  sar    $0xb,%eax
  xor    %edi,%eax
  mov    %eax,0x4(%rsp)
  mov    %eax,%edx
  shl    $0x7,%edx
  and    $0x9d2c5680,%edx
  xor    %eax,%edx
  mov    %edx,0x8(%rsp)
  mov    %edx,%eax
  shl    $0xf,%eax
  and    $0xefc60000,%eax
  xor    %edx,%eax
  mov    %eax,0xc(%rsp)
  mov    %eax,%edx
  sar    $0x12,%edx
  xor    %edx,%eax
  mov    %eax,0x10(%rsp)
  mov    %eax,0x20(%rsp)
  mov    %eax,%edx
  sar    $0x12,%edx
  xor    %edx,%eax
  mov    %eax,0x24(%rsp)
  mov    %eax,%edx
  shl    $0xf,%edx
  and    $0xefc60000,%edx
  xor    %eax,%edx
  mov    %edx,0x28(%rsp)
  mov    %edx,%eax
  shl    $0x7,%eax
  and    $0x9d2c5680,%eax
  xor    %edx,%eax
  mov    %edx,%ecx
  shl    $0xe,%ecx
  and    $0x94284000,%ecx
  xor    %ecx,%eax
  mov    %edx,%ecx
  shl    $0x15,%ecx
  and    $0x14200000,%ecx
  xor    %ecx,%eax
  shl    $0x1c,%edx
  and    $0x10000000,%edx
  xor    %edx,%eax
  mov    %eax,0x2c(%rsp)
  mov    %eax,%r13d
  sar    $0xb,%r13d
  mov    %eax,%edx
  sar    $0x16,%edx
  xor    %edx,%r13d
  xor    %eax,%r13d
  mov    %r13d,0x30(%rsp)
  lea    0x20(%rsp),%r12
  mov    $0x0,%ebx
  lea    D4(%rip),%r14
  jmp    L7
L15:
  add    $0x1,%rbx
  sub    $0x4,%r12
  cmp    $0x5,%rbx
  je     L12
L7:
  cmp    %ebp,%r13d
  je     L15
  mov    0x10(%r12),%ecx
  mov    (%rsp,%rbx,4),%edx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <printf@plt>
  jmp    L15
L12:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x40,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L10:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D4
type_infered: string

tool: D4: 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]);
}
```