#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*/ html_tabledata(int, int, int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ html_tableopenrow(int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
void writedate(char *descrip, int y, int m, int d) {
  char buf[64];
  sprintf(buf, "%02d/%02d/%02d", d, m, y);
  html_tableopenrow((0));
  html_tabledata((2), 1, 1, 0, descrip);
  html_tabledata((3), 1, 1, 0, buf);
  html_tabledata((2), 1, 1, 0, "dd/mm/yyyy");
}


x86 assembly (clang, -O0):
<writedate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%r8d
lea    0xea6(%rip),%rsi
call   1050 <sprintf@plt>
xor    %edi,%edi
call   1030 <html_tableopenrow@plt>
mov    -0x8(%rbp),%r8
mov    $0x2,%edi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%esi
call   1040 <html_tabledata@plt>
lea    -0x60(%rbp),%r8
mov    $0x3,%edi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%esi
call   1040 <html_tabledata@plt>
mov    $0x2,%edi
mov    $0x1,%edx
xor    %ecx,%ecx
lea    0xe68(%rip),%r8
mov    %edx,%esi
call   1040 <html_tabledata@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writedate>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %edx,%eax
mov    %esi,%r8d
mov    %rdi,%rbx
lea    0xeba(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %ecx,%edx
mov    %eax,%ecx
call   1050 <sprintf@plt>
xor    %edi,%edi
call   1030 <html_tableopenrow@plt>
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
call   1040 <html_tabledata@plt>
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %r14,%r8
call   1040 <html_tabledata@plt>
lea    0xe7a(%rip),%r8
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1040 <html_tabledata@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%02d/%02d/%02d\00"
@.str.1 = [11 x i8] c"dd/mm/yyyy\00"
define void @writedate(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [64 x i8]
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%11 = load i32, i32* %8
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13)
%15 = call i32 @html_tableopenrow(i32 0)
%16 = load i8*, i8** %5
%17 = call i32 @html_tabledata(i32 2, i32 1, i32 1, i32 0, i8* %16)
%18 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%19 = call i32 @html_tabledata(i32 3, i32 1, i32 1, i32 0, i8* %18)
%20 = call i32 @html_tabledata(i32 2, i32 1, i32 1, i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%02d/%02d/%02d\00"
@.str.1 = [11 x i8] c"dd/mm/yyyy\00"
define void @writedate(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [64 x i8]
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %2, i32 %1)
%8 = tail call i32 @html_tableopenrow(i32 0)
%9 = tail call i32 @html_tabledata(i32 2, i32 1, i32 1, i32 0, i8* %0)
%10 = call i32 @html_tabledata(i32 3, i32 1, i32 1, i32 0, i8* %6)
%11 = call i32 @html_tabledata(i32 2, i32 1, i32 1, i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}