#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 /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int month1 = 0, month2 = 0, day1 = 0, day2 = 0, year1 = 0, year2 = 0;
  printf("enter first date (mm/dd/yy)\n");
  scanf("%d/%d/%d", &month1, &day1, &year1);
  printf("enter second  date (mm/dd/yy)\n");
  scanf("%d/%d/%d", &month2, &day2, &year2);
  if (year1 > year2) {
    printf("%d/%d/%d is earlier than %d/%d/%d\n", month2, day2, year2, month1,
           day1, year1);
  } else if (year1 < year2) {
    printf("%d/%d/%d is earlier than %d/%d/%d\n", month1, day1, year1, month2,
           day2, year2);
  } else if (year1 == year2) {
    if (month1 > month2) {
      printf("%d/%d/%d is earlier than %d/%d/%d\n", month2, day2, year2, month1,
             day1, year1);
    } else if (month1 < month2) {
      printf("%d/%d/%d is earlier than %d/%d/%d\n", month1, day1, year1, month2,
             day2, year2);
    } else if (month1 == month2) {
      if (day1 > day2) {
        printf("%d/%d/%d is earlier than %d/%d/%d\n", month2, day2, year2,
               month1, day1, year1);
      } else if (day1 < day2) {
        printf("%d/%d/%d is earlier than %d/%d/%d\n", month1, day1, year1,
               month2, day2, year2);
      } else if (day1 == day2) {
        printf("enter two different date\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe89(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    11db <main+0xbb>
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0x18(%rbp),%eax
lea    0xe79(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1343 <main+0x223>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1211 <main+0xf1>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x1c(%rbp),%eax
lea    0xe43(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
jmp    133e <main+0x21e>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    1339 <main+0x219>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1253 <main+0x133>
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0x18(%rbp),%eax
lea    0xe01(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1334 <main+0x214>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1289 <main+0x169>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x1c(%rbp),%eax
lea    0xdcb(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
jmp    132f <main+0x20f>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    132a <main+0x20a>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    12cb <main+0x1ab>
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0x18(%rbp),%eax
lea    0xd89(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1325 <main+0x205>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1301 <main+0x1e1>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x1c(%rbp),%eax
lea    0xd53(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1320 <main+0x200>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    131b <main+0x1fb>
lea    0xd54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1320 <main+0x200>
jmp    1325 <main+0x205>
jmp    132a <main+0x20a>
jmp    132f <main+0x20f>
jmp    1334 <main+0x214>
jmp    1339 <main+0x219>
jmp    133e <main+0x21e>
jmp    1343 <main+0x223>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x1c(%rsp)
movl   $0x0,0x18(%rsp)
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe88(%rip),%rbx
lea    0x14(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x1c(%rsp),%rcx
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x18(%rsp),%rcx
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x1c(%rsp),%ecx
mov    0x18(%rsp),%eax
cmp    %eax,%ecx
jle    11e1 <main+0xb1>
mov    0x10(%rsp),%esi
mov    0x8(%rsp),%edx
mov    0x14(%rsp),%r8d
mov    0xc(%rsp),%r9d
mov    %ecx,(%rsp)
lea    0xe2f(%rip),%rdi
mov    %eax,%ecx
jmp    127b <main+0x14b>
jge    1201 <main+0xd1>
mov    0x14(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x10(%rsp),%r8d
mov    0x8(%rsp),%r9d
mov    %eax,(%rsp)
lea    0xe0a(%rip),%rdi
jmp    127b <main+0x14b>
jne    1282 <main+0x152>
mov    0x14(%rsp),%r8d
mov    0x10(%rsp),%eax
cmp    %eax,%r8d
jle    1228 <main+0xf8>
mov    0x8(%rsp),%edx
mov    0xc(%rsp),%r9d
mov    %ecx,(%rsp)
lea    0xde5(%rip),%rdi
mov    %eax,%esi
jmp    127b <main+0x14b>
jge    1245 <main+0x115>
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%r9d
mov    %ecx,(%rsp)
lea    0xdcc(%rip),%rdi
mov    %r8d,%esi
mov    %eax,%r8d
jmp    127b <main+0x14b>
jne    1282 <main+0x152>
mov    0xc(%rsp),%r9d
mov    0x8(%rsp),%eax
cmp    %eax,%r9d
jle    1266 <main+0x136>
mov    %ecx,(%rsp)
lea    0xdaa(%rip),%rdi
mov    %r8d,%esi
mov    %eax,%edx
jmp    127b <main+0x14b>
jge    128a <main+0x15a>
mov    %ecx,(%rsp)
lea    0xd97(%rip),%rdi
mov    %r8d,%esi
mov    %r9d,%edx
mov    %eax,%r9d
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret
jne    1282 <main+0x152>
lea    0xdd3(%rip),%rdi
call   1030 <puts@plt>
jmp    1282 <main+0x152>

LLVM IR (-O0):
@.str = [29 x i8] c"enter first date (mm/dd/yy)\0A\00"
@.str.1 = [9 x i8] c"%d/%d/%d\00"
@.str.2 = [31 x i8] c"enter second date (mm/dd/yy)\0A\00"
@.str.3 = [35 x i8] c"%d/%d/%d is earlier than %d/%d/%d\0A\00"
@.str.4 = [26 x i8] c"enter two different date\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
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %4, i32* %6)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %5, i32* %7)
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %23
15: ; preds = %0
%16 = load i32, i32* %3
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = load i32, i32* %2
%20 = load i32, i32* %4
%21 = load i32, i32* %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
br label %105
23: ; preds = %0
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %35
27: ; preds = %23
%28 = load i32, i32* %2
%29 = load i32, i32* %4
%30 = load i32, i32* %6
%31 = load i32, i32* %3
%32 = load i32, i32* %5
%33 = load i32, i32* %7
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %28, i32 %29, i32 %30, i32 %31, i32 %32, i32 %33)
br label %104
35: ; preds = %23
%36 = load i32, i32* %6
%37 = load i32, i32* %7
%38 = icmp eq i32 %36, %37
br i1 %38, label %39, label %103
39: ; preds = %35
%40 = load i32, i32* %2
%41 = load i32, i32* %3
%42 = icmp sgt i32 %40, %41
br i1 %42, label %43, label %51
43: ; preds = %39
%44 = load i32, i32* %3
%45 = load i32, i32* %5
%46 = load i32, i32* %7
%47 = load i32, i32* %2
%48 = load i32, i32* %4
%49 = load i32, i32* %6
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %44, i32 %45, i32 %46, i32 %47, i32 %48, i32 %49)
br label %102
51: ; preds = %39
%52 = load i32, i32* %2
%53 = load i32, i32* %3
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %63
55: ; preds = %51
%56 = load i32, i32* %2
%57 = load i32, i32* %4
%58 = load i32, i32* %6
%59 = load i32, i32* %3
%60 = load i32, i32* %5
%61 = load i32, i32* %7
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %56, i32 %57, i32 %58, i32 %59, i32 %60, i32 %61)
br label %101
63: ; preds = %51
%64 = load i32, i32* %2
%65 = load i32, i32* %3
%66 = icmp eq i32 %64, %65
br i1 %66, label %67, label %100
67: ; preds = %63
%68 = load i32, i32* %4
%69 = load i32, i32* %5
%70 = icmp sgt i32 %68, %69
br i1 %70, label %71, label %79
71: ; preds = %67
%72 = load i32, i32* %3
%73 = load i32, i32* %5
%74 = load i32, i32* %7
%75 = load i32, i32* %2
%76 = load i32, i32* %4
%77 = load i32, i32* %6
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %72, i32 %73, i32 %74, i32 %75, i32 %76, i32 %77)
br label %99
79: ; preds = %67
%80 = load i32, i32* %4
%81 = load i32, i32* %5
%82 = icmp slt i32 %80, %81
br i1 %82, label %83, label %91
83: ; preds = %79
%84 = load i32, i32* %2
%85 = load i32, i32* %4
%86 = load i32, i32* %6
%87 = load i32, i32* %3
%88 = load i32, i32* %5
%89 = load i32, i32* %7
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %84, i32 %85, i32 %86, i32 %87, i32 %88, i32 %89)
br label %98
91: ; preds = %79
%92 = load i32, i32* %4
%93 = load i32, i32* %5
%94 = icmp eq i32 %92, %93
br i1 %94, label %95, label %97
95: ; preds = %91
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %97
97: ; preds = %95, %91
br label %98
98: ; preds = %97, %83
br label %99
99: ; preds = %98, %71
br label %100
100: ; preds = %99, %63
br label %101
101: ; preds = %100, %55
br label %102
102: ; preds = %101, %43
br label %103
103: ; preds = %102, %35
br label %104
104: ; preds = %103, %27
br label %105
105: ; preds = %104, %15
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%d/%d/%d\00"
@.str.3 = [35 x i8] c"%d/%d/%d is earlier than %d/%d/%d\0A\00"
@str = [28 x i8] c"enter first date (mm/dd/yy)\00"
@str.5 = [30 x i8] c"enter second date (mm/dd/yy)\00"
@str.6 = [25 x i8] c"enter two different date\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%8 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%9 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%10 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%11 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%12 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %3, i32* %5)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.5, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %4, i32* %6)
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %26
20: ; preds = %0
%21 = load i32, i32* %2
%22 = load i32, i32* %4
%23 = load i32, i32* %1
%24 = load i32, i32* %3
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %21, i32 %22, i32 %18, i32 %23, i32 %24, i32 %17)
br label %66
26: ; preds = %0
%27 = icmp slt i32 %17, %18
br i1 %27, label %28, label %34
28: ; preds = %26
%29 = load i32, i32* %1
%30 = load i32, i32* %3
%31 = load i32, i32* %2
%32 = load i32, i32* %4
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %29, i32 %30, i32 %17, i32 %31, i32 %32, i32 %18)
br label %66
34: ; preds = %26
%35 = icmp eq i32 %17, %18
br i1 %35, label %36, label %66
36: ; preds = %34
%37 = load i32, i32* %1
%38 = load i32, i32* %2
%39 = icmp sgt i32 %37, %38
br i1 %39, label %40, label %44
40: ; preds = %36
%41 = load i32, i32* %4
%42 = load i32, i32* %3
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %38, i32 %41, i32 %17, i32 %37, i32 %42, i32 %17)
br label %66
44: ; preds = %36
%45 = icmp slt i32 %37, %38
br i1 %45, label %46, label %50
46: ; preds = %44
%47 = load i32, i32* %3
%48 = load i32, i32* %4
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %37, i32 %47, i32 %17, i32 %38, i32 %48, i32 %17)
br label %66
50: ; preds = %44
%51 = icmp eq i32 %37, %38
br i1 %51, label %52, label %66
52: ; preds = %50
%53 = load i32, i32* %3
%54 = load i32, i32* %4
%55 = icmp sgt i32 %53, %54
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %37, i32 %54, i32 %17, i32 %37, i32 %53, i32 %17)
br label %66
58: ; preds = %52
%59 = icmp slt i32 %53, %54
br i1 %59, label %60, label %62
60: ; preds = %58
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %37, i32 %53, i32 %17, i32 %37, i32 %54, i32 %17)
br label %66
62: ; preds = %58
%63 = icmp eq i32 %53, %54
br i1 %63, label %64, label %66
64: ; preds = %62
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.6, i64 0, i64 0))
br label %66
66: ; preds = %28, %40, %50, %60, %64, %62, %56, %46, %34, %20
ret i32 0
}