#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 */
scalar_t__ EOF;
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int, int);
scalar_t__ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  int n;
  int x, y, z;
  freopen("input.txt", "r", stdin);
  while (scanf("%d", &n) != EOF) {
    for (x = 0; x <= 100; x++) {
      for (y = 0; y <= (100 - x); y++) {
        z = 100 - x - y;
        if (n >= (5 * x + 3 * y + z / 3.0))
          printf("x=%d,y=%d,z=%d\n", x, y, z);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    0xeb2(%rip),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <freopen@plt>
lea    0xeab(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e67(%rip),%rcx
cmp    (%rcx),%rax
je     122d <main+0xfd>
movl   $0x0,-0x18(%rbp)
cmpl   $0x64,-0x18(%rbp)
jg     1228 <main+0xf8>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x64,%ecx
sub    -0x18(%rbp),%ecx
cmp    %ecx,%eax
jg     1215 <main+0xe5>
mov    $0x64,%eax
sub    -0x18(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
imul   $0x5,-0x18(%rbp),%eax
imul   $0x3,-0x1c(%rbp),%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm1
cvtsi2sdl -0x20(%rbp),%xmm2
movsd  0xe25(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     1202 <main+0xd2>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
jmp    1207 <main+0xd7>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    119a <main+0x6a>
jmp    121a <main+0xea>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1189 <main+0x59>
jmp    1162 <main+0x32>
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
mov    0x2ea6(%rip),%rax
mov    (%rax),%edx
lea    0xebd(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1040 <freopen@plt>
lea    0xeb6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e71(%rip),%rcx
cmp    (%rcx),%rax
je     122d <main+0xfd>
xor    %r13d,%r13d
mov    $0x65,%r14d
lea    0xe8f(%rip),%r12
jmp    119e <main+0x6e>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r13d
add    $0xffffffff,%r14d
cmp    $0x65,%r13d
je     1200 <main+0xd0>
lea    0x0(%r13,%r13,4),%r15d
mov    $0x64,%ebp
sub    %r13d,%ebp
xor    %ebx,%ebx
jmp    11bf <main+0x8f>
nop
add    $0x1,%ebx
add    $0xffffffff,%ebp
add    $0x3,%r15d
cmp    %ebx,%r14d
je     1190 <main+0x60>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %ebp,%xmm2
divsd  0xe21(%rip),%xmm2
addsd  %xmm1,%xmm2
ucomisd %xmm2,%xmm0
jb     11b0 <main+0x80>
mov    %r12,%rdi
mov    %r13d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1030 <printf@plt>
jmp    11b0 <main+0x80>
nopw   0x0(%rax,%rax,1)
lea    0xe0d(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0x65,%r14d
mov    $0x0,%r13d
mov    0x2dbc(%rip),%rcx
cmp    (%rcx),%rax
jne    119e <main+0x6e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.3 = [16 x i8] c"x=%d,y=%d,z=%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* @stdin
%11 = call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %57, %2
%13 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%14 = load i64, i64* @EOF
%15 = icmp ne i64 %13, %14
br i1 %15, label %16, label %58
16: ; preds = %12
store i32 0, i32* %7
br label %17
17: ; preds = %54, %16
%18 = load i32, i32* %7
%19 = icmp sle i32 %18, 100
br i1 %19, label %20, label %57
20: ; preds = %17
store i32 0, i32* %8
br label %21
21: ; preds = %50, %20
%22 = load i32, i32* %8
%23 = load i32, i32* %7
%24 = sub nsw i32 100, %23
%25 = icmp sle i32 %22, %24
br i1 %25, label %26, label %53
26: ; preds = %21
%27 = load i32, i32* %7
%28 = sub nsw i32 100, %27
%29 = load i32, i32* %8
%30 = sub nsw i32 %28, %29
store i32 %30, i32* %9
%31 = load i32, i32* %6
%32 = sitofp i32 %31 to double
%33 = load i32, i32* %7
%34 = mul nsw i32 5, %33
%35 = load i32, i32* %8
%36 = mul nsw i32 3, %35
%37 = add nsw i32 %34, %36
%38 = sitofp i32 %37 to double
%39 = load i32, i32* %9
%40 = sitofp i32 %39 to double
%41 = fdiv double %40, 3.000000e+00
%42 = fadd double %38, %41
%43 = fcmp oge double %32, %42
br i1 %43, label %44, label %49
44: ; preds = %26
%45 = load i32, i32* %7
%46 = load i32, i32* %8
%47 = load i32, i32* %9
%48 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %45, i32 %46, i32 %47)
br label %49
49: ; preds = %44, %26
br label %50
50: ; preds = %49
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
br label %21
53: ; preds = %21
br label %54
54: ; preds = %53
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %17
57: ; preds = %17
br label %12
58: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.3 = [16 x i8] c"x=%d,y=%d,z=%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @stdin
%6 = tail call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %43, label %14
10: ; preds = %36
%11 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%12 = load i64, i64* @EOF
%13 = icmp eq i64 %11, %12
br i1 %13, label %43, label %40
14: ; preds = %2, %40
%15 = phi i32 [ %41, %40 ], [ 101, %2 ]
%16 = phi i32 [ %42, %40 ], [ 0, %2 ]
%17 = mul nuw nsw i32 %16, 5
br label %18
18: ; preds = %14, %33
%19 = phi i32 [ 0, %14 ], [ %34, %33 ]
%20 = add nuw i32 %16, %19
%21 = sub i32 100, %20
%22 = load i32, i32* %3
%23 = sitofp i32 %22 to double
%24 = mul nuw nsw i32 %19, 3
%25 = add nuw nsw i32 %24, %17
%26 = sitofp i32 %25 to double
%27 = sitofp i32 %21 to double
%28 = fdiv double %27, 3.000000e+00
%29 = fadd double %28, %26
%30 = fcmp ugt double %29, %23
br i1 %30, label %33, label %31
31: ; preds = %18
%32 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %16, i32 %19, i32 %21)
br label %33
33: ; preds = %18, %31
%34 = add nuw nsw i32 %19, 1
%35 = icmp eq i32 %34, %15
br i1 %35, label %36, label %18
36: ; preds = %33
%37 = add nuw nsw i32 %16, 1
%38 = add nsw i32 %15, -1
%39 = icmp eq i32 %37, 101
br i1 %39, label %10, label %40
40: ; preds = %36, %10
%41 = phi i32 [ %38, %36 ], [ 101, %10 ]
%42 = phi i32 [ %37, %36 ], [ 0, %10 ]
br label %14
43: ; preds = %10, %2
ret i32 0
}