#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 stoneteeth(void) {
  niceprint("If the party is traveling by boat or raft. There is a strong "
            "current and stalagmites "
            "are jutting up from the bottom of a tunnel and are hidden just "
            "below the waterline. "
            "Spotters must succeed on a DC 13 Wisdom (Perception) check to "
            "notice the \"stone teeth\" "
            "allowing the vessel's crew to attempt a DC 12 group Dexterity "
            "check to navigate through "
            "them. If the group check succeeds, the vessel passes through "
            "unscathed. Failure to notice "
            "or navigate through the stone death deals piercing damage to the "
            "boat or raft.\n\n");
  printf("Potential damage taken: %d\n\n",
         d(6) + d(6) + d(6) + d(6) + d(6) + d(6));
}


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

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

LLVM IR (-O0):
@.str = [515 x i8] c"If the party is traveling by boat or raft. There is a strong current and stalagmites are jutting up from the bottom of a tunnel and are hidden just below the waterline. Spotters must succeed on a DC 13 Wisdom (Perception) check to notice the \22stone teeth\22 allowing the vessel's crew to attempt a DC 12 group Dexterity check to navigate through them. If the group check succeeds, the vessel passes through unscathed. Failure to notice or navigate through the stone death deals piercing damage to the boat or raft.\0A\0A\00"
@.str.1 = [29 x i8] c"Potential damage taken: %d\0A\0A\00"
define void @stoneteeth() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([515 x i8], [515 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @d(i32 6)
%3 = call i32 @d(i32 6)
%4 = add nsw i32 %2, %3
%5 = call i32 @d(i32 6)
%6 = add nsw i32 %4, %5
%7 = call i32 @d(i32 6)
%8 = add nsw i32 %6, %7
%9 = call i32 @d(i32 6)
%10 = add nsw i32 %8, %9
%11 = call i32 @d(i32 6)
%12 = add nsw i32 %10, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [515 x i8] c"If the party is traveling by boat or raft. There is a strong current and stalagmites are jutting up from the bottom of a tunnel and are hidden just below the waterline. Spotters must succeed on a DC 13 Wisdom (Perception) check to notice the \22stone teeth\22 allowing the vessel's crew to attempt a DC 12 group Dexterity check to navigate through them. If the group check succeeds, the vessel passes through unscathed. Failure to notice or navigate through the stone death deals piercing damage to the boat or raft.\0A\0A\00"
@.str.1 = [29 x i8] c"Potential damage taken: %d\0A\0A\00"
define void @stoneteeth() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([515 x i8], [515 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @d(i32 6)
%3 = tail call i32 @d(i32 6)
%4 = add nsw i32 %3, %2
%5 = tail call i32 @d(i32 6)
%6 = add nsw i32 %4, %5
%7 = tail call i32 @d(i32 6)
%8 = add nsw i32 %6, %7
%9 = tail call i32 @d(i32 6)
%10 = add nsw i32 %8, %9
%11 = tail call i32 @d(i32 6)
%12 = add nsw i32 %10, %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret void
}