#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*/ dispDebug(char const *, int, char *);
int /*<<< orphan*/ dispError(char const *, char *);
int /*<<< orphan*/ sendString(char const *, char *, char *);
int strlen(char *);
void sendCGSComment(const char *fct, char *comment) {
  dispDebug(fct, 2, "Try to send a comment");
  if (strlen(comment) > 100)
    dispError(fct, "The Comment is more than 100 characters.");
  sendString(fct, "SEND_COMMENT %s", comment);
}


x86 assembly (clang, -O0):
<sendCGSComment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
lea    0xea0(%rip),%rdx
call   1040 <dispDebug@plt>
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x64,%eax
jle    1187 <sendCGSComment+0x47>
mov    -0x8(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1060 <dispError@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xea9(%rip),%rsi
call   1030 <sendString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendCGSComment>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeaf(%rip),%rdx
mov    $0x2,%esi
call   1040 <dispDebug@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
cmp    $0x65,%eax
jl     1177 <sendCGSComment+0x37>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
call   1060 <dispError@plt>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sendString@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Try to send a comment\00"
@.str.1 = [41 x i8] c"The Comment is more than 100 characters.\00"
@.str.2 = [16 x i8] c"SEND_COMMENT %s\00"
define void @sendCGSComment(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @dispDebug(i8* %5, i32 2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = icmp sgt i32 %8, 100
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @dispError(i8* %11, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %10, %2
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = call i32 @sendString(i8* %14, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Try to send a comment\00"
@.str.1 = [41 x i8] c"The Comment is more than 100 characters.\00"
@.str.2 = [16 x i8] c"SEND_COMMENT %s\00"
define void @sendCGSComment(i8* %0, i8* %1) {
%3 = tail call i32 @dispDebug(i8* %0, i32 2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp sgt i32 %4, 100
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @dispError(i8* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
%9 = tail call i32 @sendString(i8* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %1)
ret void
}