#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, long *);
int sum_of_all_dividers() {
  long n = -2048;
  scanf("%li", &n);
  double sum = 0;
  for (long i = 1; i < n; i++) {
    if (n % i == 0) {
      sum += i;
    }
  }
  printf("%lg", sum);
  return 0;
}


x86 assembly (clang, -O0):
<sum_of_all_dividers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0xfffffffffffff800,-0x8(%rbp)
ff
lea    0xec9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1198 <sum_of_all_dividers+0x78>
mov    -0x8(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
jne    1182 <sum_of_all_dividers+0x62>
cvtsi2sdq -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1187 <sum_of_all_dividers+0x67>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1150 <sum_of_all_dividers+0x30>
movsd  -0x10(%rbp),%xmm0
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_of_all_dividers>:
push   %rax
movq   $0xfffffffffffff800,(%rsp)
ff
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%rcx
xorpd  %xmm0,%xmm0
cmp    $0x2,%rcx
jl     1270 <sum_of_all_dividers+0x150>
lea    -0x1(%rcx),%r8
cmp    $0x2,%rcx
jne    116c <sum_of_all_dividers+0x4c>
xorpd  %xmm0,%xmm0
mov    $0x1,%esi
test   $0x1,%r8b
jne    1236 <sum_of_all_dividers+0x116>
jmp    1270 <sum_of_all_dividers+0x150>
mov    %r8,%r9
and    $0xfffffffffffffffe,%r9
xorpd  %xmm0,%xmm0
mov    $0x1,%eax
movsd  0xe7c(%rip),%xmm1
jmp    11a9 <sum_of_all_dividers+0x89>
cs nopw 0x0(%rax,%rax,1)
movapd %xmm1,%xmm3
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
lea    0x1(%rdi),%rax
cmp    %r9,%rdi
je     122c <sum_of_all_dividers+0x10c>
mov    %rax,%rsi
mov    %rcx,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     11d0 <sum_of_all_dividers+0xb0>
mov    %rcx,%rax
cqto
idiv   %rsi
test   %rdx,%rdx
je     11db <sum_of_all_dividers+0xbb>
movapd %xmm1,%xmm2
jmp    11e3 <sum_of_all_dividers+0xc3>
nopl   0x0(%rax,%rax,1)
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
jne    11c5 <sum_of_all_dividers+0xa5>
xorps  %xmm2,%xmm2
cvtsi2sd %rsi,%xmm2
lea    0x1(%rsi),%rdi
mov    %rcx,%rax
or     %rdi,%rax
shr    $0x20,%rax
je     1210 <sum_of_all_dividers+0xf0>
mov    %rcx,%rax
cqto
idiv   %rdi
test   %rdx,%rdx
jne    1190 <sum_of_all_dividers+0x70>
jmp    121f <sum_of_all_dividers+0xff>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%eax
xor    %edx,%edx
div    %edi
test   %rdx,%rdx
jne    1190 <sum_of_all_dividers+0x70>
xorps  %xmm3,%xmm3
cvtsi2sd %rdi,%xmm3
jmp    1194 <sum_of_all_dividers+0x74>
add    $0x2,%rsi
test   $0x1,%r8b
je     1270 <sum_of_all_dividers+0x150>
mov    %rcx,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1259 <sum_of_all_dividers+0x139>
mov    %rcx,%rax
cqto
idiv   %rsi
test   %rdx,%rdx
je     1264 <sum_of_all_dividers+0x144>
movsd  0xda9(%rip),%xmm1
jmp    126c <sum_of_all_dividers+0x14c>
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
jne    124f <sum_of_all_dividers+0x12f>
xorps  %xmm1,%xmm1
cvtsi2sd %rsi,%xmm1
addsd  %xmm1,%xmm0
lea    0xd95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%li\00"
@.str.1 = [4 x i8] c"%lg\00"
define i32 @sum_of_all_dividers() {
%1 = alloca i64
%2 = alloca double
%3 = alloca i64
store i64 -2048, i64* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
store double 0.000000e+00, double* %2
store i64 1, i64* %3
br label %5
5: ; preds = %20, %0
%6 = load i64, i64* %3
%7 = load i64, i64* %1
%8 = icmp slt i64 %6, %7
br i1 %8, label %9, label %23
9: ; preds = %5
%10 = load i64, i64* %1
%11 = load i64, i64* %3
%12 = srem i64 %10, %11
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = load i64, i64* %3
%16 = sitofp i64 %15 to double
%17 = load double, double* %2
%18 = fadd double %17, %16
store double %18, double* %2
br label %19
19: ; preds = %14, %9
br label %20
20: ; preds = %19
%21 = load i64, i64* %3
%22 = add nsw i64 %21, 1
store i64 %22, i64* %3
br label %5
23: ; preds = %5
%24 = load double, double* %2
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%li\00"
@.str.1 = [4 x i8] c"%lg\00"
define i32 @sum_of_all_dividers() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 -2048, i64* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = icmp sgt i64 %4, 1
br i1 %5, label %6, label %23
6: ; preds = %0
%7 = add i64 %4, -1
%8 = and i64 %7, 1
%9 = icmp eq i64 %4, 2
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = and i64 %7, -2
br label %26
12: ; preds = %26, %6
%13 = phi double [ undef, %6 ], [ %40, %26 ]
%14 = phi i64 [ 1, %6 ], [ %41, %26 ]
%15 = phi double [ 0.000000e+00, %6 ], [ %40, %26 ]
%16 = icmp eq i64 %8, 0
br i1 %16, label %23, label %17
17: ; preds = %12
%18 = srem i64 %4, %14
%19 = icmp eq i64 %18, 0
%20 = sitofp i64 %14 to double
%21 = select i1 %19, double %20, double -0.000000e+00
%22 = fadd double %15, %21
br label %23
23: ; preds = %17, %12, %0
%24 = phi double [ 0.000000e+00, %0 ], [ %13, %12 ], [ %22, %17 ]
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %24)
ret i32 0
26: ; preds = %26, %10
%27 = phi i64 [ 1, %10 ], [ %41, %26 ]
%28 = phi double [ 0.000000e+00, %10 ], [ %40, %26 ]
%29 = phi i64 [ 0, %10 ], [ %42, %26 ]
%30 = srem i64 %4, %27
%31 = icmp eq i64 %30, 0
%32 = sitofp i64 %27 to double
%33 = select i1 %31, double %32, double -0.000000e+00
%34 = fadd double %28, %33
%35 = add nuw nsw i64 %27, 1
%36 = srem i64 %4, %35
%37 = icmp eq i64 %36, 0
%38 = sitofp i64 %35 to double
%39 = select i1 %37, double %38, double -0.000000e+00
%40 = fadd double %34, %39
%41 = add nuw nsw i64 %27, 2
%42 = add i64 %29, 2
%43 = icmp eq i64 %42, %11
br i1 %43, label %12, label %26
}