#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*/ cdoWarning(char *, char const *, double);
void par_check_flt_flag(int npar, double *parlist, int *flaglist,
                        const char *txt) {
  for (int i = 0; i < npar; ++i)
    if (flaglist[i] == 0)
      cdoWarning("%s >%g< not found!", txt, parlist[i]);
}


x86 assembly (clang, -O0):
<par_check_flt_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117c <par_check_flt_flag+0x6c>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1169 <par_check_flt_flag+0x59>
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe9c(%rip),%rdi
call   1030 <cdoWarning@plt>
jmp    116e <par_check_flt_flag+0x5e>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112e <par_check_flt_flag+0x1e>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<par_check_flt_flag>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1164 <par_check_flt_flag+0x54>
mov    %rcx,%r14
mov    %rdx,%r13
mov    %rsi,%r15
mov    %edi,%ebx
xor    %ebp,%ebp
lea    0xecd(%rip),%r12
jmp    1149 <par_check_flt_flag+0x39>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1164 <par_check_flt_flag+0x54>
cmpl   $0x0,0x0(%r13,%rbp,4)
jne    1140 <par_check_flt_flag+0x30>
movsd  (%r15,%rbp,8),%xmm0
mov    %r12,%rdi
mov    %r14,%rsi
call   1030 <cdoWarning@plt>
jmp    1140 <par_check_flt_flag+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%s >%g< not found!\00"
define void @par_check_flt_flag(i32 %0, double* %1, i32* %2, i8* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
store i32 %0, i32* %5
store double* %1, double** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
store i32 0, i32* %9
br label %10
10: ; preds = %30, %4
%11 = load i32, i32* %9
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %33
14: ; preds = %10
%15 = load i32*, i32** %7
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %29
21: ; preds = %14
%22 = load i8*, i8** %8
%23 = load double*, double** %6
%24 = load i32, i32* %9
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %23, i64 %25
%27 = load double, double* %26
%28 = call i32 @cdoWarning(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %22, double %27)
br label %29
29: ; preds = %21, %14
br label %30
30: ; preds = %29
%31 = load i32, i32* %9
%32 = add nsw i32 %31, 1
store i32 %32, i32* %9
br label %10
33: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"%s >%g< not found!\00"
define void @par_check_flt_flag(i32 %0, double* nocapture %1, i32* nocapture %2, i8* %3) {
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %9
8: ; preds = %18, %4
ret void
9: ; preds = %6, %18
%10 = phi i64 [ 0, %6 ], [ %19, %18 ]
%11 = getelementptr inbounds i32, i32* %2, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %9
%15 = getelementptr inbounds double, double* %1, i64 %10
%16 = load double, double* %15
%17 = tail call i32 @cdoWarning(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3, double %16)
br label %18
18: ; preds = %9, %14
%19 = add nuw nsw i64 %10, 1
%20 = icmp eq i64 %19, %7
br i1 %20, label %8, label %9
}