#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ printf(char *);
int main() {
  FILE *fin = fopen("sums.in", "r");
  int num_cases, iter, input;
  fscanf(fin, "%d", &num_cases);
  for (iter = 0; iter < num_cases; iter++) {
    int digit_sum = 0;
    fscanf(fin, "%d", &input);
    while (input > 0) {
      digit_sum += input % 10;
      input /= 10;
    }
    if (digit_sum % 25 == 0)
      printf("Yes, it's 25!!!\n");
    else
      printf("Bummer, no 25.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea9(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <fscanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    120a <main+0xda>
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe7b(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <fscanf@plt>
cmpl   $0x0,-0x1c(%rbp)
jle    11c6 <main+0x96>
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    -0x20(%rbp),%edx
mov    %edx,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
jmp    1198 <main+0x68>
mov    -0x20(%rbp),%eax
mov    $0x19,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11eb <main+0xbb>
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
jmp    11f7 <main+0xc7>
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
jmp    11fc <main+0xcc>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1171 <main+0x41>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebe(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%r13
lea    0xeb2(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rax,%rdi
call   1040 <fscanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11f8 <main+0xc8>
xor    %ebp,%ebp
lea    0xe91(%rip),%r14
mov    %rsp,%r15
lea    0xe99(%rip),%r12
mov    $0xcccccccd,%ebx
jmp    119e <main+0x6e>
nopw   0x0(%rax,%rax,1)
call   1030 <puts@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jge    11f8 <main+0xc8>
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <fscanf@plt>
mov    (%rsp),%eax
mov    %r12,%rdi
test   %eax,%eax
jle    1190 <main+0x60>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %eax,%edx
mov    %eax,%eax
imul   %rbx,%rax
shr    $0x23,%rax
lea    (%rax,%rax,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edx,%edi
sub    %esi,%edi
add    %edi,%ecx
cmp    $0x9,%edx
ja     11c0 <main+0x90>
mov    %eax,(%rsp)
imul   $0xc28f5c29,%ecx,%eax
cmp    $0xa3d70a4,%eax
lea    0xe1b(%rip),%rdi
cmovb  %r12,%rdi
jmp    1190 <main+0x60>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"sums.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [17 x i8] c"Yes, it's 25!!!\0A\00"
@.str.4 = [16 x i8] c"Bummer, no 25.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %7, i32** %2
%8 = load i32*, i32** %2
%9 = call i32 @fscanf(i32* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
store i32 0, i32* %4
br label %10
10: ; preds = %36, %0
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %39
14: ; preds = %10
store i32 0, i32* %6
%15 = load i32*, i32** %2
%16 = call i32 @fscanf(i32* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
br label %17
17: ; preds = %20, %14
%18 = load i32, i32* %5
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = load i32, i32* %5
%22 = srem i32 %21, 10
%23 = load i32, i32* %6
%24 = add nsw i32 %23, %22
store i32 %24, i32* %6
%25 = load i32, i32* %5
%26 = sdiv i32 %25, 10
store i32 %26, i32* %5
br label %17
27: ; preds = %17
%28 = load i32, i32* %6
%29 = srem i32 %28, 25
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %35
33: ; preds = %27
%34 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %35
35: ; preds = %33, %31
br label %36
36: ; preds = %35
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
br label %10
39: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"sums.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
@str = [15 x i8] c"Bummer, no 25.\00"
@str.5 = [16 x i8] c"Yes, it's 25!!!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %31
9: ; preds = %0, %25
%10 = phi i32 [ %28, %25 ], [ 0, %0 ]
%11 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %25
14: ; preds = %9, %14
%15 = phi i32 [ %18, %14 ], [ 0, %9 ]
%16 = phi i32 [ %19, %14 ], [ %12, %9 ]
%17 = urem i32 %16, 10
%18 = add nuw nsw i32 %15, %17
%19 = udiv i32 %16, 10
%20 = icmp ult i32 %16, 10
br i1 %20, label %21, label %14
21: ; preds = %14
store i32 %19, i32* %2
%22 = urem i32 %18, 25
%23 = icmp eq i32 %22, 0
%24 = select i1 %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0)
br label %25
25: ; preds = %21, %9
%26 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0), %9 ], [ %24, %21 ]
%27 = call i32 @puts(i8* dereferenceable(1) %26)
%28 = add nuw nsw i32 %10, 1
%29 = load i32, i32* %1
%30 = icmp slt i32 %28, %29
br i1 %30, label %9, label %31
31: ; preds = %25, %0
ret i32 0
}