#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 */
struct cli {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ asprintf(char **, char *, char *);
int /*<<< orphan*/ cli_send(struct cli *, char *, scalar_t__);
int /*<<< orphan*/ free(char *);
scalar_t__ strlen(char *);
int _regular(struct cli *cli, int argc, char *argv[]) {
  {
    char *__tmp;
    asprintf(&__tmp,
             "> "
             "invalid input : %s"
             "\n\r",
             argv[0]);
    cli_send(cli, __tmp, strlen(__tmp) + 1);
    free(__tmp);
  };
  return (0);
}


x86 assembly (clang, -O0):
<_regular>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    -0x20(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1050 <asprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1060 <cli_send@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_regular>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdx),%rdx
lea    0xeaf(%rip),%rsi
mov    %rsp,%rdi
call   1050 <asprintf@plt>
mov    (%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <cli_send@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.cli = type { i32 }
@.str = [23 x i8] c"> invalid input : %s\0A\0D\00"
define i32 @_regular(%struct.cli* %0, i32 %1, i8** %2) {
%4 = alloca %struct.cli*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8*
store %struct.cli* %0, %struct.cli** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @asprintf(i8** %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load %struct.cli*, %struct.cli** %4
%13 = load i8*, i8** %7
%14 = load i8*, i8** %7
%15 = call i64 @strlen(i8* %14)
%16 = add nsw i64 %15, 1
%17 = call i32 @cli_send(%struct.cli* %12, i8* %13, i64 %16)
%18 = load i8*, i8** %7
%19 = call i32 @free(i8* %18)
ret i32 0
}

LLVM IR (-O2):
%struct.cli = type { i32 }
@.str = [23 x i8] c"> invalid input : %s\0A\0D\00"
define i32 @_regular(%struct.cli* %0, i32 %1, i8** nocapture %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = load i8*, i8** %2
%7 = call i32 @asprintf(i8** %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* dereferenceable(1) %8)
%10 = add nsw i64 %9, 1
%11 = call i32 @cli_send(%struct.cli* %0, i8* %8, i64 %10)
%12 = load i8*, i8** %4
%13 = call i32 @free(i8* %12)
ret i32 0
}