#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*/ ccuEnableSlices(unsigned int const);
void ccuStartSlices(const unsigned int slices) {
  ccuEnableSlices(slices);
  (*((volatile unsigned int *const)((0x40010000 + 0) + 0x30))) = (1 << 0);
  if (slices & (1 << 0)) {
    (*((volatile unsigned int *const)(0x48040000 + 0x100 + 0x0c))) = (1 << 0);
  }
  if (slices & (1 << 1)) {
    (*((volatile unsigned int *const)(0x48040000 + 0x200 + 0x0c))) = (1 << 0);
  }
  if (slices & (1 << 2)) {
    (*((volatile unsigned int *const)(0x48040000 + 0x300 + 0x0c))) = (1 << 0);
  }
  if (slices & (1 << 3)) {
    (*((volatile unsigned int *const)(0x48040000 + 0x400 + 0x0c))) = (1 << 0);
  }
}


x86 assembly (clang, -O0):
<ccuStartSlices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ccuEnableSlices@plt>
mov    $0x40010030,%eax
movl   $0x1,(%rax)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1148 <ccuStartSlices+0x38>
mov    $0x4804010c,%eax
movl   $0x1,(%rax)
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1162 <ccuStartSlices+0x52>
mov    $0x4804020c,%eax
movl   $0x1,(%rax)
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     117c <ccuStartSlices+0x6c>
mov    $0x4804030c,%eax
movl   $0x1,(%rax)
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1196 <ccuStartSlices+0x86>
mov    $0x4804040c,%eax
movl   $0x1,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccuStartSlices>:
push   %rbx
mov    %edi,%ebx
call   1030 <ccuEnableSlices@plt>
movl   $0x1,0x40010030
test   $0x1,%bl
jne    1139 <ccuStartSlices+0x29>
test   $0x2,%bl
jne    1149 <ccuStartSlices+0x39>
test   $0x4,%bl
jne    1159 <ccuStartSlices+0x49>
test   $0x8,%bl
jne    1169 <ccuStartSlices+0x59>
pop    %rbx
ret
movl   $0x1,0x4804010c
test   $0x2,%bl
je     112d <ccuStartSlices+0x1d>
movl   $0x1,0x4804020c
test   $0x4,%bl
je     1132 <ccuStartSlices+0x22>
movl   $0x1,0x4804030c
test   $0x8,%bl
je     1137 <ccuStartSlices+0x27>
movl   $0x1,0x4804040c
pop    %rbx
ret

LLVM IR (-O0):
define void @ccuStartSlices(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ccuEnableSlices(i32 %3)
store volatile i32 1, i32* inttoptr (i64 1073807408 to i32*)
%5 = load i32, i32* %2
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store volatile i32 1, i32* inttoptr (i64 1208221964 to i32*)
br label %9
9: ; preds = %8, %1
%10 = load i32, i32* %2
%11 = and i32 %10, 2
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store volatile i32 1, i32* inttoptr (i64 1208222220 to i32*)
br label %14
14: ; preds = %13, %9
%15 = load i32, i32* %2
%16 = and i32 %15, 4
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %14
store volatile i32 1, i32* inttoptr (i64 1208222476 to i32*)
br label %19
19: ; preds = %18, %14
%20 = load i32, i32* %2
%21 = and i32 %20, 8
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %19
store volatile i32 1, i32* inttoptr (i64 1208222732 to i32*)
br label %24
24: ; preds = %23, %19
ret void
}

LLVM IR (-O2):
define void @ccuStartSlices(i32 %0) {
%2 = tail call i32 @ccuEnableSlices(i32 %0)
store volatile i32 1, i32* inttoptr (i64 1073807408 to i32*)
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
store volatile i32 1, i32* inttoptr (i64 1208221964 to i32*)
br label %6
6: ; preds = %5, %1
%7 = and i32 %0, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %6
store volatile i32 1, i32* inttoptr (i64 1208222220 to i32*)
br label %10
10: ; preds = %9, %6
%11 = and i32 %0, 4
%12 = icmp eq i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %10
store volatile i32 1, i32* inttoptr (i64 1208222476 to i32*)
br label %14
14: ; preds = %13, %10
%15 = and i32 %0, 8
%16 = icmp eq i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %14
store volatile i32 1, i32* inttoptr (i64 1208222732 to i32*)
br label %18
18: ; preds = %17, %14
ret void
}