#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 fabs(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int year;
  int month;
  int day;
  printf("请输入您的生日");
  scanf("%d%d%d", &year, &month, &day);
  int day_count =
      fabs(year - 2014) * 365 + (fabs(month - 12)) * 30 + fabs(day - 8);
  printf("您出生于%d年%d月%d日，总计约为%d天", year, month, day, day_count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
sub    $0x7de,%edi
call   1040 <fabs@plt>
imul   $0x16d,%eax,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
sub    $0xc,%edi
call   1040 <fabs@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
imul   $0x1e,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
sub    $0x8,%edi
call   1040 <fabs@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    $0xfffff822,%edi
add    0x14(%rsp),%edi
call   1040 <fabs@plt>
imul   $0x16d,%eax,%ebp
mov    0x10(%rsp),%edi
add    $0xfffffff4,%edi
call   1040 <fabs@plt>
mov    %eax,%ebx
shl    $0x5,%ebx
sub    %eax,%ebx
sub    %eax,%ebx
add    %ebp,%ebx
mov    0xc(%rsp),%edi
add    $0xfffffff8,%edi
call   1040 <fabs@plt>
add    %eax,%ebx
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xe72(%rip),%rdi
mov    %ebx,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E6\82\A8\E7\9A\84\E7\94\9F\E6\97\A5\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [48 x i8] c"\E6\82\A8\E5\87\BA\E7\94\9F\E4\BA\8E%d\E5\B9\B4%d\E6\9C\88%d\E6\97\A5\EF\BC\8C\E6\80\BB\E8\AE\A1\E7\BA\A6\E4\B8\BA%d\E5\A4\A9\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 2014
%10 = call i32 @fabs(i32 %9)
%11 = mul nsw i32 %10, 365
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 12
%14 = call i32 @fabs(i32 %13)
%15 = mul nsw i32 %14, 30
%16 = add nsw i32 %11, %15
%17 = load i32, i32* %4
%18 = sub nsw i32 %17, 8
%19 = call i32 @fabs(i32 %18)
%20 = add nsw i32 %16, %19
store i32 %20, i32* %5
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %21, i32 %22, i32 %23, i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E6\82\A8\E7\9A\84\E7\94\9F\E6\97\A5\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [48 x i8] c"\E6\82\A8\E5\87\BA\E7\94\9F\E4\BA\8E%d\E5\B9\B4%d\E6\9C\88%d\E6\97\A5\EF\BC\8C\E6\80\BB\E8\AE\A1\E7\BA\A6\E4\B8\BA%d\E5\A4\A9\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = add nsw i32 %9, -2014
%11 = call i32 @fabs(i32 %10)
%12 = mul nsw i32 %11, 365
%13 = load i32, i32* %2
%14 = add nsw i32 %13, -12
%15 = call i32 @fabs(i32 %14)
%16 = mul nsw i32 %15, 30
%17 = add nsw i32 %16, %12
%18 = load i32, i32* %3
%19 = add nsw i32 %18, -8
%20 = call i32 @fabs(i32 %19)
%21 = add nsw i32 %17, %20
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %22, i32 %23, i32 %24, i32 %21)
ret i32 0
}