#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, char, char, int, int);
int /*<<< orphan*/ scanf(char *, int *, char *, char *, int *, int *);
int main() {
  int a, b, c, f, g, i = 1;
  char d, e;
  scanf("%d %c %c %d %d", &a, &d, &e, &b, &c);
  while (c >= i) {
    printf("%d%.2d%.2d%.2d%.2d\n", a, d - 64, e - 64, b, i);
    i++;
  }
  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>
mov    -0x10(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     119d <main+0x7d>
mov    -0x8(%rbp),%esi
movsbl -0x1d(%rbp),%eax
sub    $0x40,%eax
mov    %al,%cl
movsbl -0x1e(%rbp),%eax
sub    $0x40,%eax
mov    -0xc(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
lea    0xe8b(%rip),%rdi
movsbl %cl,%edx
movsbl %al,%ecx
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1156 <main+0x36>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed2(%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    1192 <main+0x72>
xor    %ebx,%ebx
lea    0xeb3(%rip),%r14
nopl   0x0(%rax)
add    $0x1,%ebx
mov    0x14(%rsp),%esi
movzbl 0xb(%rsp),%eax
add    $0xc0,%al
movzbl 0xa(%rsp),%ecx
add    $0xc0,%cl
mov    0x10(%rsp),%r8d
movsbl %al,%edx
movsbl %cl,%ecx
mov    %r14,%rdi
mov    %ebx,%r9d
call   1030 <printf@plt>
cmp    %ebx,0xc(%rsp)
jg     1160 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
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)
br label %11
11: ; preds = %15, %0
%12 = load i32, i32* %4
%13 = load i32, i32* %7
%14 = icmp sge i32 %12, %13
br i1 %14, label %15, label %30
15: ; preds = %11
%16 = load i32, i32* %2
%17 = load i8, i8* %8
%18 = sext i8 %17 to i32
%19 = sub nsw i32 %18, 64
%20 = trunc i32 %19 to i8
%21 = load i8, i8* %9
%22 = sext i8 %21 to i32
%23 = sub nsw i32 %22, 64
%24 = trunc i32 %23 to i8
%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 %16, i8 signext %20, i8 signext %24, i32 %25, i32 %26)
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %11
30: ; preds = %11
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 i32, i32* %3
%11 = icmp slt i32 %10, 1
br i1 %11, label %24, label %12
12: ; preds = %0, %12
%13 = phi i32 [ %21, %12 ], [ 1, %0 ]
%14 = load i32, i32* %1
%15 = load i8, i8* %4
%16 = add i8 %15, -64
%17 = load i8, i8* %5
%18 = add i8 %17, -64
%19 = load i32, i32* %2
%20 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %14, i8 signext %16, i8 signext %18, i32 %19, i32 %13)
%21 = add nuw nsw i32 %13, 1
%22 = load i32, i32* %3
%23 = icmp sgt i32 %22, %13
br i1 %23, label %12, label %24
24: ; preds = %12, %0
ret i32 0
}