#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
int _addcarryx_u51(int, int, int, int *);
int _subborrow_u51(int, int, int, int *);
int cmovznz64(int, int, int);
void __attribute__((always_)) freeze(uint64_t *out, uint64_t x7, uint64_t x8,
                                     uint64_t x6, uint64_t x4, uint64_t x2) {
  uint64_t x10;
  uint8_t x11 = _subborrow_u51(0x0, x2, 0x7ffffffffffed, &x10);
  {
    uint64_t x13;
    uint8_t x14 = _subborrow_u51(x11, x4, 0x7ffffffffffff, &x13);
    {
      uint64_t x16;
      uint8_t x17 = _subborrow_u51(x14, x6, 0x7ffffffffffff, &x16);
      {
        uint64_t x19;
        uint8_t x20 = _subborrow_u51(x17, x8, 0x7ffffffffffff, &x19);
        {
          uint64_t x22;
          uint8_t x23 = _subborrow_u51(x20, x7, 0x7ffffffffffff, &x22);
          {
            uint64_t x24 = cmovznz64(x23, 0x0, 0xffffffffffffffffL);
            {
              uint64_t x25 = (x24 & 0x7ffffffffffed);
              {
                uint64_t x27;
                uint8_t x28 = _addcarryx_u51(0x0, x10, x25, &x27);
                {
                  uint64_t x29 = (x24 & 0x7ffffffffffff);
                  {
                    uint64_t x31;
                    uint8_t x32 = _addcarryx_u51(x28, x13, x29, &x31);
                    {
                      uint64_t x33 = (x24 & 0x7ffffffffffff);
                      {
                        uint64_t x35;
                        uint8_t x36 = _addcarryx_u51(x32, x16, x33, &x35);
                        {
                          uint64_t x37 = (x24 & 0x7ffffffffffff);
                          {
                            uint64_t x39;
                            uint8_t x40 = _addcarryx_u51(x36, x19, x37, &x39);
                            {
                              uint64_t x41 = (x24 & 0x7ffffffffffff);
                              {
                                uint64_t x43;
                                uint8_t _ = _addcarryx_u51(x40, x22, x41, &x43);
                                out[0] = x43;
                                out[1] = x39;
                                out[2] = x35;
                                out[3] = x31;
                                out[4] = x27;
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<freeze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
xor    %edi,%edi
mov    $0xffffffed,%edx
lea    -0x20(%rbp),%rcx
call   1030 <_subborrow_u51@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0xffffffff,%edx
lea    -0x28(%rbp),%rcx
call   1030 <_subborrow_u51@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    $0xffffffff,%edx
lea    -0x30(%rbp),%rcx
call   1030 <_subborrow_u51@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0xffffffff,%edx
lea    -0x38(%rbp),%rcx
call   1030 <_subborrow_u51@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0xffffffff,%edx
lea    -0x40(%rbp),%rcx
call   1030 <_subborrow_u51@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
call   1050 <cmovznz64@plt>
mov    %eax,-0x48(%rbp)
movslq -0x48(%rbp),%rax
movabs $0x7ffffffffffed,%rcx
and    %rcx,%rax
mov    %eax,-0x4c(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
lea    -0x50(%rbp),%rcx
call   1040 <_addcarryx_u51@plt>
mov    %eax,-0x54(%rbp)
movslq -0x48(%rbp),%rax
movabs $0x7ffffffffffff,%rcx
and    %rcx,%rax
mov    %eax,-0x58(%rbp)
mov    -0x54(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x58(%rbp),%edx
lea    -0x5c(%rbp),%rcx
call   1040 <_addcarryx_u51@plt>
mov    %eax,-0x60(%rbp)
movslq -0x48(%rbp),%rax
movabs $0x7ffffffffffff,%rcx
and    %rcx,%rax
mov    %eax,-0x64(%rbp)
mov    -0x60(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x64(%rbp),%edx
lea    -0x68(%rbp),%rcx
call   1040 <_addcarryx_u51@plt>
mov    %eax,-0x6c(%rbp)
movslq -0x48(%rbp),%rax
movabs $0x7ffffffffffff,%rcx
and    %rcx,%rax
mov    %eax,-0x70(%rbp)
mov    -0x6c(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    -0x70(%rbp),%edx
lea    -0x74(%rbp),%rcx
call   1040 <_addcarryx_u51@plt>
mov    %eax,-0x78(%rbp)
movslq -0x48(%rbp),%rax
movabs $0x7ffffffffffff,%rcx
and    %rcx,%rax
mov    %eax,-0x7c(%rbp)
mov    -0x78(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x7c(%rbp),%edx
lea    -0x80(%rbp),%rcx
call   1040 <_addcarryx_u51@plt>
mov    %eax,-0x84(%rbp)
mov    -0x80(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x74(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x68(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x5c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x50(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeze>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    %r8d,%ebp
mov    %ecx,%r12d
mov    %edx,%r15d
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0x2c(%rsp),%rcx
xor    %edi,%edi
mov    %r9d,%esi
mov    $0xffffffed,%edx
call   1030 <_subborrow_u51@plt>
lea    0x28(%rsp),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    $0xffffffff,%edx
call   1030 <_subborrow_u51@plt>
lea    0x24(%rsp),%rcx
mov    %eax,%edi
mov    %r12d,%esi
mov    $0xffffffff,%edx
call   1030 <_subborrow_u51@plt>
lea    0x20(%rsp),%rcx
mov    %eax,%edi
mov    %r15d,%esi
mov    $0xffffffff,%edx
call   1030 <_subborrow_u51@plt>
lea    0x1c(%rsp),%rcx
mov    %eax,%edi
mov    %r14d,%esi
mov    $0xffffffff,%edx
call   1030 <_subborrow_u51@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
call   1050 <cmovznz64@plt>
mov    %eax,%ebp
mov    %eax,%edx
and    $0xffffffed,%edx
mov    0x2c(%rsp),%esi
lea    0x18(%rsp),%rcx
xor    %edi,%edi
call   1040 <_addcarryx_u51@plt>
mov    0x28(%rsp),%esi
lea    0x14(%rsp),%rcx
mov    %eax,%edi
mov    %ebp,%edx
call   1040 <_addcarryx_u51@plt>
mov    0x24(%rsp),%esi
lea    0x10(%rsp),%rcx
mov    %eax,%edi
mov    %ebp,%edx
call   1040 <_addcarryx_u51@plt>
mov    0x20(%rsp),%esi
lea    0xc(%rsp),%rcx
mov    %eax,%edi
mov    %ebp,%edx
call   1040 <_addcarryx_u51@plt>
mov    0x1c(%rsp),%esi
lea    0x8(%rsp),%rcx
mov    %eax,%edi
mov    %ebp,%edx
call   1040 <_addcarryx_u51@plt>
mov    0x8(%rsp),%eax
mov    %eax,(%rbx)
mov    0xc(%rsp),%eax
mov    %eax,0x4(%rbx)
mov    0x10(%rsp),%eax
mov    %eax,0x8(%rbx)
mov    0x14(%rsp),%eax
mov    %eax,0xc(%rbx)
mov    0x18(%rsp),%eax
mov    %eax,0x10(%rbx)
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @freeze(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%39 = load i32, i32* %12
%40 = call i32 @_subborrow_u51(i32 0, i32 %39, i32 -19, i32* %13)
store i32 %40, i32* %14
%41 = load i32, i32* %14
%42 = load i32, i32* %11
%43 = call i32 @_subborrow_u51(i32 %41, i32 %42, i32 -1, i32* %15)
store i32 %43, i32* %16
%44 = load i32, i32* %16
%45 = load i32, i32* %10
%46 = call i32 @_subborrow_u51(i32 %44, i32 %45, i32 -1, i32* %17)
store i32 %46, i32* %18
%47 = load i32, i32* %18
%48 = load i32, i32* %9
%49 = call i32 @_subborrow_u51(i32 %47, i32 %48, i32 -1, i32* %19)
store i32 %49, i32* %20
%50 = load i32, i32* %20
%51 = load i32, i32* %8
%52 = call i32 @_subborrow_u51(i32 %50, i32 %51, i32 -1, i32* %21)
store i32 %52, i32* %22
%53 = load i32, i32* %22
%54 = call i32 @cmovznz64(i32 %53, i32 0, i32 -1)
store i32 %54, i32* %23
%55 = load i32, i32* %23
%56 = sext i32 %55 to i64
%57 = and i64 %56, 2251799813685229
%58 = trunc i64 %57 to i32
store i32 %58, i32* %24
%59 = load i32, i32* %13
%60 = load i32, i32* %24
%61 = call i32 @_addcarryx_u51(i32 0, i32 %59, i32 %60, i32* %25)
store i32 %61, i32* %26
%62 = load i32, i32* %23
%63 = sext i32 %62 to i64
%64 = and i64 %63, 2251799813685247
%65 = trunc i64 %64 to i32
store i32 %65, i32* %27
%66 = load i32, i32* %26
%67 = load i32, i32* %15
%68 = load i32, i32* %27
%69 = call i32 @_addcarryx_u51(i32 %66, i32 %67, i32 %68, i32* %28)
store i32 %69, i32* %29
%70 = load i32, i32* %23
%71 = sext i32 %70 to i64
%72 = and i64 %71, 2251799813685247
%73 = trunc i64 %72 to i32
store i32 %73, i32* %30
%74 = load i32, i32* %29
%75 = load i32, i32* %17
%76 = load i32, i32* %30
%77 = call i32 @_addcarryx_u51(i32 %74, i32 %75, i32 %76, i32* %31)
store i32 %77, i32* %32
%78 = load i32, i32* %23
%79 = sext i32 %78 to i64
%80 = and i64 %79, 2251799813685247
%81 = trunc i64 %80 to i32
store i32 %81, i32* %33
%82 = load i32, i32* %32
%83 = load i32, i32* %19
%84 = load i32, i32* %33
%85 = call i32 @_addcarryx_u51(i32 %82, i32 %83, i32 %84, i32* %34)
store i32 %85, i32* %35
%86 = load i32, i32* %23
%87 = sext i32 %86 to i64
%88 = and i64 %87, 2251799813685247
%89 = trunc i64 %88 to i32
store i32 %89, i32* %36
%90 = load i32, i32* %35
%91 = load i32, i32* %21
%92 = load i32, i32* %36
%93 = call i32 @_addcarryx_u51(i32 %90, i32 %91, i32 %92, i32* %37)
store i32 %93, i32* %38
%94 = load i32, i32* %37
%95 = load i32*, i32** %7
%96 = getelementptr inbounds i32, i32* %95, i64 0
store i32 %94, i32* %96
%97 = load i32, i32* %34
%98 = load i32*, i32** %7
%99 = getelementptr inbounds i32, i32* %98, i64 1
store i32 %97, i32* %99
%100 = load i32, i32* %31
%101 = load i32*, i32** %7
%102 = getelementptr inbounds i32, i32* %101, i64 2
store i32 %100, i32* %102
%103 = load i32, i32* %28
%104 = load i32*, i32** %7
%105 = getelementptr inbounds i32, i32* %104, i64 3
store i32 %103, i32* %105
%106 = load i32, i32* %25
%107 = load i32*, i32** %7
%108 = getelementptr inbounds i32, i32* %107, i64 4
store i32 %106, i32* %108
ret void
}

LLVM IR (-O2):
define void @freeze(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = bitcast i32* %7 to i8*
%18 = call i32 @_subborrow_u51(i32 0, i32 %5, i32 -19, i32* %7)
%19 = bitcast i32* %8 to i8*
%20 = call i32 @_subborrow_u51(i32 %18, i32 %4, i32 -1, i32* %8)
%21 = bitcast i32* %9 to i8*
%22 = call i32 @_subborrow_u51(i32 %20, i32 %3, i32 -1, i32* %9)
%23 = bitcast i32* %10 to i8*
%24 = call i32 @_subborrow_u51(i32 %22, i32 %2, i32 -1, i32* %10)
%25 = bitcast i32* %11 to i8*
%26 = call i32 @_subborrow_u51(i32 %24, i32 %1, i32 -1, i32* %11)
%27 = call i32 @cmovznz64(i32 %26, i32 0, i32 -1)
%28 = and i32 %27, -19
%29 = bitcast i32* %12 to i8*
%30 = load i32, i32* %7
%31 = call i32 @_addcarryx_u51(i32 0, i32 %30, i32 %28, i32* %12)
%32 = bitcast i32* %13 to i8*
%33 = load i32, i32* %8
%34 = call i32 @_addcarryx_u51(i32 %31, i32 %33, i32 %27, i32* %13)
%35 = bitcast i32* %14 to i8*
%36 = load i32, i32* %9
%37 = call i32 @_addcarryx_u51(i32 %34, i32 %36, i32 %27, i32* %14)
%38 = bitcast i32* %15 to i8*
%39 = load i32, i32* %10
%40 = call i32 @_addcarryx_u51(i32 %37, i32 %39, i32 %27, i32* %15)
%41 = bitcast i32* %16 to i8*
%42 = load i32, i32* %11
%43 = call i32 @_addcarryx_u51(i32 %40, i32 %42, i32 %27, i32* %16)
%44 = load i32, i32* %16
store i32 %44, i32* %0
%45 = load i32, i32* %15
%46 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %45, i32* %46
%47 = load i32, i32* %14
%48 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %47, i32* %48
%49 = load i32, i32* %13
%50 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %49, i32* %50
%51 = load i32, i32* %12
%52 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %51, i32* %52
ret void
}