#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*/ assert(int);
int power_digit_sum(int);
int main() {
  assert(5 == power_digit_sum(5));
  assert(26 == power_digit_sum(15));
  assert(115 == power_digit_sum(100));
  assert(679 == power_digit_sum(500));
  assert(1366 == power_digit_sum(1000));
  assert(2035 == power_digit_sum(1500));
  assert(2704 == power_digit_sum(2000));
  assert(3871 == power_digit_sum(3000));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <power_digit_sum@plt>
mov    %eax,%ecx
mov    $0x5,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0xf,%edi
call   1030 <power_digit_sum@plt>
mov    %eax,%ecx
mov    $0x1a,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x64,%edi
call   1030 <power_digit_sum@plt>
mov    %eax,%ecx
mov    $0x73,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x1f4,%edi
call   1030 <power_digit_sum@plt>
mov    %eax,%ecx
mov    $0x2a7,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x3e8,%edi
call   1030 <power_digit_sum@plt>
mov    %eax,%ecx
mov    $0x556,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x5dc,%edi
call   1030 <power_digit_sum@plt>
mov    %eax,%ecx
mov    $0x7f3,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x7d0,%edi
call   1030 <power_digit_sum@plt>
mov    %eax,%ecx
mov    $0xa90,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0xbb8,%edi
call   1030 <power_digit_sum@plt>
mov    %eax,%ecx
mov    $0xf1f,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <power_digit_sum@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0xf,%edi
call   1030 <power_digit_sum@plt>
xor    %edi,%edi
cmp    $0x1a,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x64,%edi
call   1030 <power_digit_sum@plt>
xor    %edi,%edi
cmp    $0x73,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x1f4,%edi
call   1030 <power_digit_sum@plt>
xor    %edi,%edi
cmp    $0x2a7,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x3e8,%edi
call   1030 <power_digit_sum@plt>
xor    %edi,%edi
cmp    $0x556,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x5dc,%edi
call   1030 <power_digit_sum@plt>
xor    %edi,%edi
cmp    $0x7f3,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x7d0,%edi
call   1030 <power_digit_sum@plt>
xor    %edi,%edi
cmp    $0xa90,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0xbb8,%edi
call   1030 <power_digit_sum@plt>
xor    %edi,%edi
cmp    $0xf1f,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @power_digit_sum(i32 5)
%2 = icmp eq i32 5, %1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @power_digit_sum(i32 15)
%6 = icmp eq i32 26, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @power_digit_sum(i32 100)
%10 = icmp eq i32 115, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @power_digit_sum(i32 500)
%14 = icmp eq i32 679, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call i32 @power_digit_sum(i32 1000)
%18 = icmp eq i32 1366, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = call i32 @power_digit_sum(i32 1500)
%22 = icmp eq i32 2035, %21
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = call i32 @power_digit_sum(i32 2000)
%26 = icmp eq i32 2704, %25
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = call i32 @power_digit_sum(i32 3000)
%30 = icmp eq i32 3871, %29
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @power_digit_sum(i32 5)
%2 = icmp eq i32 %1, 5
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @power_digit_sum(i32 15)
%6 = icmp eq i32 %5, 26
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @power_digit_sum(i32 100)
%10 = icmp eq i32 %9, 115
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @power_digit_sum(i32 500)
%14 = icmp eq i32 %13, 679
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @power_digit_sum(i32 1000)
%18 = icmp eq i32 %17, 1366
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @power_digit_sum(i32 1500)
%22 = icmp eq i32 %21, 2035
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = tail call i32 @power_digit_sum(i32 2000)
%26 = icmp eq i32 %25, 2704
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = tail call i32 @power_digit_sum(i32 3000)
%30 = icmp eq i32 %29, 3871
%31 = zext i1 %30 to i32
%32 = tail call i32 @assert(i32 %31)
ret i32 0
}