#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 d(int);
int /*<<< orphan*/ niceprint(char *);
int /*<<< orphan*/ printf(char *, int);
void crystal(void) {
  niceprint(
      "The adventurers pass through a faerzress-suffused area containing fist-"
      "sized chunks of quartz that shed dim light in a 10' radius. A sharp "
      "blow to one of the crystals, including throwing it so it impacts a hard "
      "surface, causes it to burst in a 10' radius flash of blinding light. "
      "Any creature within the radius must succeed on a DC 10 Constitution "
      "saving throw or be blinded for 1 minute. A creature blinded by this "
      "effect "
      "repeats the Constitution saving throw at the end of each of its turns. "
      "On a successful save, it is no longer blinded. The characters can "
      "harvest the crystals, but taking the time to do so increases "
      "the drow pursuit level by 1.\n\n");
  printf("%d can be harvested\n\n", d(4) + d(4) + d(4));
}


x86 assembly (clang, -O0):
<crystal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1050 <niceprint@plt>
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    -0x4(%rbp),%esi
add    %eax,%esi
lea    0x1111(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crystal>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <niceprint@plt>
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,%ebx
mov    $0x4,%edi
call   1030 <d@plt>
add    %eax,%ebx
mov    $0x4,%edi
call   1030 <d@plt>
add    %eax,%ebx
lea    0x1124(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [652 x i8] c"The adventurers pass through a faerzress-suffused area containing fist-sized chunks of quartz that shed dim light in a 10' radius. A sharp blow to one of the crystals, including throwing it so it impacts a hard surface, causes it to burst in a 10' radius flash of blinding light. Any creature within the radius must succeed on a DC 10 Constitution saving throw or be blinded for 1 minute. A creature blinded by this effect repeats the Constitution saving throw at the end of each of its turns. On a successful save, it is no longer blinded. The characters can harvest the crystals, but taking the time to do so increases the drow pursuit level by 1.\0A\0A\00"
@.str.1 = [22 x i8] c"%d can be harvested\0A\0A\00"
define void @crystal() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([652 x i8], [652 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @d(i32 4)
%3 = call i32 @d(i32 4)
%4 = add nsw i32 %2, %3
%5 = call i32 @d(i32 4)
%6 = add nsw i32 %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [652 x i8] c"The adventurers pass through a faerzress-suffused area containing fist-sized chunks of quartz that shed dim light in a 10' radius. A sharp blow to one of the crystals, including throwing it so it impacts a hard surface, causes it to burst in a 10' radius flash of blinding light. Any creature within the radius must succeed on a DC 10 Constitution saving throw or be blinded for 1 minute. A creature blinded by this effect repeats the Constitution saving throw at the end of each of its turns. On a successful save, it is no longer blinded. The characters can harvest the crystals, but taking the time to do so increases the drow pursuit level by 1.\0A\0A\00"
@.str.1 = [22 x i8] c"%d can be harvested\0A\0A\00"
define void @crystal() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([652 x i8], [652 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @d(i32 4)
%3 = tail call i32 @d(i32 4)
%4 = add nsw i32 %3, %2
%5 = tail call i32 @d(i32 4)
%6 = add nsw i32 %4, %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}