#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 uintptr_t x9;
typedef uintptr_t x8;
typedef uintptr_t x7;
typedef uintptr_t x6;
typedef uintptr_t x5;
typedef uintptr_t x11;
typedef uintptr_t x10;
typedef int /*<<< orphan*/ out0;
typedef int /*<<< orphan*/ in0;

/* Variables and functions */
uintptr_t _br2_load(int /*<<< orphan*/, int);
int /*<<< orphan*/ _br2_store(int /*<<< orphan*/, uintptr_t, int);
void internal_fiat_poly1305_carry(uintptr_t out0, uintptr_t in0) {
  uintptr_t x0, x1, x2, x3, x4, x5, x6, x10, x11, x7, x8, x9, x12, x13, x14,
      x15, x16, x17, x18, x19, x20, x21;
  x0 = _br2_load((in0) + ((uintptr_t)0ULL), sizeof(uintptr_t));
  x1 = _br2_load((in0) + ((uintptr_t)4ULL), sizeof(uintptr_t));
  x2 = _br2_load((in0) + ((uintptr_t)8ULL), sizeof(uintptr_t));
  x3 = _br2_load((in0) + ((uintptr_t)12ULL), sizeof(uintptr_t));
  x4 = _br2_load((in0) + ((uintptr_t)16ULL), sizeof(uintptr_t));
  x5 = x0;
  x6 = ((x5) >> ((uintptr_t)26ULL)) + (x1);
  x7 = ((x6) >> ((uintptr_t)26ULL)) + (x2);
  x8 = ((x7) >> ((uintptr_t)26ULL)) + (x3);
  x9 = ((x8) >> ((uintptr_t)26ULL)) + (x4);
  x10 = ((x5) & ((uintptr_t)67108863ULL)) +
        (((x9) >> ((uintptr_t)26ULL)) * ((uintptr_t)5ULL));
  x11 = ((x10) >> ((uintptr_t)26ULL)) + ((x6) & ((uintptr_t)67108863ULL));
  x12 = (x10) & ((uintptr_t)67108863ULL);
  x13 = (x11) & ((uintptr_t)67108863ULL);
  x14 = ((x11) >> ((uintptr_t)26ULL)) + ((x7) & ((uintptr_t)67108863ULL));
  x15 = (x8) & ((uintptr_t)67108863ULL);
  x16 = (x9) & ((uintptr_t)67108863ULL);
  x17 = x12;
  x18 = x13;
  x19 = x14;
  x20 = x15;
  x21 = x16;
  _br2_store((out0) + ((uintptr_t)0ULL), x17, sizeof(uintptr_t));
  _br2_store((out0) + ((uintptr_t)4ULL), x18, sizeof(uintptr_t));
  _br2_store((out0) + ((uintptr_t)8ULL), x19, sizeof(uintptr_t));
  _br2_store((out0) + ((uintptr_t)12ULL), x20, sizeof(uintptr_t));
  _br2_store((out0) + ((uintptr_t)16ULL), x21, sizeof(uintptr_t));
  return;
}


x86 assembly (clang, -O0):
<internal_fiat_poly1305_carry>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x0,%rax
mov    %eax,%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %eax,%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %eax,%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0xc,%rax
mov    %eax,%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %eax,%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
shr    $0x1a,%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
shr    $0x1a,%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
shr    $0x1a,%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
shr    $0x1a,%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x40(%rbp),%rax
and    $0x3ffffff,%rax
mov    -0x70(%rbp),%rcx
shr    $0x1a,%rcx
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
shr    $0x1a,%rax
mov    -0x48(%rbp),%rcx
and    $0x3ffffff,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rax
and    $0x3ffffff,%rax
mov    %rax,-0x78(%rbp)
mov    -0x58(%rbp),%rax
and    $0x3ffffff,%rax
mov    %rax,-0x80(%rbp)
mov    -0x58(%rbp),%rax
shr    $0x1a,%rax
mov    -0x60(%rbp),%rcx
and    $0x3ffffff,%rcx
add    %rcx,%rax
mov    %rax,-0x88(%rbp)
mov    -0x68(%rbp),%rax
and    $0x3ffffff,%rax
mov    %rax,-0x90(%rbp)
mov    -0x70(%rbp),%rax
and    $0x3ffffff,%rax
mov    %rax,-0x98(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x8(%rbp),%rax
add    $0x0,%rax
mov    %eax,%edi
mov    -0xa0(%rbp),%rsi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %eax,%edi
mov    -0xa8(%rbp),%rsi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %eax,%edi
mov    -0xb0(%rbp),%rsi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
mov    -0x8(%rbp),%rax
add    $0xc,%rax
mov    %eax,%edi
mov    -0xb8(%rbp),%rsi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    %eax,%edi
mov    -0xc0(%rbp),%rsi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_fiat_poly1305_carry>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %ebx,%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,%r13
lea    0x4(%rbx),%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,%r15
lea    0x8(%rbx),%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,%r12
lea    0xc(%rbx),%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %rax,%rbp
add    $0x10,%ebx
mov    %ebx,%edi
mov    $0x8,%esi
call   1030 <_br2_load@plt>
mov    %r13,%rcx
shr    $0x1a,%rcx
add    %r15,%rcx
mov    %rcx,%rbx
shr    $0x1a,%rbx
add    %r12,%rbx
mov    %rbx,%r12
shr    $0x1a,%r12
add    %rbp,%r12
mov    %r12,%r15
shr    $0x1a,%r15
add    %rax,%r15
and    $0x3ffffff,%r13d
mov    %r15,%rax
shr    $0x1a,%rax
lea    (%rax,%rax,4),%rsi
add    %r13,%rsi
mov    %rsi,%rax
shr    $0x1a,%rax
and    $0x3ffffff,%ecx
add    %rax,%rcx
and    $0x3ffffff,%esi
mov    %ecx,%ebp
and    $0x3ffffff,%ebp
shr    $0x1a,%rcx
and    $0x3ffffff,%ebx
add    %rcx,%rbx
and    $0x3ffffff,%r12d
and    $0x3ffffff,%r15d
mov    %r14d,%edi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
lea    0x4(%r14),%edi
mov    %rbp,%rsi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
lea    0x8(%r14),%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
lea    0xc(%r14),%edi
mov    %r12,%rsi
mov    $0x8,%edx
call   1040 <_br2_store@plt>
add    $0x10,%r14d
mov    %r14d,%edi
mov    %r15,%rsi
mov    $0x8,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <_br2_store@plt>

LLVM IR (-O0):
define void @internal_fiat_poly1305_carry(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
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i64
%26 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%27 = load i64, i64* %4
%28 = add i64 %27, 0
%29 = trunc i64 %28 to i32
%30 = call i64 @_br2_load(i32 %29, i32 8)
store i64 %30, i64* %5
%31 = load i64, i64* %4
%32 = add i64 %31, 4
%33 = trunc i64 %32 to i32
%34 = call i64 @_br2_load(i32 %33, i32 8)
store i64 %34, i64* %6
%35 = load i64, i64* %4
%36 = add i64 %35, 8
%37 = trunc i64 %36 to i32
%38 = call i64 @_br2_load(i32 %37, i32 8)
store i64 %38, i64* %7
%39 = load i64, i64* %4
%40 = add i64 %39, 12
%41 = trunc i64 %40 to i32
%42 = call i64 @_br2_load(i32 %41, i32 8)
store i64 %42, i64* %8
%43 = load i64, i64* %4
%44 = add i64 %43, 16
%45 = trunc i64 %44 to i32
%46 = call i64 @_br2_load(i32 %45, i32 8)
store i64 %46, i64* %9
%47 = load i64, i64* %5
store i64 %47, i64* %10
%48 = load i64, i64* %10
%49 = lshr i64 %48, 26
%50 = load i64, i64* %6
%51 = add i64 %49, %50
store i64 %51, i64* %11
%52 = load i64, i64* %11
%53 = lshr i64 %52, 26
%54 = load i64, i64* %7
%55 = add i64 %53, %54
store i64 %55, i64* %14
%56 = load i64, i64* %14
%57 = lshr i64 %56, 26
%58 = load i64, i64* %8
%59 = add i64 %57, %58
store i64 %59, i64* %15
%60 = load i64, i64* %15
%61 = lshr i64 %60, 26
%62 = load i64, i64* %9
%63 = add i64 %61, %62
store i64 %63, i64* %16
%64 = load i64, i64* %10
%65 = and i64 %64, 67108863
%66 = load i64, i64* %16
%67 = lshr i64 %66, 26
%68 = mul i64 %67, 5
%69 = add i64 %65, %68
store i64 %69, i64* %12
%70 = load i64, i64* %12
%71 = lshr i64 %70, 26
%72 = load i64, i64* %11
%73 = and i64 %72, 67108863
%74 = add i64 %71, %73
store i64 %74, i64* %13
%75 = load i64, i64* %12
%76 = and i64 %75, 67108863
store i64 %76, i64* %17
%77 = load i64, i64* %13
%78 = and i64 %77, 67108863
store i64 %78, i64* %18
%79 = load i64, i64* %13
%80 = lshr i64 %79, 26
%81 = load i64, i64* %14
%82 = and i64 %81, 67108863
%83 = add i64 %80, %82
store i64 %83, i64* %19
%84 = load i64, i64* %15
%85 = and i64 %84, 67108863
store i64 %85, i64* %20
%86 = load i64, i64* %16
%87 = and i64 %86, 67108863
store i64 %87, i64* %21
%88 = load i64, i64* %17
store i64 %88, i64* %22
%89 = load i64, i64* %18
store i64 %89, i64* %23
%90 = load i64, i64* %19
store i64 %90, i64* %24
%91 = load i64, i64* %20
store i64 %91, i64* %25
%92 = load i64, i64* %21
store i64 %92, i64* %26
%93 = load i64, i64* %3
%94 = add i64 %93, 0
%95 = trunc i64 %94 to i32
%96 = load i64, i64* %22
%97 = call i32 @_br2_store(i32 %95, i64 %96, i32 8)
%98 = load i64, i64* %3
%99 = add i64 %98, 4
%100 = trunc i64 %99 to i32
%101 = load i64, i64* %23
%102 = call i32 @_br2_store(i32 %100, i64 %101, i32 8)
%103 = load i64, i64* %3
%104 = add i64 %103, 8
%105 = trunc i64 %104 to i32
%106 = load i64, i64* %24
%107 = call i32 @_br2_store(i32 %105, i64 %106, i32 8)
%108 = load i64, i64* %3
%109 = add i64 %108, 12
%110 = trunc i64 %109 to i32
%111 = load i64, i64* %25
%112 = call i32 @_br2_store(i32 %110, i64 %111, i32 8)
%113 = load i64, i64* %3
%114 = add i64 %113, 16
%115 = trunc i64 %114 to i32
%116 = load i64, i64* %26
%117 = call i32 @_br2_store(i32 %115, i64 %116, i32 8)
ret void
}

LLVM IR (-O2):
define void @internal_fiat_poly1305_carry(i64 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = tail call i64 @_br2_load(i32 %3, i32 8)
%5 = add i32 %3, 4
%6 = tail call i64 @_br2_load(i32 %5, i32 8)
%7 = add i32 %3, 8
%8 = tail call i64 @_br2_load(i32 %7, i32 8)
%9 = add i32 %3, 12
%10 = tail call i64 @_br2_load(i32 %9, i32 8)
%11 = add i32 %3, 16
%12 = tail call i64 @_br2_load(i32 %11, i32 8)
%13 = lshr i64 %4, 26
%14 = add i64 %13, %6
%15 = lshr i64 %14, 26
%16 = add i64 %15, %8
%17 = lshr i64 %16, 26
%18 = add i64 %17, %10
%19 = lshr i64 %18, 26
%20 = add i64 %19, %12
%21 = and i64 %4, 67108863
%22 = lshr i64 %20, 26
%23 = mul nuw nsw i64 %22, 5
%24 = add nuw nsw i64 %23, %21
%25 = lshr i64 %24, 26
%26 = and i64 %14, 67108863
%27 = add nuw nsw i64 %25, %26
%28 = and i64 %24, 67108863
%29 = and i64 %27, 67108863
%30 = lshr i64 %27, 26
%31 = and i64 %16, 67108863
%32 = add nuw nsw i64 %30, %31
%33 = and i64 %18, 67108863
%34 = and i64 %20, 67108863
%35 = trunc i64 %0 to i32
%36 = tail call i32 @_br2_store(i32 %35, i64 %28, i32 8)
%37 = add i32 %35, 4
%38 = tail call i32 @_br2_store(i32 %37, i64 %29, i32 8)
%39 = add i32 %35, 8
%40 = tail call i32 @_br2_store(i32 %39, i64 %32, i32 8)
%41 = add i32 %35, 12
%42 = tail call i32 @_br2_store(i32 %41, i64 %33, i32 8)
%43 = add i32 %35, 16
%44 = tail call i32 @_br2_store(i32 %43, i64 %34, i32 8)
ret void
}