#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 collision(void) {
  niceprint(
      "The vessel the characters are travelling in is caught in a strong "
      "current. Characters must make a DC 13 group Dexterity check to avoid "
      "hitting a wall or other large obstacle directly ahead.  If successful, "
      "the collision is avoided. Otherwise, the vessel takes bludgeoning "
      "damage and everyone must succed on a DC 10 Strength or Dexterity saving"
      "throw to avoid falling overboard.\n\n");
  printf("Potential damage taken: %d\n\n", d(10) + d(10));
}


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

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

LLVM IR (-O0):
@.str = [379 x i8] c"The vessel the characters are travelling in is caught in a strong current. Characters must make a DC 13 group Dexterity check to avoid hitting a wall or other large obstacle directly ahead. If successful, the collision is avoided. Otherwise, the vessel takes bludgeoning damage and everyone must succed on a DC 10 Strength or Dexterity savingthrow to avoid falling overboard.\0A\0A\00"
@.str.1 = [29 x i8] c"Potential damage taken: %d\0A\0A\00"
define void @collision() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([379 x i8], [379 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @d(i32 10)
%3 = call i32 @d(i32 10)
%4 = add nsw i32 %2, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [379 x i8] c"The vessel the characters are travelling in is caught in a strong current. Characters must make a DC 13 group Dexterity check to avoid hitting a wall or other large obstacle directly ahead. If successful, the collision is avoided. Otherwise, the vessel takes bludgeoning damage and everyone must succed on a DC 10 Strength or Dexterity savingthrow to avoid falling overboard.\0A\0A\00"
@.str.1 = [29 x i8] c"Potential damage taken: %d\0A\0A\00"
define void @collision() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([379 x i8], [379 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @d(i32 10)
%3 = tail call i32 @d(i32 10)
%4 = add nsw i32 %3, %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}