#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 *, ...);
void printData(int diff, int mt, int dt, int m, int d, int years,
               int isNextYear) {
  printf("\nDate input: %c%d/%c%d/%d", (m < 10) ? '0' : '\0', m,
         (d < 10) ? '0' : '\0', d, years);
  printf("\nNext tax day: 0%d/%d/%d\n", mt, dt, years + isNextYear);
  if (diff == 0)
    printf("\nToday is tax day.\n\n");
  else if (diff == 1)
    printf("\nThe next tax day is in 1 day.\n\n");
  else
    printf("\nThe next tax day is in %d days.\n\n", diff);
  return;
}


x86 assembly (clang, -O0):
<printData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x10(%rbp),%ecx
xor    %esi,%esi
mov    $0x30,%eax
cmp    $0xa,%ecx
cmovl  %eax,%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%edi
xor    %ecx,%ecx
mov    $0x30,%eax
cmp    $0xa,%edi
cmovl  %eax,%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%ecx
add    0x10(%rbp),%ecx
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    119f <printData+0x8f>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d2 <printData+0xc2>
cmpl   $0x1,-0x4(%rbp)
jne    11bc <printData+0xac>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cd <printData+0xbd>
mov    -0x4(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d2 <printData+0xc2>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printData>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %r10d,%r10d
cmp    $0xa,%ecx
mov    $0x30,%eax
mov    $0x0,%ebx
cmovl  %eax,%ebx
mov    %r9d,%ebp
mov    %edx,%r15d
mov    %esi,%r12d
mov    %edi,%r14d
cmp    $0xa,%r8d
cmovge %r10d,%eax
lea    0xeaa(%rip),%rdi
mov    %ebx,%esi
mov    %ecx,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x30(%rsp),%ebp
lea    0xeac(%rip),%rdi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%r14d
je     1191 <printData+0x71>
test   %r14d,%r14d
jne    11a5 <printData+0x85>
lea    0xee8(%rip),%rdi
jmp    1198 <printData+0x78>
lea    0xebf(%rip),%rdi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>
lea    0xe88(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\0ADate input: %c%d/%c%d/%d\00"
@.str.1 = [26 x i8] c"\0ANext tax day: 0%d/%d/%d\0A\00"
@.str.2 = [21 x i8] c"\0AToday is tax day.\0A\0A\00"
@.str.3 = [33 x i8] c"\0AThe next tax day is in 1 day.\0A\0A\00"
@.str.4 = [35 x i8] c"\0AThe next tax day is in %d days.\0A\0A\00"
define void @printData(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %11
%16 = icmp slt i32 %15, 10
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 48, i32 0
%19 = load i32, i32* %11
%20 = load i32, i32* %12
%21 = icmp slt i32 %20, 10
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 48, i32 0
%24 = load i32, i32* %12
%25 = load i32, i32* %13
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19, i32 %23, i32 %24, i32 %25)
%27 = load i32, i32* %9
%28 = load i32, i32* %10
%29 = load i32, i32* %13
%30 = load i32, i32* %14
%31 = add nsw i32 %29, %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %28, i32 %31)
%33 = load i32, i32* %8
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %7
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %46
37: ; preds = %7
%38 = load i32, i32* %8
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %45
42: ; preds = %37
%43 = load i32, i32* %8
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %43)
br label %45
45: ; preds = %42, %40
br label %46
46: ; preds = %45, %35
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0ADate input: %c%d/%c%d/%d\00"
@.str.1 = [26 x i8] c"\0ANext tax day: 0%d/%d/%d\0A\00"
@.str.4 = [35 x i8] c"\0AThe next tax day is in %d days.\0A\0A\00"
@str = [32 x i8] c"\0AThe next tax day is in 1 day.\0A\00"
@str.5 = [20 x i8] c"\0AToday is tax day.\0A\00"
define void @printData(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = icmp slt i32 %3, 10
%9 = select i1 %8, i32 48, i32 0
%10 = icmp slt i32 %4, 10
%11 = select i1 %10, i32 48, i32 0
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %3, i32 %11, i32 %4, i32 %5)
%13 = add nsw i32 %6, %5
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %2, i32 %13)
switch i32 %0, label %19 [
i32 0, label %15
i32 1, label %17
]
15: ; preds = %7
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
br label %21
17: ; preds = %7
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
br label %21
19: ; preds = %7
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %0)
br label %21
21: ; preds = %17, %19, %15
ret void
}