#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*/ printf(char *, ...);
scalar_t__ scanf(char *, int *, int *);
int main(int argc, const char *argv[]) {
  int a, b, i, tmp, flag;
  while (scanf("%d%d", &a, &b) != EOF) {
    flag = 1;
    if (a == b && a == 0)
      break;
    for (i = 0; i < 100; i++) {
      tmp = a * 100 + i;
      if (tmp % b == 0)
        if (flag) {
          flag = 0;
          printf("%02d", tmp % 100);
        } else
          printf(" %02d", tmp % 100);
    }
    printf("\n");
  }
  return 0;
}


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)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e97(%rip),%rcx
cmp    (%rcx),%rax
je     121e <main+0xfe>
movl   $0x1,-0x24(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    117c <main+0x5c>
cmpl   $0x0,-0x14(%rbp)
jne    117c <main+0x5c>
jmp    121e <main+0xfe>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    120b <main+0xeb>
imul   $0x64,-0x14(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cltd
idivl  -0x18(%rbp)
cmp    $0x0,%edx
jne    11f8 <main+0xd8>
cmpl   $0x0,-0x24(%rbp)
je     11d8 <main+0xb8>
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f3 <main+0xd3>
mov    -0x20(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f8 <main+0xd8>
jmp    11fd <main+0xdd>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1183 <main+0x63>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1136 <main+0x16>
xor    %eax,%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
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x2e92(%rip),%r13
cmp    0x0(%r13),%rax
jne    116d <main+0x3d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe91(%rip),%rbx
lea    0xe8b(%rip),%rbp
mov    %rsp,%r12
jmp    11a4 <main+0x74>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe6f(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %r12,%rdx
call   1050 <scanf@plt>
cmp    0x0(%r13),%rax
je     115c <main+0x2c>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
mov    %ecx,%edx
or     %eax,%edx
je     115c <main+0x2c>
xor    %r14d,%r14d
mov    $0x1,%r15d
nopw   0x0(%rax,%rax,1)
imul   $0x64,%eax,%esi
add    %r14d,%esi
mov    %esi,%eax
cltd
idiv   %ecx
test   %edx,%edx
jne    11ff <main+0xcf>
movslq %esi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%esi
test   %r15d,%r15d
mov    %rbp,%rdi
cmove  %rbx,%rdi
xor    %r15d,%r15d
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x63,%r14d
je     1180 <main+0x50>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
add    $0x1,%r14d
jmp    11c0 <main+0x90>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@EOF = global i64 0
@.str.1 = [5 x i8] c"%02d\00"
@.str.2 = [6 x i8] c" %02d\00"
@.str.3 = [2 x i8] c"\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
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %11
11: ; preds = %52, %2
%12 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7)
%13 = load i64, i64* @EOF
%14 = icmp ne i64 %12, %13
br i1 %14, label %15, label %54
15: ; preds = %11
store i32 1, i32* %10
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load i32, i32* %6
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %19
br label %54
23: ; preds = %19, %15
store i32 0, i32* %8
br label %24
24: ; preds = %49, %23
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 100
br i1 %26, label %27, label %52
27: ; preds = %24
%28 = load i32, i32* %6
%29 = mul nsw i32 %28, 100
%30 = load i32, i32* %8
%31 = add nsw i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %9
%33 = load i32, i32* %7
%34 = srem i32 %32, %33
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %48
36: ; preds = %27
%37 = load i32, i32* %10
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %43
39: ; preds = %36
store i32 0, i32* %10
%40 = load i32, i32* %9
%41 = srem i32 %40, 100
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %41)
br label %47
43: ; preds = %36
%44 = load i32, i32* %9
%45 = srem i32 %44, 100
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %45)
br label %47
47: ; preds = %43, %39
br label %48
48: ; preds = %47, %27
br label %49
49: ; preds = %48
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
store i32 %51, i32* %8
br label %24
52: ; preds = %24
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %11
54: ; preds = %22, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@EOF = global i64 0
@.str.1 = [5 x i8] c"%02d\00"
@.str.2 = [6 x i8] c" %02d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %41, label %10
10: ; preds = %2, %36
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = or i32 %12, %11
%14 = icmp eq i32 %13, 0
br i1 %14, label %41, label %15
15: ; preds = %10, %33
%16 = phi i32 [ %35, %33 ], [ %12, %10 ]
%17 = phi i32 [ %34, %33 ], [ %11, %10 ]
%18 = phi i32 [ %30, %33 ], [ 1, %10 ]
%19 = phi i32 [ %31, %33 ], [ 0, %10 ]
%20 = mul nsw i32 %17, 100
%21 = add nsw i32 %20, %19
%22 = srem i32 %21, %16
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %15
%25 = icmp eq i32 %18, 0
%26 = srem i32 %21, 100
%27 = select i1 %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %27, i32 %26)
br label %29
29: ; preds = %24, %15
%30 = phi i32 [ %18, %15 ], [ 0, %24 ]
%31 = add nuw nsw i32 %19, 1
%32 = icmp eq i32 %31, 100
br i1 %32, label %36, label %33
33: ; preds = %29
%34 = load i32, i32* %3
%35 = load i32, i32* %4
br label %15
36: ; preds = %29
%37 = call i32 @putchar(i32 10)
%38 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%39 = load i64, i64* @EOF
%40 = icmp eq i64 %38, %39
br i1 %40, label %41, label %10
41: ; preds = %36, %10, %2
ret i32 0
}