#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*/ deepgnome(int);
int /*<<< orphan*/ earthelemental(int);
int /*<<< orphan*/ niceprint(char *);
int /*<<< orphan*/ putchar(char);
void gnome(void) {
  niceprint(
      "A female deep gnome named Ariana and her earth elemental bodyguard "
      "approach the party. Ariana aims to "
      "deliver a cargo of gemstones, but she can't find the duergar merchant "
      "she's supposed to meet. She "
      "assumes the characters are smugglers and tries to unload her goods: ten "
      "sparkly garnets worth 100gp "
      "each. Ariana keeps the gems in a bag of holding, which isn't for sale.");
  (void)putchar('\n');
  niceprint("The merchant whom Ariana is looking for was recently arrested and "
            "executed for selling stolen "
            "jewelry. You can decide whether Ariana's interest in the "
            "characters attracts the attention of a "
            "duergar patrol.");
  (void)putchar('\n');
  niceprint("Subsequent occurences of this encounter are with other deep gnome "
            "merchants who ignore the characters "
            "unless approached.  They carry nothing of value");
  (void)putchar('\n');
  deepgnome(1);
  earthelemental(1);
}


x86 assembly (clang, -O0):
<gnome>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1060 <niceprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1012(%rip),%rdi
call   1060 <niceprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10ca(%rip),%rdi
call   1060 <niceprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1050 <deepgnome@plt>
mov    $0x1,%edi
call   1040 <earthelemental@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnome>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1060 <niceprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1015(%rip),%rdi
call   1060 <niceprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10cd(%rip),%rdi
call   1060 <niceprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1050 <deepgnome@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <earthelemental@plt>

LLVM IR (-O0):
@.str = [371 x i8] c"A female deep gnome named Ariana and her earth elemental bodyguard approach the party. Ariana aims to deliver a cargo of gemstones, but she can't find the duergar merchant she's supposed to meet. She assumes the characters are smugglers and tries to unload her goods: ten sparkly garnets worth 100gp each. Ariana keeps the gems in a bag of holding, which isn't for sale.\00"
@.str.1 = [206 x i8] c"The merchant whom Ariana is looking for was recently arrested and executed for selling stolen jewelry. You can decide whether Ariana's interest in the characters attracts the attention of a duergar patrol.\00"
@.str.2 = [150 x i8] c"Subsequent occurences of this encounter are with other deep gnome merchants who ignore the characters unless approached. They carry nothing of value\00"
define void @gnome() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([371 x i8], [371 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @putchar(i8 signext 10)
%3 = call i32 @niceprint(i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @putchar(i8 signext 10)
%5 = call i32 @niceprint(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @putchar(i8 signext 10)
%7 = call i32 @deepgnome(i32 1)
%8 = call i32 @earthelemental(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [371 x i8] c"A female deep gnome named Ariana and her earth elemental bodyguard approach the party. Ariana aims to deliver a cargo of gemstones, but she can't find the duergar merchant she's supposed to meet. She assumes the characters are smugglers and tries to unload her goods: ten sparkly garnets worth 100gp each. Ariana keeps the gems in a bag of holding, which isn't for sale.\00"
@.str.1 = [206 x i8] c"The merchant whom Ariana is looking for was recently arrested and executed for selling stolen jewelry. You can decide whether Ariana's interest in the characters attracts the attention of a duergar patrol.\00"
@.str.2 = [150 x i8] c"Subsequent occurences of this encounter are with other deep gnome merchants who ignore the characters unless approached. They carry nothing of value\00"
define void @gnome() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([371 x i8], [371 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i8 signext 10)
%3 = tail call i32 @niceprint(i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @putchar(i8 signext 10)
%5 = tail call i32 @niceprint(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @putchar(i8 signext 10)
%7 = tail call i32 @deepgnome(i32 1)
%8 = tail call i32 @earthelemental(i32 1)
ret void
}