#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 */
char *UTIL_itoa(int);
char *UTIL_mallocStr(scalar_t__);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *C_genTySkelArrow(int argPosNum) {
  char *argPos = UTIL_itoa(argPosNum);
  char *mytext = NULL;
  mytext = UTIL_mallocStr(
      strlen("    DF_mkArrowType(tySkelBase, (DF_TypePtr)(tySkelBase + ") +
      strlen(argPos) + strlen(" * DF_TY_ATOMIC_SIZE));\n") +
      strlen("    tySkelBase += DF_TY_ATOMIC_SIZE;\n"));
  strcpy(mytext, "    DF_mkArrowType(tySkelBase, (DF_TypePtr)(tySkelBase + ");
  strcat(mytext, argPos);
  free(argPos);
  strcat(mytext, " * DF_TY_ATOMIC_SIZE));\n");
  strcat(mytext, "    tySkelBase += DF_TY_ATOMIC_SIZE;\n");
  return mytext;
}


x86 assembly (clang, -O0):
<C_genTySkelArrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <UTIL_itoa@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    0xe7a(%rip),%rdi
call   1060 <strlen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
lea    0xe8d(%rip),%rdi
call   1060 <strlen@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
lea    0xe8c(%rip),%rdi
call   1060 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
call   1070 <UTIL_mallocStr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe19(%rip),%rsi
call   1050 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1080 <strcat@plt>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
mov    -0x18(%rbp),%rdi
lea    0xe2d(%rip),%rsi
call   1080 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xe36(%rip),%rsi
call   1080 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_genTySkelArrow>:
push   %r14
push   %rbx
push   %rax
call   1030 <UTIL_itoa@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1060 <strlen@plt>
lea    0x76(%rax),%rdi
call   1070 <UTIL_mallocStr@plt>
mov    %rax,%rbx
lea    0xe79(%rip),%rsi
mov    %rax,%rdi
call   1050 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <strcat@plt>
mov    %r14,%rdi
call   1040 <free@plt>
lea    0xe91(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcat@plt>
lea    0xe9b(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [58 x i8] c" DF_mkArrowType(tySkelBase, (DF_TypePtr)(tySkelBase + \00"
@.str.1 = [25 x i8] c" * DF_TY_ATOMIC_SIZE));\0A\00"
@.str.2 = [38 x i8] c" tySkelBase += DF_TY_ATOMIC_SIZE;\0A\00"
define i8* @C_genTySkelArrow(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i8* @UTIL_itoa(i32 %5)
store i8* %6, i8** %3
store i8* null, i8** %4
%7 = call i64 @strlen(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %7, %9
%11 = call i64 @strlen(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%12 = add nsw i64 %10, %11
%13 = call i64 @strlen(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%14 = add nsw i64 %12, %13
%15 = call i8* @UTIL_mallocStr(i64 %14)
store i8* %15, i8** %4
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%18 = load i8*, i8** %4
%19 = load i8*, i8** %3
%20 = call i32 @strcat(i8* %18, i8* %19)
%21 = load i8*, i8** %3
%22 = call i32 @free(i8* %21)
%23 = load i8*, i8** %4
%24 = call i32 @strcat(i8* %23, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%25 = load i8*, i8** %4
%26 = call i32 @strcat(i8* %25, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%27 = load i8*, i8** %4
ret i8* %27
}

LLVM IR (-O2):
@.str = [58 x i8] c" DF_mkArrowType(tySkelBase, (DF_TypePtr)(tySkelBase + \00"
@.str.1 = [25 x i8] c" * DF_TY_ATOMIC_SIZE));\0A\00"
@.str.2 = [38 x i8] c" tySkelBase += DF_TY_ATOMIC_SIZE;\0A\00"
define i8* @C_genTySkelArrow(i32 %0) {
%2 = tail call i8* @UTIL_itoa(i32 %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%4 = add nsw i64 %3, 118
%5 = tail call i8* @UTIL_mallocStr(i64 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @strcat(i8* %5, i8* %2)
%8 = tail call i32 @free(i8* %2)
%9 = tail call i32 @strcat(i8* %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @strcat(i8* %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
ret i8* %5
}