#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*/ printf(char *, int, int, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, char *, char *, int *, int *);
int main() {
  int a, b, c, d, e, ac;
  char x, y;
  ac = 1;
  scanf("%d %c %c %d %d", &a, &x, &y, &b, &c);
  d = x - 64;
  e = y - 64;
  while (ac <= c) {
    printf("%d%.2d%.2d%.2d%.2d\n", a, d, e, b, ac);
    ac++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x1c(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x1d(%rbp),%rdx
lea    -0x1e(%rbp),%rcx
lea    -0xc(%rbp),%r8
lea    -0x10(%rbp),%r9
call   1040 <scanf@plt>
movsbl -0x1d(%rbp),%eax
sub    $0x40,%eax
mov    %eax,-0x14(%rbp)
movsbl -0x1e(%rbp),%eax
sub    $0x40,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11a1 <main+0x81>
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    116a <main+0x4a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xecf(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0xb(%rsp),%rdx
lea    0xa(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11a2 <main+0x82>
movsbl 0xb(%rsp),%r14d
add    $0xffffffc0,%r14d
movsbl 0xa(%rsp),%ebp
add    $0xffffffc0,%ebp
xor    %ebx,%ebx
lea    0xe9e(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%r8d
mov    %r15,%rdi
mov    %r14d,%edx
mov    %ebp,%ecx
mov    %ebx,%r9d
call   1030 <printf@plt>
cmp    0xc(%rsp),%ebx
jl     1180 <main+0x60>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d %c %c %d %d\00"
@.str.1 = [20 x i8] c"%d%.2d%.2d%.2d%.2d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
store i32 0, i32* %1
store i32 1, i32* %7
%10 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %2, i8* %8, i8* %9, i32* %3, i32* %4)
%11 = load i8, i8* %8
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 64
store i32 %13, i32* %5
%14 = load i8, i8* %9
%15 = sext i8 %14 to i32
%16 = sub nsw i32 %15, 64
store i32 %16, i32* %6
br label %17
17: ; preds = %21, %0
%18 = load i32, i32* %7
%19 = load i32, i32* %4
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load i32, i32* %2
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = load i32, i32* %3
%26 = load i32, i32* %7
%27 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23, i32 %24, i32 %25, i32 %26)
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %17
30: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d %c %c %d %d\00"
@.str.1 = [20 x i8] c"%d%.2d%.2d%.2d%.2d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %4, i8* %5, i32* %2, i32* %3)
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = add nsw i32 %11, -64
%13 = load i8, i8* %5
%14 = sext i8 %13 to i32
%15 = add nsw i32 %14, -64
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 1
br i1 %17, label %26, label %18
18: ; preds = %0, %18
%19 = phi i32 [ %23, %18 ], [ 1, %0 ]
%20 = load i32, i32* %1
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %12, i32 %15, i32 %21, i32 %19)
%23 = add nuw nsw i32 %19, 1
%24 = load i32, i32* %3
%25 = icmp slt i32 %19, %24
br i1 %25, label %18, label %26
26: ; preds = %18, %0
ret i32 0
}