#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*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ pad_blanks(char *, int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void hdr_comm(FILE *f, char var[], char comm[]) {
  char line[256];
  strcpy(line, var);
  pad_blanks(line, 8);
  strcat(line, "= '");
  strcat(line, comm);
  pad_blanks(line, 79);
  strcat(line, "'");
  fprintf(f, "%s\n", line);
}


x86 assembly (clang, -O0):
<hdr_comm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x120(%rbp),%rdi
mov    $0x8,%esi
call   1050 <pad_blanks@plt>
lea    -0x120(%rbp),%rdi
lea    0xe7a(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <strcat@plt>
lea    -0x120(%rbp),%rdi
mov    $0x4f,%esi
call   1050 <pad_blanks@plt>
lea    -0x120(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x8(%rbp),%rdi
lea    -0x120(%rbp),%rdx
lea    0xe33(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdr_comm>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rdx,%r15
mov    %rdi,%r14
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1050 <pad_blanks@plt>
lea    0xe8f(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
call   1050 <pad_blanks@plt>
lea    0xe6a(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
lea    0xe5d(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"= '\00"
@.str.1 = [2 x i8] c"'\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @hdr_comm(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [256 x i8]
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%12 = call i32 @pad_blanks(i8* %11, i32 8)
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%14 = call i32 @strcat(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%16 = load i8*, i8** %6
%17 = call i32 @strcat(i8* %15, i8* %16)
%18 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%19 = call i32 @pad_blanks(i8* %18, i32 79)
%20 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%21 = call i32 @strcat(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = load i32*, i32** %4
%23 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%24 = call i32 @fprintf(i32* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %23)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"= '\00"
@.str.1 = [2 x i8] c"'\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @hdr_comm(i32* nocapture %0, i8* %1, i8* %2) {
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%6 = call i32 @strcpy(i8* %5, i8* %1)
%7 = call i32 @pad_blanks(i8* %5, i32 8)
%8 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @strcat(i8* %5, i8* %2)
%10 = call i32 @pad_blanks(i8* %5, i32 79)
%11 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret void
}