#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*/ imc_fits_mkstrg_val(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
void imc_fits_mkstrg(char *line, char *key, char *strg, char *com) {
  char tmp[2 * 80];
  char tmp2[2 * 80];
  char tmp3[161];
  imc_fits_mkstrg_val(strg, tmp3);
  sprintf(tmp, "%-8.8s= %s ", key, tmp3);
  sprintf(tmp2, "%-30.80s / %-47.47s", tmp, com);
  sprintf(line, "%80.80s", tmp2);
}


x86 assembly (clang, -O0):
<imc_fits_mkstrg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x210(%rbp),%rsi
call   1030 <imc_fits_mkstrg_val@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    -0x210(%rbp),%rcx
lea    0xe9c(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x160(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe88(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x160(%rbp),%rdx
lea    0xe83(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imc_fits_mkstrg>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1f0,%rsp
mov    %rcx,%r15
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x140(%rsp),%r12
mov    %rdx,%rdi
mov    %r12,%rsi
call   1030 <imc_fits_mkstrg_val@plt>
lea    0xead(%rip),%rsi
lea    0xa0(%rsp),%r13
mov    %r13,%rdi
mov    %rbx,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <sprintf@plt>
lea    0xe9a(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <sprintf@plt>
lea    0xe94(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
add    $0x1f0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%-8.8s= %s \00"
@.str.1 = [20 x i8] c"%-30.80s / %-47.47s\00"
@.str.2 = [8 x i8] c"%80.80s\00"
define void @imc_fits_mkstrg(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [160 x i8]
%10 = alloca [160 x i8]
%11 = alloca [161 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%12 = load i8*, i8** %7
%13 = getelementptr inbounds [161 x i8], [161 x i8]* %11, i64 0, i64 0
%14 = call i32 @imc_fits_mkstrg_val(i8* %12, i8* %13)
%15 = getelementptr inbounds [160 x i8], [160 x i8]* %9, i64 0, i64 0
%16 = load i8*, i8** %6
%17 = getelementptr inbounds [161 x i8], [161 x i8]* %11, i64 0, i64 0
%18 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %15, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17)
%19 = getelementptr inbounds [160 x i8], [160 x i8]* %10, i64 0, i64 0
%20 = getelementptr inbounds [160 x i8], [160 x i8]* %9, i64 0, i64 0
%21 = load i8*, i8** %8
%22 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %19, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %20, i8* %21)
%23 = load i8*, i8** %5
%24 = getelementptr inbounds [160 x i8], [160 x i8]* %10, i64 0, i64 0
%25 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %24)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%-8.8s= %s \00"
@.str.1 = [20 x i8] c"%-30.80s / %-47.47s\00"
@.str.2 = [8 x i8] c"%80.80s\00"
define void @imc_fits_mkstrg(i8* nocapture writeonly %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [160 x i8]
%6 = alloca [160 x i8]
%7 = alloca [161 x i8]
%8 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [160 x i8], [160 x i8]* %6, i64 0, i64 0
%10 = getelementptr inbounds [161 x i8], [161 x i8]* %7, i64 0, i64 0
%11 = call i32 @imc_fits_mkstrg_val(i8* %2, i8* %10)
%12 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %10)
%13 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %3)
%14 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret void
}