#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 bridge(void) {
  niceprint("A ravine 2d4x10 feet wide and 2d4x10 feet deep cuts across the "
            "party's path, spanned by an old rope bridge. If the characters "
            "cut the bridge after they pass, the drow pursuit level decreases "
            "by 1.\n\n");
  printf("Ravine Width: %d feet\n", 10 * (d(4) + d(4)));
  printf("Ravine Depth: %d feet\n\n", 10 * (d(4) + d(4)));
}


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

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

LLVM IR (-O0):
@.str = [199 x i8] c"A ravine 2d4x10 feet wide and 2d4x10 feet deep cuts across the party's path, spanned by an old rope bridge. If the characters cut the bridge after they pass, the drow pursuit level decreases by 1.\0A\0A\00"
@.str.1 = [23 x i8] c"Ravine Width: %d feet\0A\00"
@.str.2 = [24 x i8] c"Ravine Depth: %d feet\0A\0A\00"
define void @bridge() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([199 x i8], [199 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @d(i32 4)
%3 = call i32 @d(i32 4)
%4 = add nsw i32 %2, %3
%5 = mul nsw i32 10, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 @d(i32 4)
%8 = call i32 @d(i32 4)
%9 = add nsw i32 %7, %8
%10 = mul nsw i32 10, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [199 x i8] c"A ravine 2d4x10 feet wide and 2d4x10 feet deep cuts across the party's path, spanned by an old rope bridge. If the characters cut the bridge after they pass, the drow pursuit level decreases by 1.\0A\0A\00"
@.str.1 = [23 x i8] c"Ravine Width: %d feet\0A\00"
@.str.2 = [24 x i8] c"Ravine Depth: %d feet\0A\0A\00"
define void @bridge() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([199 x i8], [199 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @d(i32 4)
%3 = tail call i32 @d(i32 4)
%4 = add nsw i32 %3, %2
%5 = mul nsw i32 %4, 10
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @d(i32 4)
%8 = tail call i32 @d(i32 4)
%9 = add nsw i32 %8, %7
%10 = mul nsw i32 %9, 10
%11 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret void
}