#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*/ gmvwrite_units_name(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void fgmvwrite_units_name_(char fldname[], char unitname[]) {
  char type1[10], type2[20];
  strncpy(type1, fldname, 8);
  strncpy(type2, unitname, 16);
  *(type1 + 8) = '\0';
  *(type2 + 16) = '\0';
  gmvwrite_units_name(type1, type2);
}


x86 assembly (clang, -O0):
<fgmvwrite_units_name_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x12(%rbp)
movb   $0x0,-0x20(%rbp)
lea    -0x1a(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <gmvwrite_units_name@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_units_name_>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0x6(%rsp),%r14
mov    %r14,%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xe(%rsp)
movb   $0x0,0x20(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <gmvwrite_units_name@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @fgmvwrite_units_name_(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [10 x i8]
%6 = alloca [20 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = call i32 @strncpy(i8* %7, i8* %8, i32 8)
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%11 = load i8*, i8** %4
%12 = call i32 @strncpy(i8* %10, i8* %11, i32 16)
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds i8, i8* %13, i64 8
store i8 0, i8* %14
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds i8, i8* %15, i64 16
store i8 0, i8* %16
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%19 = call i32 @gmvwrite_units_name(i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_units_name_(i8* %0, i8* %1) {
%3 = alloca [10 x i8]
%4 = alloca [20 x i8]
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%7 = call i32 @strncpy(i8* %5, i8* %0, i32 8)
%8 = call i32 @strncpy(i8* %6, i8* %1, i32 16)
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 8
store i8 0, i8* %9
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 16
store i8 0, i8* %10
%11 = call i32 @gmvwrite_units_name(i8* %5, i8* %6)
ret void
}