int int_gen_ti_header_c_(char *hdrbuf, int *hdrbufsize, int *itypesize,
                         int *typesize, int *DataHandle, char *Data, int *Count,
                         int *code) {
  int i;
  char *p;
  p = hdrbuf;
  p += sizeof(int);
  bcopy(code, p, sizeof(int));
  p += sizeof(int);
  bcopy(DataHandle, p, sizeof(int));
  p += sizeof(int);
  bcopy(typesize, p, sizeof(int));
  p += sizeof(int);
  bcopy(Count, p, sizeof(int));
  p += sizeof(int);
  bcopy(Data, p, *Count * *typesize);
  p += *Count * *typesize;
  *hdrbufsize = (int)(p - hdrbuf);
  bcopy(hdrbufsize, hdrbuf, sizeof(int));
  return (0);
}


x86 assembly (clang, -O0):
<int_gen_ti_header_c_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x40(%rbp)
mov    0x18(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <bcopy@plt>
mov    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <bcopy@plt>
mov    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <bcopy@plt>
mov    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x40(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <bcopy@plt>
mov    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rax
imul   (%rax),%edx
mov    $0x0,%al
call   1030 <bcopy@plt>
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
imul   (%rax),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <bcopy@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_gen_ti_header_c_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r13
mov    %r8,%rbp
mov    %rcx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x40(%rsp),%r12
mov    0x48(%rsp),%rdi
lea    0x4(%rbx),%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <bcopy@plt>
lea    0x8(%rbx),%rsi
mov    $0x4,%edx
mov    %rbp,%rdi
xor    %eax,%eax
call   1030 <bcopy@plt>
lea    0xc(%rbx),%rsi
mov    $0x4,%edx
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <bcopy@plt>
lea    0x10(%rbx),%rsi
mov    $0x4,%edx
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <bcopy@plt>
lea    0x14(%rbx),%rbp
mov    (%r15),%edx
imul   (%r12),%edx
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1030 <bcopy@plt>
mov    (%r15),%eax
imul   (%r12),%eax
add    %eax,%ebp
sub    %ebx,%ebp
mov    %ebp,(%r14)
mov    $0x4,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <bcopy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @int_gen_ti_header_c_(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i8* %5, i32* %6, i32* %7) {
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32
%18 = alloca i8*
store i8* %0, i8** %9
store i32* %1, i32** %10
store i32* %2, i32** %11
store i32* %3, i32** %12
store i32* %4, i32** %13
store i8* %5, i8** %14
store i32* %6, i32** %15
store i32* %7, i32** %16
%19 = load i8*, i8** %9
store i8* %19, i8** %18
%20 = load i8*, i8** %18
%21 = getelementptr inbounds i8, i8* %20, i64 4
store i8* %21, i8** %18
%22 = load i32*, i32** %16
%23 = load i8*, i8** %18
%24 = call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %22, i8* %23, i64 4)
%25 = load i8*, i8** %18
%26 = getelementptr inbounds i8, i8* %25, i64 4
store i8* %26, i8** %18
%27 = load i32*, i32** %13
%28 = load i8*, i8** %18
%29 = call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %27, i8* %28, i64 4)
%30 = load i8*, i8** %18
%31 = getelementptr inbounds i8, i8* %30, i64 4
store i8* %31, i8** %18
%32 = load i32*, i32** %12
%33 = load i8*, i8** %18
%34 = call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %32, i8* %33, i64 4)
%35 = load i8*, i8** %18
%36 = getelementptr inbounds i8, i8* %35, i64 4
store i8* %36, i8** %18
%37 = load i32*, i32** %15
%38 = load i8*, i8** %18
%39 = call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %37, i8* %38, i64 4)
%40 = load i8*, i8** %18
%41 = getelementptr inbounds i8, i8* %40, i64 4
store i8* %41, i8** %18
%42 = load i8*, i8** %14
%43 = load i8*, i8** %18
%44 = load i32*, i32** %15
%45 = load i32, i32* %44
%46 = load i32*, i32** %12
%47 = load i32, i32* %46
%48 = mul nsw i32 %45, %47
%49 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @bcopy to i32 (i8*, i8*, i32, ...)*)(i8* %42, i8* %43, i32 %48)
%50 = load i32*, i32** %15
%51 = load i32, i32* %50
%52 = load i32*, i32** %12
%53 = load i32, i32* %52
%54 = mul nsw i32 %51, %53
%55 = load i8*, i8** %18
%56 = sext i32 %54 to i64
%57 = getelementptr inbounds i8, i8* %55, i64 %56
store i8* %57, i8** %18
%58 = load i8*, i8** %18
%59 = load i8*, i8** %9
%60 = ptrtoint i8* %58 to i64
%61 = ptrtoint i8* %59 to i64
%62 = sub i64 %60, %61
%63 = trunc i64 %62 to i32
%64 = load i32*, i32** %10
store i32 %63, i32* %64
%65 = load i32*, i32** %10
%66 = load i8*, i8** %9
%67 = call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %65, i8* %66, i64 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @int_gen_ti_header_c_(i8* %0, i32* %1, i32* nocapture readnone %2, i32* %3, i32* %4, i8* %5, i32* %6, i32* %7) {
%9 = getelementptr inbounds i8, i8* %0, i64 4
%10 = tail call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %7, i8* %9, i64 4)
%11 = getelementptr inbounds i8, i8* %0, i64 8
%12 = tail call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %4, i8* %11, i64 4)
%13 = getelementptr inbounds i8, i8* %0, i64 12
%14 = tail call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %3, i8* %13, i64 4)
%15 = getelementptr inbounds i8, i8* %0, i64 16
%16 = tail call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %6, i8* %15, i64 4)
%17 = getelementptr inbounds i8, i8* %0, i64 20
%18 = load i32, i32* %6
%19 = load i32, i32* %3
%20 = mul nsw i32 %19, %18
%21 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @bcopy to i32 (i8*, i8*, i32, ...)*)(i8* %5, i8* %17, i32 %20)
%22 = load i32, i32* %6
%23 = load i32, i32* %3
%24 = mul nsw i32 %23, %22
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %17, i64 %25
%27 = ptrtoint i8* %26 to i64
%28 = ptrtoint i8* %0 to i64
%29 = sub i64 %27, %28
%30 = trunc i64 %29 to i32
store i32 %30, i32* %1
%31 = tail call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @bcopy to i32 (i32*, i8*, i64, ...)*)(i32* %1, i8* %0, i64 4)
ret i32 0
}