#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 */
unsigned long pindex(int, int, int, int, int, int, int);
void zero_pixel_in_all_slices(int i, int j, int indz, int slicemode, int extx,
                              int exty, int extz, int rangec, double *pphi) {
  unsigned long ind1;
  for (indz = 0; indz < rangec; ++indz) {
    ind1 = pindex(slicemode, i, j, indz, extx, exty, extz);
    *(pphi + ind1) = 0.0;
  }
}


x86 assembly (clang, -O0):
<zero_pixel_in_all_slices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    118a <zero_pixel_in_all_slices+0x7a>
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <pindex@plt>
mov    %rax,-0x20(%rbp)
mov    0x20(%rbp),%rax
mov    -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <zero_pixel_in_all_slices+0x2d>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_pixel_in_all_slices>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x48(%rsp),%eax
test   %eax,%eax
jle    1174 <zero_pixel_in_all_slices+0x64>
mov    %r9d,%r15d
mov    %r8d,%r12d
mov    %ecx,%r13d
mov    %esi,%ebx
mov    %edi,%r14d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x40(%rsp),%eax
mov    %eax,(%rsp)
mov    %r13d,%edi
mov    %r14d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %r12d,%r8d
mov    %r15d,%r9d
call   1030 <pindex@plt>
mov    0x50(%rsp),%rdi
movq   $0x0,(%rdi,%rax,8)
mov    0x48(%rsp),%eax
add    $0x1,%ebp
cmp    %ebp,%eax
jne    1140 <zero_pixel_in_all_slices+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @zero_pixel_in_all_slices(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, double* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double*
%19 = alloca i64
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store double* %8, double** %18
store i32 0, i32* %12
br label %20
20: ; preds = %36, %9
%21 = load i32, i32* %12
%22 = load i32, i32* %17
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %39
24: ; preds = %20
%25 = load i32, i32* %13
%26 = load i32, i32* %10
%27 = load i32, i32* %11
%28 = load i32, i32* %12
%29 = load i32, i32* %14
%30 = load i32, i32* %15
%31 = load i32, i32* %16
%32 = call i64 @pindex(i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30, i32 %31)
store i64 %32, i64* %19
%33 = load double*, double** %18
%34 = load i64, i64* %19
%35 = getelementptr inbounds double, double* %33, i64 %34
store double 0.000000e+00, double* %35
br label %36
36: ; preds = %24
%37 = load i32, i32* %12
%38 = add nsw i32 %37, 1
store i32 %38, i32* %12
br label %20
39: ; preds = %20
ret void
}

LLVM IR (-O2):
define void @zero_pixel_in_all_slices(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, double* nocapture writeonly %8) {
%10 = icmp sgt i32 %7, 0
br i1 %10, label %11, label %17
11: ; preds = %9, %11
%12 = phi i32 [ %15, %11 ], [ 0, %9 ]
%13 = tail call i64 @pindex(i32 %3, i32 %0, i32 %1, i32 %12, i32 %4, i32 %5, i32 %6)
%14 = getelementptr inbounds double, double* %8, i64 %13
store double 0.000000e+00, double* %14
%15 = add nuw nsw i32 %12, 1
%16 = icmp eq i32 %15, %7
br i1 %16, label %17, label %11
17: ; preds = %11, %9
ret void
}