#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*/ ctr_world_light_enqueue(int, int, int, unsigned char);
void ctr_world_light_enqueue_neighbours(int x, int y, int z,
                                        unsigned char light) {
  ctr_world_light_enqueue(x + 1, y, z, light);
  ctr_world_light_enqueue(x - 1, y, z, light);
  ctr_world_light_enqueue(x, y + 1, z, light);
  ctr_world_light_enqueue(x, y - 1, z, light);
  ctr_world_light_enqueue(x, y, z + 1, light);
  ctr_world_light_enqueue(x, y, z - 1, light);
}


x86 assembly (clang, -O0):
<ctr_world_light_enqueue_neighbours>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movzbl -0xd(%rbp),%ecx
call   1030 <ctr_world_light_enqueue@plt>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movzbl -0xd(%rbp),%ecx
call   1030 <ctr_world_light_enqueue@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
movzbl -0xd(%rbp),%ecx
call   1030 <ctr_world_light_enqueue@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    -0xc(%rbp),%edx
movzbl -0xd(%rbp),%ecx
call   1030 <ctr_world_light_enqueue@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movzbl -0xd(%rbp),%ecx
call   1030 <ctr_world_light_enqueue@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
movzbl -0xd(%rbp),%ecx
call   1030 <ctr_world_light_enqueue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctr_world_light_enqueue_neighbours>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %esi,%r15d
mov    %edi,%ebp
lea    0x1(%rbp),%edi
call   1030 <ctr_world_light_enqueue@plt>
lea    -0x1(%rbp),%edi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
call   1030 <ctr_world_light_enqueue@plt>
lea    0x1(%r15),%esi
mov    %ebp,%edi
mov    %ebx,%edx
mov    %r14d,%ecx
call   1030 <ctr_world_light_enqueue@plt>
lea    -0x1(%r15),%esi
mov    %ebp,%edi
mov    %ebx,%edx
mov    %r14d,%ecx
call   1030 <ctr_world_light_enqueue@plt>
lea    0x1(%rbx),%edx
mov    %ebp,%edi
mov    %r15d,%esi
mov    %r14d,%ecx
call   1030 <ctr_world_light_enqueue@plt>
add    $0xffffffff,%ebx
mov    %ebp,%edi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <ctr_world_light_enqueue@plt>

LLVM IR (-O0):
define void @ctr_world_light_enqueue_neighbours(i32 %0, i32 %1, i32 %2, i8 zeroext %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i8, i8* %8
%14 = call i32 @ctr_world_light_enqueue(i32 %10, i32 %11, i32 %12, i8 zeroext %13)
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 1
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = load i8, i8* %8
%20 = call i32 @ctr_world_light_enqueue(i32 %16, i32 %17, i32 %18, i8 zeroext %19)
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
%24 = load i32, i32* %7
%25 = load i8, i8* %8
%26 = call i32 @ctr_world_light_enqueue(i32 %21, i32 %23, i32 %24, i8 zeroext %25)
%27 = load i32, i32* %5
%28 = load i32, i32* %6
%29 = sub nsw i32 %28, 1
%30 = load i32, i32* %7
%31 = load i8, i8* %8
%32 = call i32 @ctr_world_light_enqueue(i32 %27, i32 %29, i32 %30, i8 zeroext %31)
%33 = load i32, i32* %5
%34 = load i32, i32* %6
%35 = load i32, i32* %7
%36 = add nsw i32 %35, 1
%37 = load i8, i8* %8
%38 = call i32 @ctr_world_light_enqueue(i32 %33, i32 %34, i32 %36, i8 zeroext %37)
%39 = load i32, i32* %5
%40 = load i32, i32* %6
%41 = load i32, i32* %7
%42 = sub nsw i32 %41, 1
%43 = load i8, i8* %8
%44 = call i32 @ctr_world_light_enqueue(i32 %39, i32 %40, i32 %42, i8 zeroext %43)
ret void
}

LLVM IR (-O2):
define void @ctr_world_light_enqueue_neighbours(i32 %0, i32 %1, i32 %2, i8 zeroext %3) {
%5 = add nsw i32 %0, 1
%6 = tail call i32 @ctr_world_light_enqueue(i32 %5, i32 %1, i32 %2, i8 zeroext %3)
%7 = add nsw i32 %0, -1
%8 = tail call i32 @ctr_world_light_enqueue(i32 %7, i32 %1, i32 %2, i8 zeroext %3)
%9 = add nsw i32 %1, 1
%10 = tail call i32 @ctr_world_light_enqueue(i32 %0, i32 %9, i32 %2, i8 zeroext %3)
%11 = add nsw i32 %1, -1
%12 = tail call i32 @ctr_world_light_enqueue(i32 %0, i32 %11, i32 %2, i8 zeroext %3)
%13 = add nsw i32 %2, 1
%14 = tail call i32 @ctr_world_light_enqueue(i32 %0, i32 %1, i32 %13, i8 zeroext %3)
%15 = add nsw i32 %2, -1
%16 = tail call i32 @ctr_world_light_enqueue(i32 %0, i32 %1, i32 %15, i8 zeroext %3)
ret void
}