#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ chk_ret(int /*<<< orphan*/);
char *format_time_str(char *, int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void pulse_data_print_pulse_header(FILE *file) {
  char time_str[32];
  chk_ret(fprintf(file, ";pulse data\n"));
  chk_ret(fprintf(file, ";version 1\n"));
  chk_ret(fprintf(file, ";timescale 1us\n"));
  chk_ret(
      fprintf(file, ";created %s\n", format_time_str(time_str, NULL, 1, 0)));
}


x86 assembly (clang, -O0):
<pulse_data_print_pulse_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    %eax,%edi
call   1050 <chk_ret@plt>
mov    -0x8(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    %eax,%edi
call   1050 <chk_ret@plt>
mov    -0x8(%rbp),%rdi
lea    0xea0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    %eax,%edi
call   1050 <chk_ret@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <format_time_str@plt>
mov    -0x38(%rbp),%rdi
mov    %rax,%rdx
lea    0xe78(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    %eax,%edi
call   1050 <chk_ret@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pulse_data_print_pulse_header>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
lea    0xec1(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %eax,%edi
call   1050 <chk_ret@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %eax,%edi
call   1050 <chk_ret@plt>
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %eax,%edi
call   1050 <chk_ret@plt>
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <format_time_str@plt>
lea    0xe94(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %eax,%edi
call   1050 <chk_ret@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c";pulse data\0A\00"
@.str.1 = [12 x i8] c";version 1\0A\00"
@.str.2 = [16 x i8] c";timescale 1us\0A\00"
@.str.3 = [13 x i8] c";created %s\0A\00"
define void @pulse_data_print_pulse_header(i32* %0) {
%2 = alloca i32*
%3 = alloca [32 x i8]
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 (i32*, i8*, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @chk_ret(i32 %5)
%7 = load i32*, i32** %2
%8 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @chk_ret(i32 %8)
%10 = load i32*, i32** %2
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @chk_ret(i32 %11)
%13 = load i32*, i32** %2
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%15 = call i8* @format_time_str(i8* %14, i32* null, i32 1, i32 0)
%16 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%17 = call i32 @chk_ret(i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c";pulse data\0A\00"
@.str.1 = [12 x i8] c";version 1\0A\00"
@.str.2 = [16 x i8] c";timescale 1us\0A\00"
@.str.3 = [13 x i8] c";created %s\0A\00"
define void @pulse_data_print_pulse_header(i32* nocapture %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @chk_ret(i32 %4)
%6 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @chk_ret(i32 %6)
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @chk_ret(i32 %8)
%10 = call i8* @format_time_str(i8* %3, i32* null, i32 1, i32 0)
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%12 = call i32 @chk_ret(i32 %11)
ret void
}