#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*/ strlen(char *);
int /*<<< orphan*/ transfer_to_pdu(unsigned char, char *, char *, int *,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ transfer_to_string(char *, char **, char *);
void transfer_to_pdu_and_string(unsigned char subtype, char *TLVdescription,
                                char **combinedString, char *source,
                                char *combinedBeacon, int *currentByte) {
  transfer_to_pdu(subtype, source, combinedBeacon, currentByte, strlen(source));
  if (!(combinedString == NULL))
    transfer_to_string(TLVdescription, combinedString, source);
}


x86 assembly (clang, -O0):
<transfer_to_pdu_and_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x31(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    %eax,%r8d
mov    -0x31(%rbp),%al
movzbl %al,%edi
call   1040 <transfer_to_pdu@plt>
cmpq   $0x0,-0x18(%rbp)
je     11af <transfer_to_pdu_and_string+0x7f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <transfer_to_string@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_to_pdu_and_string>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r12
mov    %r8,%r13
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %edi,%ebp
mov    %rcx,%rdi
call   1050 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %eax,%r8d
call   1040 <transfer_to_pdu@plt>
test   %r14,%r14
je     1188 <transfer_to_pdu_and_string+0x58>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <transfer_to_string@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @transfer_to_pdu_and_string(i8 zeroext %0, i8* %1, i8** %2, i8* %3, i8* %4, i32* %5) {
%7 = alloca i8
%8 = alloca i8*
%9 = alloca i8**
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32*
store i8 %0, i8* %7
store i8* %1, i8** %8
store i8** %2, i8*** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32* %5, i32** %12
%13 = load i8, i8* %7
%14 = load i8*, i8** %10
%15 = load i8*, i8** %11
%16 = load i32*, i32** %12
%17 = load i8*, i8** %10
%18 = call i32 @strlen(i8* %17)
%19 = call i32 @transfer_to_pdu(i8 zeroext %13, i8* %14, i8* %15, i32* %16, i32 %18)
%20 = load i8**, i8*** %9
%21 = icmp eq i8** %20, null
br i1 %21, label %27, label %22
22: ; preds = %6
%23 = load i8*, i8** %8
%24 = load i8**, i8*** %9
%25 = load i8*, i8** %10
%26 = call i32 @transfer_to_string(i8* %23, i8** %24, i8* %25)
br label %27
27: ; preds = %22, %6
ret void
}

LLVM IR (-O2):
define void @transfer_to_pdu_and_string(i8 zeroext %0, i8* %1, i8** %2, i8* %3, i8* %4, i32* %5) {
%7 = tail call i32 @strlen(i8* %3)
%8 = tail call i32 @transfer_to_pdu(i8 zeroext %0, i8* %3, i8* %4, i32* %5, i32 %7)
%9 = icmp eq i8** %2, null
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = tail call i32 @transfer_to_string(i8* %1, i8** %2, i8* %3)
br label %12
12: ; preds = %10, %6
ret void
}