void something(x, y, lev) int x, y, lev;
{
  int j, i;
  if (lev < 0 || lev > (16 + 5 - 1))
    return;
  if (((int)(lrand48() % (101)) + 1) < 8)
    something(x, y, lev);
  j = newobject(lev, &i);
  createitem(x, y, j, (long)i);
}


x86 assembly (clang, -O0):
<something>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1165 <something+0x25>
cmpl   $0x14,-0xc(%rbp)
jle    116a <something+0x2a>
jmp    11b8 <something+0x78>
mov    $0x0,%al
call   1060 <lrand48@plt>
mov    $0x65,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
cmp    $0x8,%edx
jge    1193 <something+0x53>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <something@plt>
mov    -0xc(%rbp),%edi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <newobject@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
movslq -0x14(%rbp),%rcx
mov    $0x0,%al
call   1050 <createitem@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<something>:
cmp    $0x14,%edx
ja     11b0 <something+0x70>
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %eax,%eax
call   1060 <lrand48@plt>
cltq
imul   $0x288df0cb,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x65,%ecx,%ecx
sub    %ecx,%eax
cmp    $0x6,%eax
jg     1187 <something+0x47>
mov    %ebp,%edi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <something@plt>
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <newobject@plt>
movslq 0xc(%rsp),%rcx
mov    %ebp,%edi
mov    %r14d,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <createitem@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @something(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 20
br i1 %13, label %14, label %15
14: ; preds = %11, %3
br label %33
15: ; preds = %11
%16 = call i32 (...) @lrand48()
%17 = srem i32 %16, 101
%18 = add nsw i32 %17, 1
%19 = icmp slt i32 %18, 8
br i1 %19, label %20, label %24
20: ; preds = %15
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = load i32, i32* %6
br label %24
24: ; preds = %20, %15
%25 = load i32, i32* %6
%26 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @newobject to i32 (i32, i32*, ...)*)(i32 %25, i32* %8)
store i32 %26, i32* %7
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = load i32, i32* %7
%30 = load i32, i32* %8
%31 = sext i32 %30 to i64
%32 = call i32 (i32, i32, i32, i64, ...) bitcast (i32 (...)* @createitem to i32 (i32, i32, i32, i64, ...)*)(i32 %27, i32 %28, i32 %29, i64 %31)
br label %33
33: ; preds = %24, %14
ret void
}

LLVM IR (-O2):
define void @something(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = icmp ugt i32 %2, 20
br i1 %6, label %17, label %7
7: ; preds = %3
%8 = tail call i32 (...) @lrand48()
%9 = srem i32 %8, 101
%10 = icmp slt i32 %9, 7
br i1 %10, label %11, label %12
11: ; preds = %7
tail call void @something(i32 %0, i32 %1, i32 %2)
br label %12
12: ; preds = %11, %7
%13 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @newobject to i32 (i32, i32*, ...)*)(i32 %2, i32* %4)
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = call i32 (i32, i32, i32, i64, ...) bitcast (i32 (...)* @createitem to i32 (i32, i32, i32, i64, ...)*)(i32 %0, i32 %1, i32 %13, i64 %15)
br label %17
17: ; preds = %3, %12
ret void
}