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


x86 assembly (clang, -O0):
<dymosimmessagedoubleSev_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
lea    -0xf0(%rbp),%rdx
mov    $0xb4,%ecx
call   1030 <CopyString@plt>
mov    %eax,-0xf4(%rbp)
movslq -0xf4(%rbp),%rax
lea    -0xf0(%rbp),%rdi
add    %rax,%rdi
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xe79(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0xf0(%rbp),%rsi
call   1040 <DymosimMessageSeverity@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dymosimmessagedoubleSev_>:
push   %rbp
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%rbx
mov    %edi,%ebp
mov    %rsp,%r14
mov    %rsi,%rdi
mov    %ecx,%esi
mov    %r14,%rdx
mov    $0xb4,%ecx
call   1030 <CopyString@plt>
cltq
lea    (%rsp,%rax,1),%rdi
movsd  (%rbx),%xmm0
lea    0xe9a(%rip),%rsi
call   1050 <sprintf@plt>
mov    %ebp,%edi
mov    %r14,%rsi
call   1040 <DymosimMessageSeverity@plt>
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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