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


x86 assembly (clang, -O0):
<DymosimMessageIntSev_>:
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    $0xb9,%ecx
call   1030 <CopyString@plt>
mov    %eax,-0xf4(%rbp)
movslq -0xf4(%rbp),%rax
lea    -0xf0(%rbp),%rdi
add    %rax,%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xe7b(%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):
<DymosimMessageIntSev_>:
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    $0xb9,%ecx
call   1030 <CopyString@plt>
cltq
lea    (%rsp,%rax,1),%rdi
mov    (%rbx),%edx
lea    0xe9c(%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" %d\00"
define void @DymosimMessageIntSev_(i32 %0, i8* %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca [200 x i8]
%10 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32* %2, i32** %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 185)
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 i32*, i32** %7
%19 = load i32, i32* %18
%20 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %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" %d\00"
define void @DymosimMessageIntSev_(i32 %0, i8* %1, i32* 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 185)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 %8
%10 = load i32, i32* %2
%11 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @DymosimMessageSeverity(i32 %0, i8* %6)
ret void
}