#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*/ setArgumentSeparator(int);
int /*<<< orphan*/ setArgumentUnsignedHex2(int, char *);
int /*<<< orphan*/ setFunction(char *, int, int /*<<< orphan*/);
void serialDebugCharArrayFunctionArgument(char *functionName) {
  setFunction(functionName, 9, 0);
  setArgumentUnsignedHex2(0, "serialPort");
  setArgumentSeparator(1);
  setArgumentUnsignedHex2(2, "char1");
  setArgumentSeparator(3);
  setArgumentUnsignedHex2(4, "char2");
  setArgumentSeparator(5);
  setArgumentUnsignedHex2(6, "char3");
  setArgumentSeparator(7);
  setArgumentUnsignedHex2(8, "char4");
}


x86 assembly (clang, -O0):
<serialDebugCharArrayFunctionArgument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x9,%esi
xor    %edx,%edx
call   1050 <setFunction@plt>
xor    %edi,%edi
lea    0xeab(%rip),%rsi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x1,%edi
call   1030 <setArgumentSeparator@plt>
mov    $0x2,%edi
lea    0xe9b(%rip),%rsi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x3,%edi
call   1030 <setArgumentSeparator@plt>
mov    $0x4,%edi
lea    0xe86(%rip),%rsi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x5,%edi
call   1030 <setArgumentSeparator@plt>
mov    $0x6,%edi
lea    0xe71(%rip),%rsi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x7,%edi
call   1030 <setArgumentSeparator@plt>
mov    $0x8,%edi
lea    0xe5c(%rip),%rsi
call   1040 <setArgumentUnsignedHex2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialDebugCharArrayFunctionArgument>:
push   %rax
mov    $0x9,%esi
xor    %edx,%edx
call   1050 <setFunction@plt>
lea    0xebc(%rip),%rsi
xor    %edi,%edi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x1,%edi
call   1030 <setArgumentSeparator@plt>
lea    0xeaf(%rip),%rsi
mov    $0x2,%edi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x3,%edi
call   1030 <setArgumentSeparator@plt>
lea    0xe9a(%rip),%rsi
mov    $0x4,%edi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x5,%edi
call   1030 <setArgumentSeparator@plt>
lea    0xe85(%rip),%rsi
mov    $0x6,%edi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x7,%edi
call   1030 <setArgumentSeparator@plt>
lea    0xe70(%rip),%rsi
mov    $0x8,%edi
pop    %rax
jmp    1040 <setArgumentUnsignedHex2@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"serialPort\00"
@.str.1 = [6 x i8] c"char1\00"
@.str.2 = [6 x i8] c"char2\00"
@.str.3 = [6 x i8] c"char3\00"
@.str.4 = [6 x i8] c"char4\00"
define void @serialDebugCharArrayFunctionArgument(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @setFunction(i8* %3, i32 9, i32 0)
%5 = call i32 @setArgumentUnsignedHex2(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @setArgumentSeparator(i32 1)
%7 = call i32 @setArgumentUnsignedHex2(i32 2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @setArgumentSeparator(i32 3)
%9 = call i32 @setArgumentUnsignedHex2(i32 4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @setArgumentSeparator(i32 5)
%11 = call i32 @setArgumentUnsignedHex2(i32 6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @setArgumentSeparator(i32 7)
%13 = call i32 @setArgumentUnsignedHex2(i32 8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"serialPort\00"
@.str.1 = [6 x i8] c"char1\00"
@.str.2 = [6 x i8] c"char2\00"
@.str.3 = [6 x i8] c"char3\00"
@.str.4 = [6 x i8] c"char4\00"
define void @serialDebugCharArrayFunctionArgument(i8* %0) {
%2 = tail call i32 @setFunction(i8* %0, i32 9, i32 0)
%3 = tail call i32 @setArgumentUnsignedHex2(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @setArgumentSeparator(i32 1)
%5 = tail call i32 @setArgumentUnsignedHex2(i32 2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @setArgumentSeparator(i32 3)
%7 = tail call i32 @setArgumentUnsignedHex2(i32 4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @setArgumentSeparator(i32 5)
%9 = tail call i32 @setArgumentUnsignedHex2(i32 6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @setArgumentSeparator(i32 7)
%11 = tail call i32 @setArgumentUnsignedHex2(i32 8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret void
}