#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int n = 1;
  while (1) {
    int V;
    scanf("%i", &V);
    if (!V)
      break;
    int L = 0, K = 0, J = 0, I = 0;
    I = V / 50;
    V %= 50;
    J = V / 10;
    V %= 10;
    K = V / 5;
    V %= 5;
    L = V;
    printf("Teste %i\n", n++);
    printf("%i %i %i %i\n", I, J, K, L);
    printf("\n");
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x18(%rbp)
jne    115c <main+0x3c>
jmp    1219 <main+0xf9>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    113d <main+0x1d>
mov    0x2dc0(%rip),%rax
mov    (%rax),%eax
add    $0x30,%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    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
je     1226 <main+0xf6>
mov    $0x1,%esi
lea    0x4(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cltq
imul   $0x51eb851f,%rax,%rbx
mov    %rbx,%rcx
shr    $0x3f,%rcx
sar    $0x24,%rbx
add    %ecx,%ebx
imul   $0x32,%ebx,%ecx
sub    %ecx,%eax
movsbl %al,%ecx
imul   $0x67,%ecx,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0xa,%edx
add    %cl,%dl
movsbl %dl,%ebp
movzbl %bpl,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0x9,%ecx
shr    $0xf,%edx
add    %cl,%dl
movsbl %dl,%r14d
movzbl %r14b,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%r15d
mov    %r15d,0x4(%rsp)
lea    0x1(%rsi),%r12d
lea    0xe24(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe20(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
mov    %r15d,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdf1(%rip),%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %r12d,%esi
test   %eax,%eax
jne    1170 <main+0x40>
mov    0x2db3(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [10 x i8] c"Teste %i\0A\00"
@.str.2 = [13 x i8] c"%i %i %i %i\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
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
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %12
12: ; preds = %2, %17
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%14 = load i32, i32* %7
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %12
br label %40
17: ; preds = %12
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
%18 = load i32, i32* %7
%19 = sdiv i32 %18, 50
store i32 %19, i32* %11
%20 = load i32, i32* %7
%21 = srem i32 %20, 50
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = sdiv i32 %22, 10
store i32 %23, i32* %10
%24 = load i32, i32* %7
%25 = srem i32 %24, 10
store i32 %25, i32* %7
%26 = load i32, i32* %7
%27 = sdiv i32 %26, 5
store i32 %27, i32* %9
%28 = load i32, i32* %7
%29 = srem i32 %28, 5
store i32 %29, i32* %7
%30 = load i32, i32* %7
store i32 %30, i32* %8
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %31)
%34 = load i32, i32* %11
%35 = load i32, i32* %10
%36 = load i32, i32* %9
%37 = load i32, i32* %8
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %34, i32 %35, i32 %36, i32 %37)
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %12
40: ; preds = %16
%41 = load i32, i32* @EXIT_SUCCESS
ret i32 %41
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [10 x i8] c"Teste %i\0A\00"
@.str.2 = [13 x i8] c"%i %i %i %i\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %28, label %8
8: ; preds = %2, %8
%9 = phi i32 [ %26, %8 ], [ %6, %2 ]
%10 = phi i32 [ %21, %8 ], [ 1, %2 ]
%11 = sdiv i32 %9, 50
%12 = srem i32 %9, 50
%13 = trunc i32 %12 to i8
%14 = sdiv i8 %13, 10
%15 = sext i8 %14 to i32
%16 = srem i8 %13, 10
%17 = sdiv i8 %16, 5
%18 = sext i8 %17 to i32
%19 = srem i8 %16, 5
%20 = sext i8 %19 to i32
store i32 %20, i32* %3
%21 = add nuw nsw i32 %10, 1
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %15, i32 %18, i32 %20)
%24 = call i32 @putchar(i32 10)
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%26 = load i32, i32* %3
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %8
28: ; preds = %8, %2
%29 = load i32, i32* @EXIT_SUCCESS
ret i32 %29
}