#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 */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ cli_putc(char);
int /*<<< orphan*/ cli_putstr(char const *);
int strlen(char *);
int /*<<< orphan*/ ulltoa(int /*<<< orphan*/, char *, int);
void print_time(const char *s, uint64_t t) {
  char sv[22];
  uint8_t c;
  cli_putstr("\r\n");
  cli_putstr(s);
  ulltoa(t, sv, 10);
  for (c = strlen(sv); c < 11; ++c) {
    cli_putc(' ');
  }
  cli_putstr(sv);
}


x86 assembly (clang, -O0):
<print_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeaa(%rip),%rdi
call   1050 <cli_putstr@plt>
mov    -0x8(%rbp),%rdi
call   1050 <cli_putstr@plt>
mov    -0xc(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0xa,%edx
call   1030 <ulltoa@plt>
lea    -0x30(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xb,-0x34(%rbp)
jge    11a3 <print_time+0x63>
mov    $0x20,%edi
call   1040 <cli_putc@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1181 <print_time+0x41>
lea    -0x30(%rbp),%rdi
call   1050 <cli_putstr@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_time>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xeae(%rip),%rdi
call   1050 <cli_putstr@plt>
mov    %rbx,%rdi
call   1050 <cli_putstr@plt>
mov    %rsp,%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1030 <ulltoa@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cmp    $0xa,%eax
jg     119e <print_time+0x5e>
mov    %eax,%ebx
add    $0xfffffff5,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1040 <cli_putc@plt>
inc    %ebx
jne    1190 <print_time+0x50>
mov    %rsp,%rdi
call   1050 <cli_putstr@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define void @print_time(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [22 x i8]
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 @cli_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %3
%9 = call i32 @cli_putstr(i8* %8)
%10 = load i32, i32* %4
%11 = getelementptr inbounds [22 x i8], [22 x i8]* %5, i64 0, i64 0
%12 = call i32 @ulltoa(i32 %10, i8* %11, i32 10)
%13 = getelementptr inbounds [22 x i8], [22 x i8]* %5, i64 0, i64 0
%14 = call i32 @strlen(i8* %13)
store i32 %14, i32* %6
br label %15
15: ; preds = %20, %2
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 11
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = call i32 @cli_putc(i8 signext 32)
br label %20
20: ; preds = %18
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
br label %15
23: ; preds = %15
%24 = getelementptr inbounds [22 x i8], [22 x i8]* %5, i64 0, i64 0
%25 = call i32 @cli_putstr(i8* %24)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define void @print_time(i8* %0, i32 %1) {
%3 = alloca [22 x i8]
%4 = getelementptr inbounds [22 x i8], [22 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @cli_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @cli_putstr(i8* %0)
%7 = call i32 @ulltoa(i32 %1, i8* %4, i32 10)
%8 = call i32 @strlen(i8* %4)
%9 = icmp slt i32 %8, 11
br i1 %9, label %10, label %15
10: ; preds = %2, %10
%11 = phi i32 [ %13, %10 ], [ %8, %2 ]
%12 = call i32 @cli_putc(i8 signext 32)
%13 = add i32 %11, 1
%14 = icmp eq i32 %13, 11
br i1 %14, label %15, label %10
15: ; preds = %10, %2
%16 = call i32 @cli_putstr(i8* %4)
ret void
}