#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 */
unsigned int d(int);
int /*<<< orphan*/ giantspider(unsigned int);
int /*<<< orphan*/ niceprint(char *);
int /*<<< orphan*/ putchar(char);
void webs(void) {
  unsigned d6;
  niceprint("Sticky webs fill a passage. The webs extend for hundreds of feet. "
            "Unless the characters come up with a plan for clearing the webs "
            "quickly, the party's travel pace for the day is halved as the "
            "characters are forced to cut their way through or find an "
            "alternate route.\n\n");
  d6 = d(6);
  if (d6 < 4)
    return;
  (void)putchar('\n');
  giantspider(d(4));
}


x86 assembly (clang, -O0):
<webs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1050 <niceprint@plt>
mov    $0x6,%edi
call   1040 <d@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jae    1170 <webs+0x30>
jmp    118b <webs+0x4b>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4,%edi
call   1040 <d@plt>
mov    %eax,%edi
call   1060 <giantspider@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<webs>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <niceprint@plt>
mov    $0x6,%edi
call   1040 <d@plt>
cmp    $0x4,%eax
jae    115e <webs+0x1e>
pop    %rax
ret
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4,%edi
call   1040 <d@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <giantspider@plt>

LLVM IR (-O0):
@.str = [269 x i8] c"Sticky webs fill a passage. The webs extend for hundreds of feet. Unless the characters come up with a plan for clearing the webs quickly, the party's travel pace for the day is halved as the characters are forced to cut their way through or find an alternate route.\0A\0A\00"
define void @webs() {
%1 = alloca i32
%2 = call i32 @niceprint(i8* getelementptr inbounds ([269 x i8], [269 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @d(i32 6)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp ult i32 %4, 4
br i1 %5, label %6, label %7
6: ; preds = %0
br label %11
7: ; preds = %0
%8 = call i32 @putchar(i8 signext 10)
%9 = call i32 @d(i32 4)
%10 = call i32 @giantspider(i32 %9)
br label %11
11: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [269 x i8] c"Sticky webs fill a passage. The webs extend for hundreds of feet. Unless the characters come up with a plan for clearing the webs quickly, the party's travel pace for the day is halved as the characters are forced to cut their way through or find an alternate route.\0A\0A\00"
define void @webs() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([269 x i8], [269 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @d(i32 6)
%3 = icmp ult i32 %2, 4
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = tail call i32 @putchar(i8 signext 10)
%6 = tail call i32 @d(i32 4)
%7 = tail call i32 @giantspider(i32 %6)
br label %8
8: ; preds = %0, %4
ret void
}