#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*/ ConvertString(char *);
char *getBraceParam();
int /*<<< orphan*/ safe_free(char *);
char *strdup_together3(char *, char *, char *);
scalar_t__ strlen(char *);
void ConvertBraceParam(char *pre, char *post) {
  char *s = NULL;
  char *t = NULL;
  s = getBraceParam();
  if (strlen(s) > 0) {
    t = strdup_together3(pre, s, post);
    ConvertString(t);
    safe_free(t);
  }
  safe_free(s);
}


x86 assembly (clang, -O0):
<ConvertBraceParam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    $0x0,%al
call   1040 <getBraceParam@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    11b5 <ConvertBraceParam+0x65>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1050 <strdup_together3@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <ConvertString@plt>
mov    -0x20(%rbp),%rdi
call   1070 <safe_free@plt>
mov    -0x18(%rbp),%rdi
call   1070 <safe_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertBraceParam>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %eax,%eax
call   1040 <getBraceParam@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
test   %rax,%rax
jle    1193 <ConvertBraceParam+0x43>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <strdup_together3@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1060 <ConvertString@plt>
mov    %r14,%rdi
call   1070 <safe_free@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1070 <safe_free@plt>

LLVM IR (-O0):
define void @ConvertBraceParam(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* null, i8** %5
store i8* null, i8** %6
%7 = call i8* (...) @getBraceParam()
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i64 @strlen(i8* %8)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = load i8*, i8** %5
%14 = load i8*, i8** %4
%15 = call i8* @strdup_together3(i8* %12, i8* %13, i8* %14)
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = call i32 @ConvertString(i8* %16)
%18 = load i8*, i8** %6
%19 = call i32 @safe_free(i8* %18)
br label %20
20: ; preds = %11, %2
%21 = load i8*, i8** %5
%22 = call i32 @safe_free(i8* %21)
ret void
}

LLVM IR (-O2):
define void @ConvertBraceParam(i8* %0, i8* %1) {
%3 = tail call i8* (...) @getBraceParam()
%4 = tail call i64 @strlen(i8* dereferenceable(1) %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i8* @strdup_together3(i8* %0, i8* %3, i8* %1)
%8 = tail call i32 @ConvertString(i8* %7)
%9 = tail call i32 @safe_free(i8* %7)
br label %10
10: ; preds = %6, %2
%11 = tail call i32 @safe_free(i8* %3)
ret void
}