#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*/ atof(char *);
int /*<<< orphan*/ atoi(char *);
scalar_t__ ck_e(int /*<<< orphan*/);
scalar_t__ ck_f(char *);
scalar_t__ ck_i(int /*<<< orphan*/, int /*<<< orphan*/, int);
scalar_t__ ck_n(int, int);
int ckpa(int argc, char *argv[], int atrn) {
  if (ck_n(argc, 7) && ck_f(argv[2]) &&
      ck_i(atoi(argv[3]), atoi(argv[4]), atrn) && ck_e(atof(argv[5]))) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<ckpa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x7,%esi
call   1040 <ck_n@plt>
cmp    $0x0,%rax
je     11fe <ckpa+0x9e>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <ck_f@plt>
cmp    $0x0,%rax
je     11fe <ckpa+0x9e>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1080 <atoi@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
mov    -0x14(%rbp),%edx
call   1070 <ck_i@plt>
cmp    $0x0,%rax
je     11fe <ckpa+0x9e>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1030 <atof@plt>
mov    %eax,%edi
call   1060 <ck_e@plt>
cmp    $0x0,%rax
je     11fe <ckpa+0x9e>
movl   $0x1,-0x4(%rbp)
jmp    1205 <ckpa+0xa5>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckpa>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    $0x7,%esi
call   1040 <ck_n@plt>
test   %rax,%rax
je     11c9 <ckpa+0x69>
mov    0x10(%rbx),%rdi
call   1050 <ck_f@plt>
test   %rax,%rax
je     11c9 <ckpa+0x69>
mov    0x18(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebp
mov    0x20(%rbx),%rdi
call   1080 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r14d,%edx
call   1070 <ck_i@plt>
test   %rax,%rax
je     11c9 <ckpa+0x69>
mov    0x28(%rbx),%rdi
call   1030 <atof@plt>
mov    %eax,%edi
call   1060 <ck_e@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    11cb <ckpa+0x6b>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ckpa(i32 %0, i8** %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = call i64 @ck_n(i32 %8, i32 7)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %37
11: ; preds = %3
%12 = load i8**, i8*** %6
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = call i64 @ck_f(i8* %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %37
17: ; preds = %11
%18 = load i8**, i8*** %6
%19 = getelementptr inbounds i8*, i8** %18, i64 3
%20 = load i8*, i8** %19
%21 = call i32 @atoi(i8* %20)
%22 = load i8**, i8*** %6
%23 = getelementptr inbounds i8*, i8** %22, i64 4
%24 = load i8*, i8** %23
%25 = call i32 @atoi(i8* %24)
%26 = load i32, i32* %7
%27 = call i64 @ck_i(i32 %21, i32 %25, i32 %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %37
29: ; preds = %17
%30 = load i8**, i8*** %6
%31 = getelementptr inbounds i8*, i8** %30, i64 5
%32 = load i8*, i8** %31
%33 = call i32 @atof(i8* %32)
%34 = call i64 @ck_e(i32 %33)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %29
store i32 1, i32* %4
br label %38
37: ; preds = %29, %17, %11, %3
store i32 0, i32* %4
br label %38
38: ; preds = %37, %36
%39 = load i32, i32* %4
ret i32 %39
}

LLVM IR (-O2):
define i32 @ckpa(i32 %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @ck_n(i32 %0, i32 7)
%5 = icmp eq i64 %4, 0
br i1 %5, label %26, label %6
6: ; preds = %3
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = load i8*, i8** %7
%9 = tail call i64 @ck_f(i8* %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %26, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8*, i8** %1, i64 3
%13 = load i8*, i8** %12
%14 = tail call i32 @atoi(i8* %13)
%15 = getelementptr inbounds i8*, i8** %1, i64 4
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = tail call i64 @ck_i(i32 %14, i32 %17, i32 %2)
%19 = icmp eq i64 %18, 0
br i1 %19, label %26, label %20
20: ; preds = %11
%21 = getelementptr inbounds i8*, i8** %1, i64 5
%22 = load i8*, i8** %21
%23 = tail call i32 @atof(i8* %22)
%24 = tail call i64 @ck_e(i32 %23)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %20, %11, %6, %3
br label %27
27: ; preds = %20, %26
%28 = phi i32 [ 0, %26 ], [ 1, %20 ]
ret i32 %28
}