#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 CopyString(char const *, int, char *, int);
int /*<<< orphan*/ DymosimMessageSeverity(int, char *);
int sprintf(char *, char *, double const);
void dymosimmessagedouble2Sev_(int severity, const char message[],
                               const double *d, const char message2[], int lstr,
                               int lstr2) {
  char textline[200];
  int ic;
  ic = CopyString(message, lstr, textline, 200 - 20);
  ic = ic + sprintf(&textline[ic], " %G", *d);
  ic = CopyString(message2, lstr2, &textline[ic], 200 - ic);
  DymosimMessageSeverity(severity, textline);
}


x86 assembly (clang, -O0):
<dymosimmessagedouble2Sev_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
lea    -0xf0(%rbp),%rdx
mov    $0xb4,%ecx
call   1030 <CopyString@plt>
mov    %eax,-0xf4(%rbp)
mov    -0xf4(%rbp),%eax
mov    %eax,-0xf8(%rbp)
movslq -0xf4(%rbp),%rax
lea    -0xf0(%rbp),%rdi
add    %rax,%rdi
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xe64(%rip),%rsi
call   1050 <sprintf@plt>
mov    %eax,%ecx
mov    -0xf8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xf4(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%esi
movslq -0xf4(%rbp),%rax
lea    -0xf0(%rbp),%rdx
add    %rax,%rdx
mov    $0xc8,%ecx
sub    -0xf4(%rbp),%ecx
call   1030 <CopyString@plt>
mov    %eax,-0xf4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xf0(%rbp),%rsi
call   1040 <DymosimMessageSeverity@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dymosimmessagedouble2Sev_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9d,%r12d
mov    %rcx,%r13
mov    %rdx,%rbp
mov    %edi,%r15d
mov    %rsp,%r14
mov    %rsi,%rdi
mov    %r8d,%esi
mov    %r14,%rdx
mov    $0xb4,%ecx
call   1030 <CopyString@plt>
movslq %eax,%rbx
lea    (%rsp,%rbx,1),%rdi
movsd  0x0(%rbp),%xmm0
lea    0xe8a(%rip),%rsi
call   1050 <sprintf@plt>
add    %eax,%ebx
movslq %ebx,%rax
lea    (%rsp,%rax,1),%rdx
mov    $0xc8,%ecx
sub    %eax,%ecx
mov    %r13,%rdi
mov    %r12d,%esi
call   1030 <CopyString@plt>
mov    %r15d,%edi
mov    %r14,%rsi
call   1040 <DymosimMessageSeverity@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %G\00"
define void @dymosimmessagedouble2Sev_(i32 %0, i8* %1, double* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca double*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca [200 x i8]
%14 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store double* %2, double** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%15 = load i8*, i8** %8
%16 = load i32, i32* %11
%17 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 0
%18 = call i32 @CopyString(i8* %15, i32 %16, i8* %17, i32 180)
store i32 %18, i32* %14
%19 = load i32, i32* %14
%20 = load i32, i32* %14
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 %21
%23 = load double*, double** %9
%24 = load double, double* %23
%25 = call i32 @sprintf(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %24)
%26 = add nsw i32 %19, %25
store i32 %26, i32* %14
%27 = load i8*, i8** %10
%28 = load i32, i32* %12
%29 = load i32, i32* %14
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 %30
%32 = load i32, i32* %14
%33 = sub nsw i32 200, %32
%34 = call i32 @CopyString(i8* %27, i32 %28, i8* %31, i32 %33)
store i32 %34, i32* %14
%35 = load i32, i32* %7
%36 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 0
%37 = call i32 @DymosimMessageSeverity(i32 %35, i8* %36)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c" %G\00"
define void @dymosimmessagedouble2Sev_(i32 %0, i8* %1, double* nocapture %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca [200 x i8]
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%9 = call i32 @CopyString(i8* %1, i32 %4, i8* %8, i32 180)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 %10
%12 = load double, double* %2
%13 = call i32 @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %12)
%14 = add nsw i32 %13, %9
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 %15
%17 = sub nsw i32 200, %14
%18 = call i32 @CopyString(i8* %3, i32 %5, i8* %16, i32 %17)
%19 = call i32 @DymosimMessageSeverity(i32 %0, i8* %8)
ret void
}