#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 uint64_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ ee;

/* Variables and functions */
int /*<<< orphan*/ fadd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fsub(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ make(int, int, int, int);
void adds(void) {
  {
    int i;
    for (i = -130; i <= 130; i++) {
      int s1 = (uint32_t)i % 3 < 1;
      int s2 = (uint32_t)i % 5 < 2;
      fadd(make(s1, 16384, 0x502c065e4f71a65d, 0xd2f9bdb031f4f031),
           make(s2, 16384 + i, 0xae267395a9bc1033, 0xb56b5800da1ba448));
    }
  }
  {
    uint64_t a0 = 0xc6bab0a6afbef5ed;
    uint64_t a1 = 0x4f84136c4a2e9b52;
    int ee[] = {0, 1, 10000};
    int e, i;
    for (e = 0; e < sizeof(ee) / sizeof(*ee); e++) {
      int exp = ee[e];
      fsub(make(0, exp, a1, a0), make(0, 0, 0, 0));
      for (i = 63; i >= 0; i--)
        fsub(make(0, exp, a1 | (uint64_t)1 << i >> 1, a0),
             make(0, exp, a1 >> i << i, 0));
      for (i = 63; i >= 0; i--)
        fsub(make(0, exp, a1, a0 | (uint64_t)1 << i >> 1),
             make(0, exp, a1, a0 >> i << i));
    }
  }
  {
    fadd(make(0, 114, -1, -1), make(0, 1, 0, 0));
    fadd(make(0, 32766, -1, -1), make(0, 32653, 0, 0));
    fsub(make(1, 32766, -1, -1), make(0, 32653, 0, 0));
  }
}


x86 assembly (clang, -O0):
<adds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0xffffff7e,-0x4(%rbp)
cmpl   $0x82,-0x4(%rbp)
jg     11cb <adds+0x9b>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x2,%edx
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x4000,%esi
mov    $0x4f71a65d,%edx
mov    $0x31f4f031,%ecx
call   1050 <make@plt>
mov    %eax,-0x30(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
add    $0x4000,%esi
mov    $0xa9bc1033,%edx
mov    $0xda1ba448,%ecx
call   1050 <make@plt>
mov    -0x30(%rbp),%edi
mov    %eax,%esi
call   1030 <fadd@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <adds+0xf>
movl   $0xafbef5ed,-0x10(%rbp)
movl   $0x4a2e9b52,-0x14(%rbp)
mov    0xe20(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe1e(%rip),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
cmp    $0x3,%rax
jae    131b <adds+0x1eb>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %edi,%edi
call   1050 <make@plt>
mov    %eax,-0x34(%rbp)
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1050 <make@plt>
mov    -0x34(%rbp),%edi
mov    %eax,%esi
call   1040 <fsub@plt>
movl   $0x3f,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     129b <adds+0x16b>
mov    -0x2c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x1,%eax
or     %eax,%edx
mov    -0x10(%rbp),%ecx
xor    %edi,%edi
call   1050 <make@plt>
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x28(%rbp),%ecx
sar    %cl,%edx
mov    -0x28(%rbp),%ecx
shl    %cl,%edx
xor    %ecx,%ecx
mov    %ecx,%edi
call   1050 <make@plt>
mov    -0x38(%rbp),%edi
mov    %eax,%esi
call   1040 <fsub@plt>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    123e <adds+0x10e>
movl   $0x3f,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     1308 <adds+0x1d8>
mov    -0x2c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x28(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x40(%rbp),%ecx
sar    $0x1,%eax
or     %eax,%ecx
xor    %edi,%edi
call   1050 <make@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x2c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%eax
mov    -0x28(%rbp),%ecx
sar    %cl,%eax
mov    -0x28(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
xor    %edi,%edi
call   1050 <make@plt>
mov    -0x3c(%rbp),%edi
mov    %eax,%esi
call   1040 <fsub@plt>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    12a2 <adds+0x172>
jmp    130d <adds+0x1dd>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11f4 <adds+0xc4>
xor    %edi,%edi
mov    $0x72,%esi
mov    $0xffffffff,%ecx
mov    %ecx,%edx
call   1050 <make@plt>
mov    %eax,-0x4c(%rbp)
xor    %ecx,%ecx
mov    $0x1,%esi
mov    %ecx,%edi
mov    %ecx,%edx
call   1050 <make@plt>
mov    -0x4c(%rbp),%edi
mov    %eax,%esi
call   1030 <fadd@plt>
xor    %edi,%edi
mov    $0x7ffe,%esi
mov    $0xffffffff,%ecx
mov    %ecx,%edx
call   1050 <make@plt>
mov    %eax,-0x48(%rbp)
xor    %ecx,%ecx
mov    $0x7f8d,%esi
mov    %ecx,%edi
mov    %ecx,%edx
call   1050 <make@plt>
mov    -0x48(%rbp),%edi
mov    %eax,%esi
call   1030 <fadd@plt>
mov    $0x1,%edi
mov    $0x7ffe,%esi
mov    $0xffffffff,%ecx
mov    %ecx,%edx
call   1050 <make@plt>
mov    %eax,-0x44(%rbp)
xor    %ecx,%ecx
mov    $0x7f8d,%esi
mov    %ecx,%edi
mov    %ecx,%edx
call   1050 <make@plt>
mov    -0x44(%rbp),%edi
mov    %eax,%esi
call   1040 <fsub@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adds>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0xffffff7e,%eax
movslq %eax,%rbp
imul   $0x55555556,%rbp,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
mov    %ebp,%ecx
sub    %eax,%ecx
xor    %edi,%edi
test   %ecx,%ecx
setle  %dil
imul   $0x66666667,%rbp,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
mov    %ebp,%ecx
sub    %eax,%ecx
xor    %ebx,%ebx
cmp    $0x2,%ecx
setl   %bl
mov    $0x4000,%esi
mov    $0x4f71a65d,%edx
mov    $0x31f4f031,%ecx
call   1050 <make@plt>
mov    %eax,%r14d
lea    0x4000(%rbp),%esi
mov    %ebx,%edi
mov    $0xa9bc1033,%edx
mov    $0xda1ba448,%ecx
call   1050 <make@plt>
mov    %r14d,%edi
mov    %eax,%esi
call   1030 <fadd@plt>
lea    0x1(%rbp),%eax
cmp    $0x83,%eax
jne    1140 <adds+0x10>
xor    %r12d,%r12d
lea    0xe27(%rip),%r13
nopl   0x0(%rax)
mov    0x0(%r13,%r12,4),%r14d
xor    %edi,%edi
mov    %r14d,%esi
mov    $0x4a2e9b52,%edx
mov    $0xafbef5ed,%ecx
call   1050 <make@plt>
mov    %eax,%ebp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <make@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <fsub@plt>
mov    $0x3f,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%edx
mov    %ebp,%ecx
shl    %cl,%edx
sar    %edx
or     $0x4a2e9b52,%edx
xor    %edi,%edi
mov    %r14d,%esi
mov    $0xafbef5ed,%ecx
call   1050 <make@plt>
mov    $0x4a2e9b52,%edx
mov    %ebp,%ecx
shr    %cl,%edx
mov    %eax,%ebx
shl    %cl,%edx
xor    %edi,%edi
mov    %r14d,%esi
xor    %ecx,%ecx
call   1050 <make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <fsub@plt>
add    $0xffffffff,%ebp
jb     1220 <adds+0xf0>
mov    $0x3f,%ebp
nopl   0x0(%rax)
mov    $0x1,%eax
mov    %ebp,%ecx
shl    %cl,%eax
shr    %eax
or     $0xafbef5ed,%eax
xor    %edi,%edi
mov    %r14d,%esi
mov    $0x4a2e9b52,%edx
mov    %eax,%ecx
call   1050 <make@plt>
mov    $0xafbef5ed,%ebx
mov    %ebp,%ecx
shr    %cl,%ebx
mov    %eax,%r15d
shl    %cl,%ebx
xor    %edi,%edi
mov    %r14d,%esi
mov    $0x4a2e9b52,%edx
mov    %ebx,%ecx
call   1050 <make@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1040 <fsub@plt>
add    $0xffffffff,%ebp
jb     1270 <adds+0x140>
add    $0x1,%r12
cmp    $0x3,%r12
jne    11e0 <adds+0xb0>
xor    %edi,%edi
mov    $0x72,%esi
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
call   1050 <make@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <fadd@plt>
xor    %edi,%edi
mov    $0x7ffe,%esi
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
call   1050 <make@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x7f8d,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <fadd@plt>
mov    $0x1,%edi
mov    $0x7ffe,%esi
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
call   1050 <make@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x7f8d,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <make@plt>
mov    %ebx,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fsub@plt>

LLVM IR (-O0):
@__const.adds.ee = [3 x i32] [i32 0, i32 1, i32 10000]
define void @adds() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [3 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 -130, i32* %1
br label %10
10: ; preds = %29, %0
%11 = load i32, i32* %1
%12 = icmp sle i32 %11, 130
br i1 %12, label %13, label %32
13: ; preds = %10
%14 = load i32, i32* %1
%15 = srem i32 %14, 3
%16 = icmp slt i32 %15, 1
%17 = zext i1 %16 to i32
store i32 %17, i32* %2
%18 = load i32, i32* %1
%19 = srem i32 %18, 5
%20 = icmp slt i32 %19, 2
%21 = zext i1 %20 to i32
store i32 %21, i32* %3
%22 = load i32, i32* %2
%23 = call i32 @make(i32 %22, i32 16384, i32 1332848221, i32 838135857)
%24 = load i32, i32* %3
%25 = load i32, i32* %1
%26 = add nsw i32 16384, %25
%27 = call i32 @make(i32 %24, i32 %26, i32 -1447292877, i32 -635722680)
%28 = call i32 @fadd(i32 %23, i32 %27)
br label %29
29: ; preds = %13
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
br label %10
32: ; preds = %10
store i32 -1346439699, i32* %4
store i32 1244568402, i32* %5
%33 = bitcast [3 x i32]* %6 to i8*
store i32 0, i32* %7
br label %34
34: ; preds = %98, %32
%35 = load i32, i32* %7
%36 = sext i32 %35 to i64
%37 = icmp ult i64 %36, 3
br i1 %37, label %38, label %101
38: ; preds = %34
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 %40
%42 = load i32, i32* %41
store i32 %42, i32* %9
%43 = load i32, i32* %9
%44 = load i32, i32* %5
%45 = load i32, i32* %4
%46 = call i32 @make(i32 0, i32 %43, i32 %44, i32 %45)
%47 = call i32 @make(i32 0, i32 0, i32 0, i32 0)
%48 = call i32 @fsub(i32 %46, i32 %47)
store i32 63, i32* %8
br label %49
49: ; preds = %69, %38
%50 = load i32, i32* %8
%51 = icmp sge i32 %50, 0
br i1 %51, label %52, label %72
52: ; preds = %49
%53 = load i32, i32* %9
%54 = load i32, i32* %5
%55 = load i32, i32* %8
%56 = shl i32 1, %55
%57 = ashr i32 %56, 1
%58 = or i32 %54, %57
%59 = load i32, i32* %4
%60 = call i32 @make(i32 0, i32 %53, i32 %58, i32 %59)
%61 = load i32, i32* %9
%62 = load i32, i32* %5
%63 = load i32, i32* %8
%64 = ashr i32 %62, %63
%65 = load i32, i32* %8
%66 = shl i32 %64, %65
%67 = call i32 @make(i32 0, i32 %61, i32 %66, i32 0)
%68 = call i32 @fsub(i32 %60, i32 %67)
br label %69
69: ; preds = %52
%70 = load i32, i32* %8
%71 = add nsw i32 %70, -1
store i32 %71, i32* %8
br label %49
72: ; preds = %49
store i32 63, i32* %8
br label %73
73: ; preds = %94, %72
%74 = load i32, i32* %8
%75 = icmp sge i32 %74, 0
br i1 %75, label %76, label %97
76: ; preds = %73
%77 = load i32, i32* %9
%78 = load i32, i32* %5
%79 = load i32, i32* %4
%80 = load i32, i32* %8
%81 = shl i32 1, %80
%82 = ashr i32 %81, 1
%83 = or i32 %79, %82
%84 = call i32 @make(i32 0, i32 %77, i32 %78, i32 %83)
%85 = load i32, i32* %9
%86 = load i32, i32* %5
%87 = load i32, i32* %4
%88 = load i32, i32* %8
%89 = ashr i32 %87, %88
%90 = load i32, i32* %8
%91 = shl i32 %89, %90
%92 = call i32 @make(i32 0, i32 %85, i32 %86, i32 %91)
%93 = call i32 @fsub(i32 %84, i32 %92)
br label %94
94: ; preds = %76
%95 = load i32, i32* %8
%96 = add nsw i32 %95, -1
store i32 %96, i32* %8
br label %73
97: ; preds = %73
br label %98
98: ; preds = %97
%99 = load i32, i32* %7
%100 = add nsw i32 %99, 1
store i32 %100, i32* %7
br label %34
101: ; preds = %34
%102 = call i32 @make(i32 0, i32 114, i32 -1, i32 -1)
%103 = call i32 @make(i32 0, i32 1, i32 0, i32 0)
%104 = call i32 @fadd(i32 %102, i32 %103)
%105 = call i32 @make(i32 0, i32 32766, i32 -1, i32 -1)
%106 = call i32 @make(i32 0, i32 32653, i32 0, i32 0)
%107 = call i32 @fadd(i32 %105, i32 %106)
%108 = call i32 @make(i32 1, i32 32766, i32 -1, i32 -1)
%109 = call i32 @make(i32 0, i32 32653, i32 0, i32 0)
%110 = call i32 @fsub(i32 %108, i32 %109)
ret void
}

LLVM IR (-O2):
@__const.adds.ee = [3 x i32] [i32 0, i32 1, i32 10000]
define void @adds() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -130, %0 ], [ %13, %1 ]
%3 = srem i32 %2, 3
%4 = icmp slt i32 %3, 1
%5 = zext i1 %4 to i32
%6 = srem i32 %2, 5
%7 = icmp slt i32 %6, 2
%8 = zext i1 %7 to i32
%9 = tail call i32 @make(i32 %5, i32 16384, i32 1332848221, i32 838135857)
%10 = add nsw i32 %2, 16384
%11 = tail call i32 @make(i32 %8, i32 %10, i32 -1447292877, i32 -635722680)
%12 = tail call i32 @fadd(i32 %9, i32 %11)
%13 = add nsw i32 %2, 1
%14 = icmp eq i32 %13, 131
br i1 %14, label %15, label %1
15: ; preds = %1, %46
%16 = phi i64 [ %47, %46 ], [ 0, %1 ]
%17 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.adds.ee, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = tail call i32 @make(i32 0, i32 %18, i32 1244568402, i32 -1346439699)
%20 = tail call i32 @make(i32 0, i32 0, i32 0, i32 0)
%21 = tail call i32 @fsub(i32 %19, i32 %20)
br label %22
22: ; preds = %15, %22
%23 = phi i32 [ 63, %15 ], [ %32, %22 ]
%24 = shl nuw i32 1, %23
%25 = ashr i32 %24, 1
%26 = or i32 %25, 1244568402
%27 = tail call i32 @make(i32 0, i32 %18, i32 %26, i32 -1346439699)
%28 = shl nsw i32 -1, %23
%29 = and i32 %28, 1244568402
%30 = tail call i32 @make(i32 0, i32 %18, i32 %29, i32 0)
%31 = tail call i32 @fsub(i32 %27, i32 %30)
%32 = add nsw i32 %23, -1
%33 = icmp eq i32 %23, 0
br i1 %33, label %34, label %22
34: ; preds = %22, %34
%35 = phi i32 [ %44, %34 ], [ 63, %22 ]
%36 = shl nuw i32 1, %35
%37 = lshr i32 %36, 1
%38 = or i32 %37, -1346439699
%39 = tail call i32 @make(i32 0, i32 %18, i32 1244568402, i32 %38)
%40 = shl nsw i32 -1, %35
%41 = and i32 %40, -1346439699
%42 = tail call i32 @make(i32 0, i32 %18, i32 1244568402, i32 %41)
%43 = tail call i32 @fsub(i32 %39, i32 %42)
%44 = add nsw i32 %35, -1
%45 = icmp eq i32 %35, 0
br i1 %45, label %46, label %34
46: ; preds = %34
%47 = add nuw nsw i64 %16, 1
%48 = icmp eq i64 %47, 3
br i1 %48, label %49, label %15
49: ; preds = %46
%50 = tail call i32 @make(i32 0, i32 114, i32 -1, i32 -1)
%51 = tail call i32 @make(i32 0, i32 1, i32 0, i32 0)
%52 = tail call i32 @fadd(i32 %50, i32 %51)
%53 = tail call i32 @make(i32 0, i32 32766, i32 -1, i32 -1)
%54 = tail call i32 @make(i32 0, i32 32653, i32 0, i32 0)
%55 = tail call i32 @fadd(i32 %53, i32 %54)
%56 = tail call i32 @make(i32 1, i32 32766, i32 -1, i32 -1)
%57 = tail call i32 @make(i32 0, i32 32653, i32 0, i32 0)
%58 = tail call i32 @fsub(i32 %56, i32 %57)
ret void
}