#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 ledge(void) {
  niceprint(
      "The characters must walk along an 18\"-wide ledge that skirts a ravine. "
      "The party's travel pace for the day is slowed by half, "
      "and each character must succeed on a DC 10 Dexterity saving throw to "
      "avoid a fall. Precautions such as roping everyone together let each "
      "character make the save with advantage. Increase the pursuit leve of "
      "the "
      "drow by 1.\n\n");
  printf("Ravine Depth: %d feet\n\n", 10 * (d(6) + d(6)));
}


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

x86 assembly (clang, -O2):
<ledge>:
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    %ebx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%esi
lea    0xffc(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [349 x i8] c"The characters must walk along an 18\22-wide ledge that skirts a ravine. The party's travel pace for the day is slowed by half, and each character must succeed on a DC 10 Dexterity saving throw to avoid a fall. Precautions such as roping everyone together let each character make the save with advantage. Increase the pursuit leve of the drow by 1.\0A\0A\00"
@.str.1 = [24 x i8] c"Ravine Depth: %d feet\0A\0A\00"
define void @ledge() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([349 x i8], [349 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 = mul nsw i32 10, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [349 x i8] c"The characters must walk along an 18\22-wide ledge that skirts a ravine. The party's travel pace for the day is slowed by half, and each character must succeed on a DC 10 Dexterity saving throw to avoid a fall. Precautions such as roping everyone together let each character make the save with advantage. Increase the pursuit leve of the drow by 1.\0A\0A\00"
@.str.1 = [24 x i8] c"Ravine Depth: %d feet\0A\0A\00"
define void @ledge() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([349 x i8], [349 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 = mul nsw i32 %4, 10
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}