#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*/ EXIT_FAILURE;
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int first[10], middle[10], last, columns, count, i, j;
  switch (argc - 1) {
  case 0:
    columns = 4;
    printf("Last Digit: ");
    scanf("%d", &last);
    break;
  case 1:
    last = atoi(argv[1]);
    columns = 4;
    break;
  case 2:
    last = atoi(argv[1]);
    columns = atoi(argv[2]);
    break;
  default:
    fprintf(stderr, "Too many arguments.\n");
    exit(EXIT_FAILURE);
  }
  if (last < 0 || last > 39) {
    printf("Last Digit must be 0-39.\n");
    return 1;
  }
  printf("Possible Combinations:\n");
  count = 0;
  for (i = 0; i < 10; ++i) {
    first[i] = (4 * i) + (last % 4);
  }
  for (i = 0; i < 10; ++i) {
    middle[i] = (first[i] + 2) % 40;
  }
  int skip = 0;
  for (i = 0; i < 10; ++i) {
    for (j = 0; j < 10; ++j) {
      if (middle[j] == last || (40 + middle[j] - 2) % 40 == last ||
          (40 + middle[j] - 1) % 40 == last ||
          (40 + middle[j] + 1) % 40 == last ||
          (40 + middle[j] + 2) % 40 == last) {
        skip++;
        continue;
      }
      printf("%02d-%02d-%02d  ", first[i], middle[j], last);
      count++;
      if (count % columns == 0) {
        printf("\n");
      }
    }
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8c(%rbp)
je     11a8 <main+0x58>
jmp    1180 <main+0x30>
mov    -0x8c(%rbp),%eax
sub    $0x1,%eax
je     11d2 <main+0x82>
jmp    1194 <main+0x44>
mov    -0x8c(%rbp),%eax
sub    $0x2,%eax
je     11ee <main+0x9e>
jmp    1213 <main+0xc3>
movl   $0x4,-0x78(%rbp)
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe49(%rip),%rdi
lea    -0x74(%rbp),%rsi
call   1050 <scanf@plt>
jmp    1236 <main+0xe6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x74(%rbp)
movl   $0x4,-0x78(%rbp)
jmp    1236 <main+0xe6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x74(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x78(%rbp)
jmp    1236 <main+0xe6>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
lea    0xded(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
cmpl   $0x0,-0x74(%rbp)
jl     124a <main+0xfa>
cmpl   $0x27,-0x74(%rbp)
jle    1264 <main+0x114>
lea    0xdd4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    145b <main+0x30b>
lea    0xdd4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
cmpl   $0xa,-0x80(%rbp)
jge    12b3 <main+0x163>
mov    -0x80(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x74(%rbp),%eax
mov    $0x4,%esi
cltd
idiv   %esi
add    %edx,%ecx
movslq -0x80(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1280 <main+0x130>
movl   $0x0,-0x80(%rbp)
cmpl   $0xa,-0x80(%rbp)
jge    12ed <main+0x19d>
movslq -0x80(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
add    $0x2,%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
movslq -0x80(%rbp),%rax
mov    %edx,-0x70(%rbp,%rax,4)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    12ba <main+0x16a>
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x80(%rbp)
cmpl   $0xa,-0x80(%rbp)
jge    1446 <main+0x2f6>
movl   $0x0,-0x84(%rbp)
cmpl   $0xa,-0x84(%rbp)
jge    1433 <main+0x2e3>
movslq -0x84(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
cmp    -0x74(%rbp),%eax
je     13bb <main+0x26b>
movslq -0x84(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
add    $0x28,%eax
sub    $0x2,%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
cmp    -0x74(%rbp),%edx
je     13bb <main+0x26b>
movslq -0x84(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
add    $0x28,%eax
sub    $0x1,%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
cmp    -0x74(%rbp),%edx
je     13bb <main+0x26b>
movslq -0x84(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
add    $0x28,%eax
add    $0x1,%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
cmp    -0x74(%rbp),%edx
je     13bb <main+0x26b>
movslq -0x84(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
add    $0x28,%eax
add    $0x2,%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
cmp    -0x74(%rbp),%edx
jne    13cf <main+0x27f>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    141f <main+0x2cf>
movslq -0x80(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
movslq -0x84(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%edx
mov    -0x74(%rbp),%ecx
lea    0xc6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cltd
idivl  -0x78(%rbp)
cmp    $0x0,%edx
jne    141a <main+0x2ca>
lea    0xc2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <main+0x2cf>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1312 <main+0x1c2>
jmp    1438 <main+0x2e8>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    12fe <main+0x1ae>
lea    0xbf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x70,%rsp
mov    %rsi,%rbp
cmp    $0x3,%edi
je     11c9 <main+0x59>
cmp    $0x2,%edi
je     14a0 <main+0x330>
cmp    $0x1,%edi
jne    14dc <main+0x36c>
lea    0xe83(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe82(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1070 <scanf@plt>
mov    $0x4,%r14d
mov    0xc(%rsp),%ebx
cmp    $0x28,%ebx
jb     11ed <main+0x7d>
jmp    14be <main+0x34e>
mov    0x8(%rbp),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebx
mov    %eax,0xc(%rsp)
mov    0x10(%rbp),%rdi
call   1080 <atoi@plt>
mov    %eax,%r14d
cmp    $0x28,%ebx
jae    14be <main+0x34e>
lea    0xe62(%rip),%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%ecx
lea    0x3(%rcx),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
and    $0xfffffffc,%edx
mov    %ecx,%eax
sub    %edx,%eax
mov    %eax,0x40(%rsp)
movd   %eax,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa 0xddf(%rip),%xmm1
paddd  %xmm0,%xmm1
movdqu %xmm1,0x44(%rsp)
paddd  0xddd(%rip),%xmm0
movdqu %xmm0,0x54(%rsp)
neg    %edx
add    %edx,%ecx
add    $0x24,%ecx
mov    %ecx,0x64(%rsp)
lea    0x2(%rax),%ecx
movsbl %cl,%ecx
imul   $0x67,%ecx,%edx
movzwl %dx,%esi
shr    $0xc,%edx
shr    $0xf,%esi
add    %dl,%sil
movzbl %sil,%edx
shl    $0x3,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movsbl %cl,%ecx
mov    %ecx,0x10(%rsp)
lea    0x6(%rax),%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xa,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movzbl %cl,%ecx
mov    %ecx,0x14(%rsp)
lea    0xa(%rax),%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xa,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movzbl %cl,%ecx
mov    %ecx,0x18(%rsp)
lea    0xe(%rax),%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xa,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movzbl %cl,%ecx
mov    %ecx,0x1c(%rsp)
lea    0x12(%rax),%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xa,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movzbl %cl,%ecx
mov    %ecx,0x20(%rsp)
lea    0x16(%rax),%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xa,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movzbl %cl,%ecx
mov    %ecx,0x24(%rsp)
lea    0x1a(%rax),%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xa,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movzbl %cl,%ecx
mov    %ecx,0x28(%rsp)
lea    0x1e(%rax),%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xa,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movzbl %cl,%ecx
mov    %ecx,0x2c(%rsp)
lea    0x22(%rax),%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xa,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movzbl %cl,%ecx
mov    %ecx,0x30(%rsp)
add    $0x26,%al
movzbl %al,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
and    $0xfffffff8,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movzbl %al,%eax
mov    %eax,0x34(%rsp)
lea    0xcc5(%rip),%r15
xor    %ebx,%ebx
xor    %r12d,%r12d
jmp    139e <main+0x22e>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    $0xa,%rbx
je     1492 <main+0x322>
xor    %ebp,%ebp
jmp    13ba <main+0x24a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    $0xa,%rbp
je     1390 <main+0x220>
mov    0x10(%rsp,%rbp,4),%edx
mov    0xc(%rsp),%ecx
cmp    %ecx,%edx
je     13b0 <main+0x240>
lea    0x26(%rdx),%eax
cltq
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x24,%rsi
add    %edi,%esi
shl    $0x3,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%eax
cmp    %ecx,%eax
je     13b0 <main+0x240>
lea    0x27(%rdx),%eax
cltq
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x24,%rsi
add    %edi,%esi
shl    $0x3,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%eax
cmp    %ecx,%eax
je     13b0 <main+0x240>
lea    0x29(%rdx),%eax
cltq
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x24,%rsi
add    %edi,%esi
shl    $0x3,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%eax
cmp    %ecx,%eax
je     13b0 <main+0x240>
lea    0x2a(%rdx),%eax
cltq
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x24,%rsi
add    %edi,%esi
shl    $0x3,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%eax
cmp    %ecx,%eax
je     13b0 <main+0x240>
mov    0x40(%rsp,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r12d
mov    %r12d,%eax
cltd
idiv   %r14d
test   %edx,%edx
jne    13b0 <main+0x240>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    13b0 <main+0x240>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
jmp    14cf <main+0x35f>
mov    0x8(%rbp),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebx
mov    %eax,0xc(%rsp)
mov    $0x4,%r14d
cmp    $0x28,%ebx
jb     11ed <main+0x7d>
lea    0xba8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2afd(%rip),%rax
mov    (%rax),%edi
lea    0xb44(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2ae0(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Last Digit: \00"
@.str.1 = [3 x i8] c"%d\00"
@stderr = global i32 0
@.str.2 = [21 x i8] c"Too many arguments.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [26 x i8] c"Last Digit must be 0-39.\0A\00"
@.str.4 = [24 x i8] c"Possible Combinations:\0A\00"
@.str.5 = [17 x i8] c"%02d-%02d-%02d \00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca [10 x i32]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
switch i32 %15, label %33 [
i32 0, label %16
i32 1, label %19
i32 2, label %24
]
16: ; preds = %2
store i32 4, i32* %9
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
br label %38
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @atoi(i8* %22)
store i32 %23, i32* %8
store i32 4, i32* %9
br label %38
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @atoi(i8* %27)
store i32 %28, i32* %8
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 2
%31 = load i8*, i8** %30
%32 = call i32 @atoi(i8* %31)
store i32 %32, i32* %9
br label %38
33: ; preds = %2
%34 = load i32, i32* @stderr
%35 = call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%36 = load i32, i32* @EXIT_FAILURE
%37 = call i32 @exit(i32 %36)
unreachable
38: ; preds = %24, %19, %16
%39 = load i32, i32* %8
%40 = icmp slt i32 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %38
%42 = load i32, i32* %8
%43 = icmp sgt i32 %42, 39
br i1 %43, label %44, label %46
44: ; preds = %41, %38
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %167
46: ; preds = %41
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %10
store i32 0, i32* %11
br label %48
48: ; preds = %60, %46
%49 = load i32, i32* %11
%50 = icmp slt i32 %49, 10
br i1 %50, label %51, label %63
51: ; preds = %48
%52 = load i32, i32* %11
%53 = mul nsw i32 4, %52
%54 = load i32, i32* %8
%55 = srem i32 %54, 4
%56 = add nsw i32 %53, %55
%57 = load i32, i32* %11
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %58
store i32 %56, i32* %59
br label %60
60: ; preds = %51
%61 = load i32, i32* %11
%62 = add nsw i32 %61, 1
store i32 %62, i32* %11
br label %48
63: ; preds = %48
store i32 0, i32* %11
br label %64
64: ; preds = %77, %63
%65 = load i32, i32* %11
%66 = icmp slt i32 %65, 10
br i1 %66, label %67, label %80
67: ; preds = %64
%68 = load i32, i32* %11
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = add nsw i32 %71, 2
%73 = srem i32 %72, 40
%74 = load i32, i32* %11
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %75
store i32 %73, i32* %76
br label %77
77: ; preds = %67
%78 = load i32, i32* %11
%79 = add nsw i32 %78, 1
store i32 %79, i32* %11
br label %64
80: ; preds = %64
store i32 0, i32* %13
store i32 0, i32* %11
br label %81
81: ; preds = %162, %80
%82 = load i32, i32* %11
%83 = icmp slt i32 %82, 10
br i1 %83, label %84, label %165
84: ; preds = %81
store i32 0, i32* %12
br label %85
85: ; preds = %158, %84
%86 = load i32, i32* %12
%87 = icmp slt i32 %86, 10
br i1 %87, label %88, label %161
88: ; preds = %85
%89 = load i32, i32* %12
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = load i32, i32* %8
%94 = icmp eq i32 %92, %93
br i1 %94, label %135, label %95
95: ; preds = %88
%96 = load i32, i32* %12
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %97
%99 = load i32, i32* %98
%100 = add nsw i32 40, %99
%101 = sub nsw i32 %100, 2
%102 = srem i32 %101, 40
%103 = load i32, i32* %8
%104 = icmp eq i32 %102, %103
br i1 %104, label %135, label %105
105: ; preds = %95
%106 = load i32, i32* %12
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %107
%109 = load i32, i32* %108
%110 = add nsw i32 40, %109
%111 = sub nsw i32 %110, 1
%112 = srem i32 %111, 40
%113 = load i32, i32* %8
%114 = icmp eq i32 %112, %113
br i1 %114, label %135, label %115
115: ; preds = %105
%116 = load i32, i32* %12
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %117
%119 = load i32, i32* %118
%120 = add nsw i32 40, %119
%121 = add nsw i32 %120, 1
%122 = srem i32 %121, 40
%123 = load i32, i32* %8
%124 = icmp eq i32 %122, %123
br i1 %124, label %135, label %125
125: ; preds = %115
%126 = load i32, i32* %12
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %127
%129 = load i32, i32* %128
%130 = add nsw i32 40, %129
%131 = add nsw i32 %130, 2
%132 = srem i32 %131, 40
%133 = load i32, i32* %8
%134 = icmp eq i32 %132, %133
br i1 %134, label %135, label %138
135: ; preds = %125, %115, %105, %95, %88
%136 = load i32, i32* %13
%137 = add nsw i32 %136, 1
store i32 %137, i32* %13
br label %158
138: ; preds = %125
%139 = load i32, i32* %11
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %140
%142 = load i32, i32* %141
%143 = load i32, i32* %12
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %144
%146 = load i32, i32* %145
%147 = load i32, i32* %8
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %142, i32 %146, i32 %147)
%149 = load i32, i32* %10
%150 = add nsw i32 %149, 1
store i32 %150, i32* %10
%151 = load i32, i32* %10
%152 = load i32, i32* %9
%153 = srem i32 %151, %152
%154 = icmp eq i32 %153, 0
br i1 %154, label %155, label %157
155: ; preds = %138
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %157
157: ; preds = %155, %138
br label %158
158: ; preds = %157, %135
%159 = load i32, i32* %12
%160 = add nsw i32 %159, 1
store i32 %160, i32* %12
br label %85
161: ; preds = %85
br label %162
162: ; preds = %161
%163 = load i32, i32* %11
%164 = add nsw i32 %163, 1
store i32 %164, i32* %11
br label %81
165: ; preds = %81
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %3
br label %167
167: ; preds = %165, %44
%168 = load i32, i32* %3
ret i32 %168
}

LLVM IR (-O2):
@.str = [13 x i8] c"Last Digit: \00"
@.str.1 = [3 x i8] c"%d\00"
@stderr = global i32 0
@.str.2 = [21 x i8] c"Too many arguments.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.5 = [17 x i8] c"%02d-%02d-%02d \00"
@str = [23 x i8] c"Possible Combinations:\00"
@str.7 = [25 x i8] c"Last Digit must be 0-39.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = alloca i32
%6 = bitcast [10 x i32]* %3 to i8*
%7 = bitcast [10 x i32]* %4 to i8*
%8 = bitcast i32* %5 to i8*
switch i32 %0, label %24 [
i32 1, label %9
i32 2, label %13
i32 3, label %17
]
9: ; preds = %2
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%12 = load i32, i32* %5
br label %29
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = tail call i32 @atoi(i8* %15)
store i32 %16, i32* %5
br label %29
17: ; preds = %2
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = tail call i32 @atoi(i8* %19)
store i32 %20, i32* %5
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = tail call i32 @atoi(i8* %22)
br label %29
24: ; preds = %2
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = tail call i32 @exit(i32 %27)
unreachable
29: ; preds = %17, %13, %9
%30 = phi i32 [ %20, %17 ], [ %16, %13 ], [ %12, %9 ]
%31 = phi i32 [ %23, %17 ], [ 4, %13 ], [ 4, %9 ]
%32 = icmp ugt i32 %30, 39
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.7, i64 0, i64 0))
br label %144
35: ; preds = %29
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%37 = load i32, i32* %5
%38 = srem i32 %37, 4
%39 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
store i32 %38, i32* %39
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 1
%41 = insertelement <4 x i32> poison, i32 %38, i64 0
%42 = shufflevector <4 x i32> %41, <4 x i32> poison, <4 x i32> zeroinitializer
%43 = add nsw <4 x i32> %42, <i32 4, i32 8, i32 12, i32 16>
%44 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> %43, <4 x i32>* %44
%45 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 5
%46 = add nsw <4 x i32> %42, <i32 20, i32 24, i32 28, i32 32>
%47 = bitcast i32* %45 to <4 x i32>*
store <4 x i32> %46, <4 x i32>* %47
%48 = add nsw i32 %38, 36
%49 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 9
store i32 %48, i32* %49
%50 = trunc i32 %38 to i8
%51 = add i8 %50, 2
%52 = srem i8 %51, 40
%53 = sext i8 %52 to i32
%54 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
store i32 %53, i32* %54
%55 = trunc i32 %38 to i8
%56 = add i8 %55, 6
%57 = urem i8 %56, 40
%58 = zext i8 %57 to i32
%59 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 1
store i32 %58, i32* %59
%60 = trunc i32 %38 to i8
%61 = add i8 %60, 10
%62 = urem i8 %61, 40
%63 = zext i8 %62 to i32
%64 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 2
store i32 %63, i32* %64
%65 = trunc i32 %38 to i8
%66 = add i8 %65, 14
%67 = urem i8 %66, 40
%68 = zext i8 %67 to i32
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 3
store i32 %68, i32* %69
%70 = trunc i32 %38 to i8
%71 = add i8 %70, 18
%72 = urem i8 %71, 40
%73 = zext i8 %72 to i32
%74 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 4
store i32 %73, i32* %74
%75 = trunc i32 %38 to i8
%76 = add i8 %75, 22
%77 = urem i8 %76, 40
%78 = zext i8 %77 to i32
%79 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 5
store i32 %78, i32* %79
%80 = trunc i32 %38 to i8
%81 = add i8 %80, 26
%82 = urem i8 %81, 40
%83 = zext i8 %82 to i32
%84 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 6
store i32 %83, i32* %84
%85 = trunc i32 %38 to i8
%86 = add i8 %85, 30
%87 = urem i8 %86, 40
%88 = zext i8 %87 to i32
%89 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 7
store i32 %88, i32* %89
%90 = trunc i32 %38 to i8
%91 = add i8 %90, 34
%92 = urem i8 %91, 40
%93 = zext i8 %92 to i32
%94 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 8
store i32 %93, i32* %94
%95 = trunc i32 %38 to i8
%96 = add i8 %95, 38
%97 = urem i8 %96, 40
%98 = zext i8 %97 to i32
%99 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 9
store i32 %98, i32* %99
br label %100
100: ; preds = %35, %139
%101 = phi i64 [ 0, %35 ], [ %140, %139 ]
%102 = phi i32 [ 0, %35 ], [ %136, %139 ]
%103 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %101
br label %104
104: ; preds = %100, %135
%105 = phi i64 [ 0, %100 ], [ %137, %135 ]
%106 = phi i32 [ %102, %100 ], [ %136, %135 ]
%107 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 %105
%108 = load i32, i32* %107
%109 = load i32, i32* %5
%110 = icmp eq i32 %108, %109
br i1 %110, label %135, label %111
111: ; preds = %104
%112 = add nsw i32 %108, 38
%113 = srem i32 %112, 40
%114 = icmp eq i32 %113, %109
br i1 %114, label %135, label %115
115: ; preds = %111
%116 = add nsw i32 %108, 39
%117 = srem i32 %116, 40
%118 = icmp eq i32 %117, %109
br i1 %118, label %135, label %119
119: ; preds = %115
%120 = add nsw i32 %108, 41
%121 = srem i32 %120, 40
%122 = icmp eq i32 %121, %109
br i1 %122, label %135, label %123
123: ; preds = %119
%124 = add nsw i32 %108, 42
%125 = srem i32 %124, 40
%126 = icmp eq i32 %125, %109
br i1 %126, label %135, label %127
127: ; preds = %123
%128 = load i32, i32* %103
%129 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %128, i32 %108, i32 %109)
%130 = add nsw i32 %106, 1
%131 = srem i32 %130, %31
%132 = icmp eq i32 %131, 0
br i1 %132, label %133, label %135
133: ; preds = %127
%134 = call i32 @putchar(i32 10)
br label %135
135: ; preds = %104, %111, %115, %119, %123, %127, %133
%136 = phi i32 [ %130, %133 ], [ %130, %127 ], [ %106, %123 ], [ %106, %119 ], [ %106, %115 ], [ %106, %111 ], [ %106, %104 ]
%137 = add nuw nsw i64 %105, 1
%138 = icmp eq i64 %137, 10
br i1 %138, label %139, label %104
139: ; preds = %135
%140 = add nuw nsw i64 %101, 1
%141 = icmp eq i64 %140, 10
br i1 %141, label %142, label %100
142: ; preds = %139
%143 = call i32 @putchar(i32 10)
br label %144
144: ; preds = %142, %33
%145 = phi i32 [ 1, %33 ], [ 0, %142 ]
ret i32 %145
}