#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*/ end_module();
int /*<<< orphan*/ fuselage(scalar_t__, scalar_t__, scalar_t__);
int /*<<< orphan*/ module(char *);
int /*<<< orphan*/ outrigger_set(int, int);
scalar_t__ randn(int);
void ship_module(char *modulename) {
  int i;
  module(modulename);
  fuselage(30 + randn(60), randn(10) + 8, randn(10) + 8);
  for (i = 0; i < 3; i++)
    outrigger_set(60, 5);
  end_module();
}


x86 assembly (clang, -O0):
<ship_module>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <module@plt>
mov    $0x3c,%edi
call   1070 <randn@plt>
add    $0x1e,%rax
mov    %rax,-0x20(%rbp)
mov    $0xa,%edi
call   1070 <randn@plt>
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    $0xa,%edi
call   1070 <randn@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x8,%rdx
call   1030 <fuselage@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    11d5 <ship_module+0x85>
mov    $0x3c,%edi
mov    $0x5,%esi
call   1040 <outrigger_set@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ae <ship_module+0x5e>
mov    $0x0,%al
call   1050 <end_module@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ship_module>:
push   %r14
push   %rbx
push   %rax
call   1060 <module@plt>
mov    $0x3c,%edi
call   1070 <randn@plt>
lea    0x1e(%rax),%r14
mov    $0xa,%edi
call   1070 <randn@plt>
lea    0x8(%rax),%rbx
mov    $0xa,%edi
call   1070 <randn@plt>
lea    0x8(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <fuselage@plt>
mov    $0x3c,%edi
mov    $0x5,%esi
call   1040 <outrigger_set@plt>
mov    $0x3c,%edi
mov    $0x5,%esi
call   1040 <outrigger_set@plt>
mov    $0x3c,%edi
mov    $0x5,%esi
call   1040 <outrigger_set@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <end_module@plt>

LLVM IR (-O0):
define void @ship_module(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @module(i8* %4)
%6 = call i64 @randn(i32 60)
%7 = add nsw i64 30, %6
%8 = call i64 @randn(i32 10)
%9 = add nsw i64 %8, 8
%10 = call i64 @randn(i32 10)
%11 = add nsw i64 %10, 8
%12 = call i32 @fuselage(i64 %7, i64 %9, i64 %11)
store i32 0, i32* %3
br label %13
13: ; preds = %18, %1
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 3
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = call i32 @outrigger_set(i32 60, i32 5)
br label %18
18: ; preds = %16
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %13
21: ; preds = %13
%22 = call i32 (...) @end_module()
ret void
}

LLVM IR (-O2):
define void @ship_module(i8* %0) {
%2 = tail call i32 @module(i8* %0)
%3 = tail call i64 @randn(i32 60)
%4 = add nsw i64 %3, 30
%5 = tail call i64 @randn(i32 10)
%6 = add nsw i64 %5, 8
%7 = tail call i64 @randn(i32 10)
%8 = add nsw i64 %7, 8
%9 = tail call i32 @fuselage(i64 %4, i64 %6, i64 %8)
%10 = tail call i32 @outrigger_set(i32 60, i32 5)
%11 = tail call i32 @outrigger_set(i32 60, i32 5)
%12 = tail call i32 @outrigger_set(i32 60, i32 5)
%13 = tail call i32 (...) @end_module()
ret void
}