#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*/ creature_encounter();
int d(int);
int /*<<< orphan*/ niceprint(char *);
void tightpassage(void) {
  niceprint("An especially tight passage is encountered that requires a "
            "successful DC 12 group Dexterity "
            "check to navigate a boat or raft through it. If the group check "
            "succeeds, the boat slips "
            "through. Otherwise, the boat gets stuck, requiring a successful "
            "DC 14 group Strength "
            "(Athletics) check to push it free.\n\n");
  if (d(2) == 1) {
    niceprint("If they get stuck, while they are trying to free themselves ");
    creature_encounter();
  }
}


x86 assembly (clang, -O0):
<tightpassage>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <niceprint@plt>
mov    $0x2,%edi
call   1030 <d@plt>
cmp    $0x1,%eax
jne    1166 <tightpassage+0x36>
lea    0xfd5(%rip),%rdi
call   1040 <niceprint@plt>
mov    $0x0,%al
call   1050 <creature_encounter@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tightpassage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <niceprint@plt>
mov    $0x2,%edi
call   1030 <d@plt>
cmp    $0x1,%eax
jne    1160 <tightpassage+0x30>
lea    0xfdc(%rip),%rdi
call   1040 <niceprint@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <creature_encounter@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [303 x i8] c"An especially tight passage is encountered that requires a successful DC 12 group Dexterity check to navigate a boat or raft through it. If the group check succeeds, the boat slips through. Otherwise, the boat gets stuck, requiring a successful DC 14 group Strength (Athletics) check to push it free.\0A\0A\00"
@.str.1 = [61 x i8] c"If they get stuck, while they are trying to free themselves \00"
define void @tightpassage() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([303 x i8], [303 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @d(i32 2)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 @niceprint(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @creature_encounter()
br label %7
7: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@.str = [303 x i8] c"An especially tight passage is encountered that requires a successful DC 12 group Dexterity check to navigate a boat or raft through it. If the group check succeeds, the boat slips through. Otherwise, the boat gets stuck, requiring a successful DC 14 group Strength (Athletics) check to push it free.\0A\0A\00"
@.str.1 = [61 x i8] c"If they get stuck, while they are trying to free themselves \00"
define void @tightpassage() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([303 x i8], [303 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @d(i32 2)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i32 @niceprint(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (...) @creature_encounter()
br label %7
7: ; preds = %4, %0
ret void
}