#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 scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ const UINT64_C(int);
void fiat_25519_opp(uint64_t out1[5], const uint64_t arg1[5]) {
  uint64_t x1 = (UINT64_C(0xfffffffffffda) - (arg1[0]));
  uint64_t x2 = (UINT64_C(0xffffffffffffe) - (arg1[1]));
  uint64_t x3 = (UINT64_C(0xffffffffffffe) - (arg1[2]));
  uint64_t x4 = (UINT64_C(0xffffffffffffe) - (arg1[3]));
  uint64_t x5 = (UINT64_C(0xffffffffffffe) - (arg1[4]));
  out1[0] = x1;
  out1[1] = x2;
  out1[2] = x3;
  out1[3] = x4;
  out1[4] = x5;
}


x86 assembly (clang, -O0):
<fiat_25519_opp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffda,%edi
call   1030 <UINT64_C@plt>
mov    -0x10(%rbp),%rcx
sub    (%rcx),%rax
mov    %rax,-0x18(%rbp)
mov    $0xfffffffe,%edi
call   1030 <UINT64_C@plt>
mov    -0x10(%rbp),%rcx
sub    0x8(%rcx),%rax
mov    %rax,-0x20(%rbp)
mov    $0xfffffffe,%edi
call   1030 <UINT64_C@plt>
mov    -0x10(%rbp),%rcx
sub    0x10(%rcx),%rax
mov    %rax,-0x28(%rbp)
mov    $0xfffffffe,%edi
call   1030 <UINT64_C@plt>
mov    -0x10(%rbp),%rcx
sub    0x18(%rcx),%rax
mov    %rax,-0x30(%rbp)
mov    $0xfffffffe,%edi
call   1030 <UINT64_C@plt>
mov    -0x10(%rbp),%rcx
sub    0x20(%rcx),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x28(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    -0x38(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x20(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_25519_opp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0xffffffda,%edi
call   1030 <UINT64_C@plt>
mov    %rax,%r15
sub    (%rbx),%r15
mov    $0xfffffffe,%edi
call   1030 <UINT64_C@plt>
mov    %rax,%r12
sub    0x8(%rbx),%r12
mov    $0xfffffffe,%edi
call   1030 <UINT64_C@plt>
mov    %rax,%r13
sub    0x10(%rbx),%r13
mov    $0xfffffffe,%edi
call   1030 <UINT64_C@plt>
mov    %rax,%rbp
sub    0x18(%rbx),%rbp
mov    $0xfffffffe,%edi
call   1030 <UINT64_C@plt>
sub    0x20(%rbx),%rax
mov    %r15,(%r14)
mov    %r12,0x8(%r14)
mov    %r13,0x10(%r14)
mov    %rbp,0x18(%r14)
mov    %rax,0x20(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @fiat_25519_opp(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%10 = call i64 @UINT64_C(i32 -38)
%11 = load i64*, i64** %4
%12 = getelementptr inbounds i64, i64* %11, i64 0
%13 = load i64, i64* %12
%14 = sub nsw i64 %10, %13
store i64 %14, i64* %5
%15 = call i64 @UINT64_C(i32 -2)
%16 = load i64*, i64** %4
%17 = getelementptr inbounds i64, i64* %16, i64 1
%18 = load i64, i64* %17
%19 = sub nsw i64 %15, %18
store i64 %19, i64* %6
%20 = call i64 @UINT64_C(i32 -2)
%21 = load i64*, i64** %4
%22 = getelementptr inbounds i64, i64* %21, i64 2
%23 = load i64, i64* %22
%24 = sub nsw i64 %20, %23
store i64 %24, i64* %7
%25 = call i64 @UINT64_C(i32 -2)
%26 = load i64*, i64** %4
%27 = getelementptr inbounds i64, i64* %26, i64 3
%28 = load i64, i64* %27
%29 = sub nsw i64 %25, %28
store i64 %29, i64* %8
%30 = call i64 @UINT64_C(i32 -2)
%31 = load i64*, i64** %4
%32 = getelementptr inbounds i64, i64* %31, i64 4
%33 = load i64, i64* %32
%34 = sub nsw i64 %30, %33
store i64 %34, i64* %9
%35 = load i64, i64* %5
%36 = load i64*, i64** %3
%37 = getelementptr inbounds i64, i64* %36, i64 0
store i64 %35, i64* %37
%38 = load i64, i64* %6
%39 = load i64*, i64** %3
%40 = getelementptr inbounds i64, i64* %39, i64 1
store i64 %38, i64* %40
%41 = load i64, i64* %7
%42 = load i64*, i64** %3
%43 = getelementptr inbounds i64, i64* %42, i64 2
store i64 %41, i64* %43
%44 = load i64, i64* %8
%45 = load i64*, i64** %3
%46 = getelementptr inbounds i64, i64* %45, i64 3
store i64 %44, i64* %46
%47 = load i64, i64* %9
%48 = load i64*, i64** %3
%49 = getelementptr inbounds i64, i64* %48, i64 4
store i64 %47, i64* %49
ret void
}

LLVM IR (-O2):
define void @fiat_25519_opp(i64* nocapture writeonly %0, i64* nocapture %1) {
%3 = tail call i64 @UINT64_C(i32 -38)
%4 = load i64, i64* %1
%5 = sub nsw i64 %3, %4
%6 = tail call i64 @UINT64_C(i32 -2)
%7 = getelementptr inbounds i64, i64* %1, i64 1
%8 = load i64, i64* %7
%9 = sub nsw i64 %6, %8
%10 = tail call i64 @UINT64_C(i32 -2)
%11 = getelementptr inbounds i64, i64* %1, i64 2
%12 = load i64, i64* %11
%13 = sub nsw i64 %10, %12
%14 = tail call i64 @UINT64_C(i32 -2)
%15 = getelementptr inbounds i64, i64* %1, i64 3
%16 = load i64, i64* %15
%17 = sub nsw i64 %14, %16
%18 = tail call i64 @UINT64_C(i32 -2)
%19 = getelementptr inbounds i64, i64* %1, i64 4
%20 = load i64, i64* %19
%21 = sub nsw i64 %18, %20
store i64 %5, i64* %0
%22 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %9, i64* %22
%23 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %13, i64* %23
%24 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %17, i64* %24
%25 = getelementptr inbounds i64, i64* %0, i64 4
store i64 %21, i64* %25
ret void
}