#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*/ barlgura(int);
unsigned int d(int);
int /*<<< orphan*/ dretch(unsigned int);
int /*<<< orphan*/ niceprint(char *);
int /*<<< orphan*/ shadowdemon(unsigned int);
void warning(void) {
  unsigned d20;
  niceprint(
      "The characters enter a cavern dotted with stalagmites and stalactites. "
      "Those with a passive Wisdom (Perception) score of 11 or higher spot "
      "a sigil carved into one of the stalagmites. The sigil is a drow "
      "warning sign that means \"Deamons ahead!\" Any non-drow creature "
      "that touches the symbol must make a DC 10 Wisdom saving throw. On a "
      "failed save, the character's madness level icnreases by 1.\n\n");
  d20 = d(20);
  if (d20 < 15)
    return;
  if (d20 < 17)
    barlgura(1);
  else if (d20 < 19)
    dretch(d(4) + d(4) + d(4));
  else
    shadowdemon(d(2));
}


x86 assembly (clang, -O0):
<warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xea1(%rip),%rdi
call   1060 <niceprint@plt>
mov    $0x14,%edi
call   1030 <d@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xf,-0x4(%rbp)
jae    1180 <warning+0x30>
jmp    11f3 <warning+0xa3>
cmpl   $0x11,-0x4(%rbp)
jae    1199 <warning+0x49>
mov    $0x1,%edi
call   1040 <barlgura@plt>
jmp    11f3 <warning+0xa3>
cmpl   $0x13,-0x4(%rbp)
jae    11dd <warning+0x8d>
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,-0xc(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    -0x8(%rbp),%edi
add    %eax,%edi
call   1050 <dretch@plt>
jmp    11ee <warning+0x9e>
mov    $0x2,%edi
call   1030 <d@plt>
mov    %eax,%edi
call   1070 <shadowdemon@plt>
jmp    11f3 <warning+0xa3>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warning>:
push   %rbx
lea    0xea8(%rip),%rdi
call   1060 <niceprint@plt>
mov    $0x14,%edi
call   1030 <d@plt>
cmp    $0xf,%eax
jae    116e <warning+0x1e>
pop    %rbx
ret
cmp    $0x10,%eax
ja     117e <warning+0x2e>
mov    $0x1,%edi
pop    %rbx
jmp    1040 <barlgura@plt>
cmp    $0x12,%eax
ja     11af <warning+0x5f>
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
mov    %ebx,%edi
pop    %rbx
jmp    1050 <dretch@plt>
mov    $0x2,%edi
call   1030 <d@plt>
mov    %eax,%edi
pop    %rbx
jmp    1070 <shadowdemon@plt>

LLVM IR (-O0):
@.str = [395 x i8] c"The characters enter a cavern dotted with stalagmites and stalactites. Those with a passive Wisdom (Perception) score of 11 or higher spot a sigil carved into one of the stalagmites. The sigil is a drow warning sign that means \22Deamons ahead!\22 Any non-drow creature that touches the symbol must make a DC 10 Wisdom saving throw. On a failed save, the character's madness level icnreases by 1.\0A\0A\00"
define void @warning() {
%1 = alloca i32
%2 = call i32 @niceprint(i8* getelementptr inbounds ([395 x i8], [395 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @d(i32 20)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp ult i32 %4, 15
br i1 %5, label %6, label %7
6: ; preds = %0
br label %26
7: ; preds = %0
%8 = load i32, i32* %1
%9 = icmp ult i32 %8, 17
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @barlgura(i32 1)
br label %26
12: ; preds = %7
%13 = load i32, i32* %1
%14 = icmp ult i32 %13, 19
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = call i32 @d(i32 4)
%17 = call i32 @d(i32 4)
%18 = add i32 %16, %17
%19 = call i32 @d(i32 4)
%20 = add i32 %18, %19
%21 = call i32 @dretch(i32 %20)
br label %25
22: ; preds = %12
%23 = call i32 @d(i32 2)
%24 = call i32 @shadowdemon(i32 %23)
br label %25
25: ; preds = %22, %15
br label %26
26: ; preds = %6, %25, %10
ret void
}

LLVM IR (-O2):
@.str = [395 x i8] c"The characters enter a cavern dotted with stalagmites and stalactites. Those with a passive Wisdom (Perception) score of 11 or higher spot a sigil carved into one of the stalagmites. The sigil is a drow warning sign that means \22Deamons ahead!\22 Any non-drow creature that touches the symbol must make a DC 10 Wisdom saving throw. On a failed save, the character's madness level icnreases by 1.\0A\0A\00"
define void @warning() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([395 x i8], [395 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @d(i32 20)
%3 = icmp ult i32 %2, 15
br i1 %3, label %20, label %4
4: ; preds = %0
%5 = icmp ult i32 %2, 17
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @barlgura(i32 1)
br label %20
8: ; preds = %4
%9 = icmp ult i32 %2, 19
br i1 %9, label %10, label %17
10: ; preds = %8
%11 = tail call i32 @d(i32 4)
%12 = tail call i32 @d(i32 4)
%13 = add i32 %12, %11
%14 = tail call i32 @d(i32 4)
%15 = add i32 %13, %14
%16 = tail call i32 @dretch(i32 %15)
br label %20
17: ; preds = %8
%18 = tail call i32 @d(i32 2)
%19 = tail call i32 @shadowdemon(i32 %18)
br label %20
20: ; preds = %6, %17, %10, %0
ret void
}