#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 setKernelOptionEnable(char const *, int);
bool setMultipleKernelOptionsEnable(const char **filenames, size_t count,
                                    bool enable) {
  bool result = true;
  for (size_t i = 0; i < count; i++) {
    result &= setKernelOptionEnable(filenames[i], enable);
  }
  return result;
}


x86 assembly (clang, -O0):
<setMultipleKernelOptionsEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    116b <setMultipleKernelOptionsEnable+0x5b>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x14(%rbp),%esi
call   1030 <setKernelOptionEnable@plt>
and    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1132 <setMultipleKernelOptionsEnable+0x22>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setMultipleKernelOptionsEnable>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %rsi,%rsi
je     1149 <setMultipleKernelOptionsEnable+0x39>
mov    %edx,%r14d
mov    %rsi,%r12
mov    %rdi,%r15
mov    $0x1,%ebp
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r15,%rbx,8),%rdi
mov    %r14d,%esi
call   1030 <setKernelOptionEnable@plt>
and    %eax,%ebp
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <setMultipleKernelOptionsEnable+0x20>
jmp    114e <setMultipleKernelOptionsEnable+0x3e>
mov    $0x1,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @setMultipleKernelOptionsEnable(i8** %0, i64 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i8** %0, i8*** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
store i32 1, i32* %7
store i64 0, i64* %8
br label %9
9: ; preds = %22, %3
%10 = load i64, i64* %8
%11 = load i64, i64* %5
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %25
13: ; preds = %9
%14 = load i8**, i8*** %4
%15 = load i64, i64* %8
%16 = getelementptr inbounds i8*, i8** %14, i64 %15
%17 = load i8*, i8** %16
%18 = load i32, i32* %6
%19 = call i32 @setKernelOptionEnable(i8* %17, i32 %18)
%20 = load i32, i32* %7
%21 = and i32 %20, %19
store i32 %21, i32* %7
br label %22
22: ; preds = %13
%23 = load i64, i64* %8
%24 = add i64 %23, 1
store i64 %24, i64* %8
br label %9
25: ; preds = %9
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @setMultipleKernelOptionsEnable(i8** nocapture %0, i64 %1, i32 %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %7, %3
%6 = phi i32 [ 1, %3 ], [ %13, %7 ]
ret i32 %6
7: ; preds = %3, %7
%8 = phi i64 [ %14, %7 ], [ 0, %3 ]
%9 = phi i32 [ %13, %7 ], [ 1, %3 ]
%10 = getelementptr inbounds i8*, i8** %0, i64 %8
%11 = load i8*, i8** %10
%12 = tail call i32 @setKernelOptionEnable(i8* %11, i32 %2)
%13 = and i32 %12, %9
%14 = add nuw i64 %8, 1
%15 = icmp eq i64 %14, %1
br i1 %15, label %5, label %7
}