#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 *optstrtyp(int);
char *optquotedstrtyp(int i) {
  char *s, *ss;
  ss = s = optstrtyp(i);
  while (*s) {
    if (*s == '<') {
      *s = '\"';
      ++s;
    } else if (*s == '>') {
      *s = '\"';
      ++s;
      *s = '\0';
    } else
      ++s;
  }
  return ss;
}


x86 assembly (clang, -O0):
<optquotedstrtyp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <optstrtyp@plt>
mov    %rax,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     11a5 <optquotedstrtyp+0x95>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3c,%eax
jne    1160 <optquotedstrtyp+0x50>
mov    -0x10(%rbp),%rax
movb   $0x22,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11a0 <optquotedstrtyp+0x90>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
jne    118f <optquotedstrtyp+0x7f>
mov    -0x10(%rbp),%rax
movb   $0x22,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    119b <optquotedstrtyp+0x8b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11a0 <optquotedstrtyp+0x90>
jmp    112b <optquotedstrtyp+0x1b>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<optquotedstrtyp>:
push   %rax
call   1030 <optstrtyp@plt>
mov    %rax,%rcx
jmp    1129 <optquotedstrtyp+0x19>
nopl   0x0(%rax,%rax,1)
movw   $0x22,(%rcx)
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x3c,%dl
je     1140 <optquotedstrtyp+0x30>
cmp    $0x3e,%dl
je     1120 <optquotedstrtyp+0x10>
test   %dl,%dl
jne    1125 <optquotedstrtyp+0x15>
jmp    1149 <optquotedstrtyp+0x39>
nopl   0x0(%rax)
movb   $0x22,(%rcx)
add    $0x1,%rcx
jmp    1129 <optquotedstrtyp+0x19>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @optquotedstrtyp(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i8* @optstrtyp(i32 %5)
store i8* %6, i8** %3
store i8* %6, i8** %4
br label %7
7: ; preds = %34, %1
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %35
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 60
br i1 %15, label %16, label %20
16: ; preds = %11
%17 = load i8*, i8** %3
store i8 34, i8* %17
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
br label %34
20: ; preds = %11
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 62
br i1 %24, label %25, label %30
25: ; preds = %20
%26 = load i8*, i8** %3
store i8 34, i8* %26
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %3
%29 = load i8*, i8** %3
store i8 0, i8* %29
br label %33
30: ; preds = %20
%31 = load i8*, i8** %3
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %3
br label %33
33: ; preds = %30, %25
br label %34
34: ; preds = %33, %16
br label %7
35: ; preds = %7
%36 = load i8*, i8** %4
ret i8* %36
}

LLVM IR (-O2):
define i8* @optquotedstrtyp(i32 %0) {
%2 = tail call i8* @optstrtyp(i32 %0)
br label %3
3: ; preds = %10, %1
%4 = phi i8* [ %2, %1 ], [ %11, %10 ]
%5 = load i8, i8* %4
switch i8 %5, label %12 [
i8 0, label %14
i8 60, label %6
i8 62, label %8
]
6: ; preds = %3
store i8 34, i8* %4
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %10
8: ; preds = %3
store i8 34, i8* %4
%9 = getelementptr inbounds i8, i8* %4, i64 1
store i8 0, i8* %9
br label %10
10: ; preds = %8, %12, %6
%11 = phi i8* [ %7, %6 ], [ %9, %8 ], [ %13, %12 ]
br label %3
12: ; preds = %3
%13 = getelementptr inbounds i8, i8* %4, i64 1
br label %10
14: ; preds = %3
ret i8* %2
}