#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 */
struct tagStorm {
  int dummy;
};
struct tagStanza {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ safef(char *, int, char *, long long);
int /*<<< orphan*/ tagStanzaAdd(struct tagStorm *, struct tagStanza *, char *,
                                char *);
void tagStanzaAddLongLong(struct tagStorm *tagStorm, struct tagStanza *stanza,
                          char *var, long long val) {
  char buf[32];
  safef(buf, sizeof(buf), "%lld", val);
  tagStanzaAdd(tagStorm, stanza, var, buf);
}


x86 assembly (clang, -O0):
<tagStanzaAddLongLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    $0x20,%esi
lea    0xeb4(%rip),%rdx
call   1040 <safef@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1030 <tagStanzaAdd@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tagStanzaAddLongLong>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xec5(%rip),%rdx
mov    %rsp,%r12
mov    %r12,%rdi
mov    $0x20,%esi
call   1040 <safef@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %r12,%rcx
call   1030 <tagStanzaAdd@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tagStorm = type { i32 }
%struct.tagStanza = type { i32 }
@.str = [5 x i8] c"%lld\00"
define void @tagStanzaAddLongLong(%struct.tagStorm* %0, %struct.tagStanza* %1, i8* %2, i64 %3) {
%5 = alloca %struct.tagStorm*
%6 = alloca %struct.tagStanza*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca [32 x i8]
store %struct.tagStorm* %0, %struct.tagStorm** %5
store %struct.tagStanza* %1, %struct.tagStanza** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%11 = load i64, i64* %8
%12 = call i32 @safef(i8* %10, i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = load %struct.tagStorm*, %struct.tagStorm** %5
%14 = load %struct.tagStanza*, %struct.tagStanza** %6
%15 = load i8*, i8** %7
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%17 = call i32 @tagStanzaAdd(%struct.tagStorm* %13, %struct.tagStanza* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
%struct.tagStorm = type { i32 }
%struct.tagStanza = type { i32 }
@.str = [5 x i8] c"%lld\00"
define void @tagStanzaAddLongLong(%struct.tagStorm* %0, %struct.tagStanza* %1, i8* %2, i64 %3) {
%5 = alloca [32 x i8]
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%7 = call i32 @safef(i8* %6, i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %3)
%8 = call i32 @tagStanzaAdd(%struct.tagStorm* %0, %struct.tagStanza* %1, i8* %2, i8* %6)
ret void
}