#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*/
_will_assign_memory_for_outbuffer(char const *const, char const *const,
                                  char const *const, int const,
                                  char const *const, scalar_t__, int const);
scalar_t__ strlen(char const *const);
void _will_assign_string(const char *const function,
                         const char *const parameter, const char *const file,
                         const int line, const char *const str,
                         const int count) {
  _will_assign_memory_for_outbuffer(function, parameter, file, line, str,
                                    strlen(str) + 1, count);
}


x86 assembly (clang, -O0):
<_will_assign_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x58(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%r8
mov    %rax,%r9
add    $0x1,%r9
mov    -0x2c(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <_will_assign_memory_for_outbuffer@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_will_assign_string>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r12d
mov    %r8,%rbx
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%rbp
mov    %r8,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%r9
mov    %r12d,(%rsp)
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %rbx,%r8
call   1040 <_will_assign_memory_for_outbuffer@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @_will_assign_string(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i32, i32* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %11
%19 = call i64 @strlen(i8* %18)
%20 = add nsw i64 %19, 1
%21 = load i32, i32* %12
%22 = call i32 @_will_assign_memory_for_outbuffer(i8* %13, i8* %14, i8* %15, i32 %16, i8* %17, i64 %20, i32 %21)
ret void
}

LLVM IR (-O2):
define void @_will_assign_string(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5) {
%7 = tail call i64 @strlen(i8* dereferenceable(1) %4)
%8 = add nsw i64 %7, 1
%9 = tail call i32 @_will_assign_memory_for_outbuffer(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i64 %8, i32 %5)
ret void
}