#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 */
struct confread_section {
  int dummy;
};

/* Variables and functions */
char *confread_find_value(struct confread_section *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int confread_check_pair(struct confread_section *section, char *key,
                        char *value) {
  char *thisValue = 0;
  if (!section || !key || !value) {
    return 0;
  }
  thisValue = confread_find_value(section, key);
  if (!thisValue) {
    return 0;
  }
  return (!strcmp(value, thisValue));
}


x86 assembly (clang, -O0):
<confread_check_pair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115d <confread_check_pair+0x3d>
cmpq   $0x0,-0x18(%rbp)
je     115d <confread_check_pair+0x3d>
cmpq   $0x0,-0x20(%rbp)
jne    1169 <confread_check_pair+0x49>
movl   $0x0,-0x4(%rbp)
jmp    11ae <confread_check_pair+0x8e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <confread_find_value@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1191 <confread_check_pair+0x71>
movl   $0x0,-0x4(%rbp)
jmp    11ae <confread_check_pair+0x8e>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<confread_check_pair>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
test   %rdi,%rdi
je     1154 <confread_check_pair+0x34>
test   %rsi,%rsi
je     1154 <confread_check_pair+0x34>
mov    %rdx,%r14
test   %rdx,%rdx
je     1154 <confread_check_pair+0x34>
call   1040 <confread_find_value@plt>
test   %rax,%rax
je     1154 <confread_check_pair+0x34>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.confread_section = type { i32 }
define i32 @confread_check_pair(%struct.confread_section* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.confread_section*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.confread_section* %0, %struct.confread_section** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* null, i8** %8
%9 = load %struct.confread_section*, %struct.confread_section** %5
%10 = icmp ne %struct.confread_section* %9, null
br i1 %10, label %11, label %17
11: ; preds = %3
%12 = load i8*, i8** %6
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i8*, i8** %7
%16 = icmp ne i8* %15, null
br i1 %16, label %18, label %17
17: ; preds = %14, %11, %3
store i32 0, i32* %4
br label %32
18: ; preds = %14
%19 = load %struct.confread_section*, %struct.confread_section** %5
%20 = load i8*, i8** %6
%21 = call i8* @confread_find_value(%struct.confread_section* %19, i8* %20)
store i8* %21, i8** %8
%22 = load i8*, i8** %8
%23 = icmp ne i8* %22, null
br i1 %23, label %25, label %24
24: ; preds = %18
store i32 0, i32* %4
br label %32
25: ; preds = %18
%26 = load i8*, i8** %7
%27 = load i8*, i8** %8
%28 = call i32 @strcmp(i8* %26, i8* %27)
%29 = icmp ne i32 %28, 0
%30 = xor i1 %29, true
%31 = zext i1 %30 to i32
store i32 %31, i32* %4
br label %32
32: ; preds = %25, %24, %17
%33 = load i32, i32* %4
ret i32 %33
}

LLVM IR (-O2):
%struct.confread_section = type { i32 }
define i32 @confread_check_pair(%struct.confread_section* %0, i8* %1, i8* %2) {
%4 = icmp ne %struct.confread_section* %0, null
%5 = icmp ne i8* %1, null
%6 = and i1 %4, %5
%7 = icmp ne i8* %2, null
%8 = and i1 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = tail call i8* @confread_find_value(%struct.confread_section* %0, i8* %1)
%11 = icmp eq i8* %10, null
br i1 %11, label %16, label %12
12: ; preds = %9
%13 = tail call i32 @strcmp(i8* %2, i8* %10)
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %9, %3, %12
%17 = phi i32 [ %15, %12 ], [ 0, %3 ], [ 0, %9 ]
ret i32 %17
}