#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 *OC_mkDotStr(char *, char *);
char *UTIL_mallocStr(size_t);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *genTySkelArrow(char *type1, char *type2) {
  char *ctr = OC_mkDotStr("Absyn", "ArrowType");
  size_t length = strlen(ctr) + strlen(type1) + strlen(type2) + 5;
  char *arrowtype = UTIL_mallocStr(length + 1);
  strcpy(arrowtype, ctr);
  free(ctr);
  strcat(arrowtype, "(");
  strcat(arrowtype, type1);
  strcat(arrowtype, ", ");
  strcat(arrowtype, type2);
  strcat(arrowtype, ")");
  return arrowtype;
}


x86 assembly (clang, -O0):
<genTySkelArrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe89(%rip),%rdi
lea    0xe88(%rip),%rsi
call   1080 <OC_mkDotStr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
add    $0x5,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1060 <UTIL_mallocStr@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
lea    0xe1f(%rip),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rdi
lea    0xdea(%rip),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genTySkelArrow>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xe8b(%rip),%rdi
lea    0xe8a(%rip),%rsi
call   1080 <OC_mkDotStr@plt>
mov    %rax,%r12
mov    %rax,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebx
mov    %r15,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    %r14,%rdi
call   1050 <strlen@plt>
add    %ebp,%eax
movslq %eax,%rdi
add    $0x6,%rdi
call   1060 <UTIL_mallocStr@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %r12,%rdi
call   1030 <free@plt>
lea    0xe43(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strcat@plt>
lea    0xe2b(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <strcat@plt>
lea    0xe14(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Absyn\00"
@.str.1 = [10 x i8] c"ArrowType\00"
@.str.2 = [2 x i8] c"(\00"
@.str.3 = [3 x i8] c", \00"
@.str.4 = [2 x i8] c")\00"
define i8* @genTySkelArrow(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = call i8* @OC_mkDotStr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @strlen(i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @strlen(i8* %11)
%13 = add nsw i32 %10, %12
%14 = load i8*, i8** %4
%15 = call i32 @strlen(i8* %14)
%16 = add nsw i32 %13, %15
%17 = add nsw i32 %16, 5
%18 = sext i32 %17 to i64
store i64 %18, i64* %6
%19 = load i64, i64* %6
%20 = add i64 %19, 1
%21 = call i8* @UTIL_mallocStr(i64 %20)
store i8* %21, i8** %7
%22 = load i8*, i8** %7
%23 = load i8*, i8** %5
%24 = call i32 @strcpy(i8* %22, i8* %23)
%25 = load i8*, i8** %5
%26 = call i32 @free(i8* %25)
%27 = load i8*, i8** %7
%28 = call i32 @strcat(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%29 = load i8*, i8** %7
%30 = load i8*, i8** %3
%31 = call i32 @strcat(i8* %29, i8* %30)
%32 = load i8*, i8** %7
%33 = call i32 @strcat(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%34 = load i8*, i8** %7
%35 = load i8*, i8** %4
%36 = call i32 @strcat(i8* %34, i8* %35)
%37 = load i8*, i8** %7
%38 = call i32 @strcat(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%39 = load i8*, i8** %7
ret i8* %39
}

LLVM IR (-O2):
@.str = [6 x i8] c"Absyn\00"
@.str.1 = [10 x i8] c"ArrowType\00"
@.str.2 = [2 x i8] c"(\00"
@.str.3 = [3 x i8] c", \00"
@.str.4 = [2 x i8] c")\00"
define i8* @genTySkelArrow(i8* %0, i8* %1) {
%3 = tail call i8* @OC_mkDotStr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @strlen(i8* %3)
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, %4
%7 = tail call i32 @strlen(i8* %1)
%8 = add nsw i32 %6, %7
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, 6
%11 = tail call i8* @UTIL_mallocStr(i64 %10)
%12 = tail call i32 @strcpy(i8* %11, i8* %3)
%13 = tail call i32 @free(i8* %3)
%14 = tail call i32 @strcat(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = tail call i32 @strcat(i8* %11, i8* %0)
%16 = tail call i32 @strcat(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%17 = tail call i32 @strcat(i8* %11, i8* %1)
%18 = tail call i32 @strcat(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret i8* %11
}