#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 KeyVal {
  int dummy;
};

/* Variables and functions */
int KeyVal_delete(struct KeyVal *);
int KeyVal_findIdealIndex(unsigned long *, struct KeyVal *, char *);
int KeyVal_findIndex(unsigned long *, struct KeyVal *, char *);
int KeyVal_new(struct KeyVal **);
int KeyVal_setValue(struct KeyVal *, char *, char *);
int /*<<< orphan*/ _check_err(int, char *);
int /*<<< orphan*/ ok(int, char *);
void test7() {
  struct KeyVal *kv;
  _check_err(KeyVal_new(&kv), "KeyVal_new");
  unsigned long index;
  _check_err(KeyVal_findIdealIndex(&index, kv, "a"), "KeyVal_findIdealIndex");
  ok(index == 0, "7a. findIdealIndex ok on empty array");
  ok(KeyVal_findIndex(&index, kv, "a") == 2, "7b. findIndex ok on empty array");
  _check_err(KeyVal_setValue(kv, "2", "asdf"), "KeyVal_setValue");
  _check_err(KeyVal_findIdealIndex(&index, kv, "1"), "KeyVal_findIdealIndex");
  ok(index == 0, "7d. findIdealIndex-1 ok on array1");
  ok(KeyVal_findIndex(&index, kv, "1") == 2, "7e. findIndex-1 ok on array1");
  _check_err(KeyVal_findIdealIndex(&index, kv, "2"), "KeyVal_findIdealIndex");
  ok(index == 0, "7g. findIdealIndex-2 ok on array1");
  _check_err(KeyVal_findIndex(&index, kv, "2"), "KeyVal_findIndex");
  ok(index == 0, "7h. findIndex-2 ok on array1");
  _check_err(KeyVal_findIdealIndex(&index, kv, "3"), "KeyVal_findIdealIndex");
  ok(index == 1, "7j. findIdealIndex-3 ok on array1");
  ok(KeyVal_findIndex(&index, kv, "3") == 2, "7k. findIndex-3 ok on array1");
  _check_err(KeyVal_setValue(kv, "4", "asdf"), "KeyVal_setValue");
  _check_err(KeyVal_findIdealIndex(&index, kv, "1"), "KeyVal_findIdealIndex");
  ok(index == 0, "7m. findIdealIndex-1 ok on array2");
  ok(KeyVal_findIndex(&index, kv, "1") == 2, "7n. findIndex-1 ok on array2");
  _check_err(KeyVal_findIdealIndex(&index, kv, "2"), "KeyVal_findIdealIndex");
  ok(index == 0, "7p. findIdealIndex-2 ok on array2");
  _check_err(KeyVal_findIndex(&index, kv, "2"), "KeyVal_findIndex");
  ok(index == 0, "7q. findIndex-2 ok on array2");
  _check_err(KeyVal_findIdealIndex(&index, kv, "3"), "KeyVal_findIdealIndex");
  ok(index == 1, "7s. findIdealIndex-3 ok on array2");
  ok(KeyVal_findIndex(&index, kv, "3") == 2, "7t. findIndex-3 ok on array2");
  _check_err(KeyVal_findIdealIndex(&index, kv, "4"), "KeyVal_findIdealIndex");
  ok(index == 1, "7v. findIdealIndex-4 ok on array2");
  _check_err(KeyVal_findIndex(&index, kv, "4"), "KeyVal_findIndex");
  ok(index == 1, "7w. findIndex-4 ok on array2");
  _check_err(KeyVal_findIdealIndex(&index, kv, "5"), "KeyVal_findIdealIndex");
  ok(index == 2, "7y. findIdealIndex-5 ok on array2");
  ok(KeyVal_findIndex(&index, kv, "5") == 2, "7z. findIndex-5 ok on array2");
  _check_err(KeyVal_setValue(kv, "6", "asdf"), "KeyVal_setValue");
  _check_err(KeyVal_findIdealIndex(&index, kv, "1"), "KeyVal_findIdealIndex");
  ok(index == 0, "7ab. findIdealIndex-1 ok on array3");
  ok(KeyVal_findIndex(&index, kv, "1") == 2, "7ac. findIndex-1 ok on array3");
  _check_err(KeyVal_findIdealIndex(&index, kv, "2"), "KeyVal_findIdealIndex");
  ok(index == 0, "7ae. findIdealIndex-2 ok on array3");
  _check_err(KeyVal_findIndex(&index, kv, "2"), "KeyVal_findIndex");
  ok(index == 0, "7af. findIndex-2 ok on array3");
  _check_err(KeyVal_findIdealIndex(&index, kv, "3"), "KeyVal_findIdealIndex");
  ok(index == 1, "7ah. findIdealIndex-3 ok on array3");
  ok(KeyVal_findIndex(&index, kv, "3") == 2, "7ai. findIndex-3 ok on array3");
  _check_err(KeyVal_findIdealIndex(&index, kv, "4"), "KeyVal_findIdealIndex");
  ok(index == 1, "7ak. findIdealIndex-4 ok on array3");
  _check_err(KeyVal_findIndex(&index, kv, "4"), "KeyVal_findIndex");
  ok(index == 1, "7al. findIndex-4 ok on array3");
  _check_err(KeyVal_findIdealIndex(&index, kv, "5"), "KeyVal_findIdealIndex");
  ok(index == 2, "7an. findIdealIndex-5 ok on array3");
  ok(KeyVal_findIndex(&index, kv, "5") == 2, "7ao. findIndex-5 ok on array3");
  _check_err(KeyVal_findIdealIndex(&index, kv, "6"), "KeyVal_findIdealIndex");
  ok(index == 2, "7aq. findIdealIndex-6 ok on array3");
  _check_err(KeyVal_findIndex(&index, kv, "6"), "KeyVal_findIndex");
  ok(index == 2, "7ar. findIndex-6 ok on array3");
  _check_err(KeyVal_findIdealIndex(&index, kv, "7"), "KeyVal_findIdealIndex");
  ok(index == 3, "7at. findIdealIndex-7 ok on array3");
  ok(KeyVal_findIndex(&index, kv, "7") == 2, "7au. findIndex-7 ok on array3");
  _check_err(KeyVal_delete(kv), "KeyVal_delete");
}


x86 assembly (clang, -O0):
<test7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1050 <KeyVal_new@plt>
mov    %eax,%edi
lea    0xe76(%rip),%rsi
call   1030 <_check_err@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xe6d(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xe61(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe5e(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xe32(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe58(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rdi
lea    0xf8a(%rip),%rsi
lea    0xe61(%rip),%rdx
call   1060 <KeyVal_setValue@plt>
mov    %eax,%edi
lea    0xe58(%rip),%rsi
call   1030 <_check_err@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xe91(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xdd6(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe2d(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xe56(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe24(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xefb(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xd70(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe06(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xec0(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
lea    0xe06(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xdfe(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xfc6(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xcfa(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xde0(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xf8b(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xdd7(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rdi
lea    0xde4(%rip),%rsi
lea    0xcfa(%rip),%rdx
call   1060 <KeyVal_setValue@plt>
mov    %eax,%edi
lea    0xcf1(%rip),%rsi
call   1030 <_check_err@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xd2a(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xc6f(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd96(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xcef(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd8d(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xd94(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xc09(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd6f(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xd59(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
lea    0xc9f(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd56(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xe5f(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xb93(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd38(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xe24(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd2f(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xc79(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xb2d(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd11(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xc3e(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
lea    0xbc3(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xcf8(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xd01(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xab7(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x2,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xcdc(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xcc6(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xcd3(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rdi
lea    0xce0(%rip),%rsi
lea    0xab7(%rip),%rdx
call   1060 <KeyVal_setValue@plt>
mov    %eax,%edi
lea    0xaae(%rip),%rsi
call   1030 <_check_err@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xae7(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0xa2c(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xc92(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xaac(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xc8a(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xb51(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0x9c6(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xc6d(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xb16(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
lea    0xa5c(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xc55(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xc1c(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0x950(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xc38(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xbe1(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xc30(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xa36(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0x8ea(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xc13(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0x9fb(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
lea    0x980(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xbfb(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xabe(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0x874(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x2,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xbde(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xa83(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xbd6(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xa99(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0x80e(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x2,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xbb9(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xa5e(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
lea    0x8a4(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x2,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xba1(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xbab(%rip),%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
lea    0x798(%rip),%rsi
call   1030 <_check_err@plt>
cmpq   $0x3,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xb86(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
lea    0xb70(%rip),%rdx
call   1090 <KeyVal_findIndex@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xb7e(%rip),%rsi
call   1040 <ok@plt>
mov    -0x8(%rbp),%rdi
call   1080 <KeyVal_delete@plt>
mov    %eax,%edi
lea    0xb85(%rip),%rsi
call   1030 <_check_err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test7>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
call   1050 <KeyVal_new@plt>
lea    0xe71(%rip),%rsi
mov    %eax,%edi
call   1030 <_check_err@plt>
mov    0x8(%rsp),%rsi
lea    0xe69(%rip),%rbp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
lea    0xe54(%rip),%r14
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xe4d(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xe4d(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rdi
lea    0xf7e(%rip),%r15
lea    0xe55(%rip),%rdx
mov    %r15,%rsi
call   1060 <KeyVal_setValue@plt>
lea    0xe4b(%rip),%r13
mov    %eax,%edi
mov    %r13,%rsi
call   1030 <_check_err@plt>
mov    0x8(%rsp),%rsi
lea    0xe82(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xe1d(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xe1a(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xe05(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1090 <KeyVal_findIndex@plt>
lea    0xe0b(%rip),%rbp
mov    %eax,%edi
mov    %rbp,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xdff(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
lea    0xfca(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x1,0x10(%rsp)
sete   %dil
lea    0xde3(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xde0(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rdi
lea    0xdec(%rip),%rsi
lea    0xd02(%rip),%rdx
call   1060 <KeyVal_setValue@plt>
mov    %eax,%edi
mov    %r13,%rsi
call   1030 <_check_err@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
lea    0xd36(%rip),%r13
mov    %r13,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xda4(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r13,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xda1(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xd8c(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
mov    %rbp,%rsi
mov    %rbp,%r15
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xd79(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x1,0x10(%rsp)
sete   %dil
lea    0xd64(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xd61(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
lea    0xcab(%rip),%rbp
mov    %rbp,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x1,0x10(%rsp)
sete   %dil
lea    0xd45(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
mov    %r15,%rsi
mov    %r15,%r12
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x1,0x10(%rsp)
sete   %dil
lea    0xd32(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
lea    0xd3e(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x2,0x10(%rsp)
sete   %dil
lea    0xd18(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xd15(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rdi
lea    0xd21(%rip),%rsi
lea    0xaf8(%rip),%rdx
call   1060 <KeyVal_setValue@plt>
mov    %eax,%edi
lea    0xaef(%rip),%rsi
call   1030 <_check_err@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r13,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xcdc(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r13,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xcda(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
lea    0xba1(%rip),%rbp
mov    %rbp,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xcbf(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
mov    %r12,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rsp)
sete   %dil
lea    0xcb0(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
lea    0xc77(%rip),%rbp
mov    %rbp,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x1,0x10(%rsp)
sete   %dil
lea    0xc95(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xc93(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
lea    0xa99(%rip),%rbp
mov    %rbp,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x1,0x10(%rsp)
sete   %dil
lea    0xc78(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
mov    %r12,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x1,0x10(%rsp)
sete   %dil
lea    0xc69(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x2,0x10(%rsp)
sete   %dil
lea    0xc55(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xc53(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
lea    0xb16(%rip),%rbp
mov    %rbp,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x2,0x10(%rsp)
sete   %dil
lea    0xc38(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1090 <KeyVal_findIndex@plt>
mov    %eax,%edi
mov    %r12,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x2,0x10(%rsp)
sete   %dil
lea    0xc29(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
lea    0xc36(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1070 <KeyVal_findIdealIndex@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <_check_err@plt>
xor    %edi,%edi
cmpq   $0x3,0x10(%rsp)
sete   %dil
lea    0xc10(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1090 <KeyVal_findIndex@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xc0e(%rip),%rsi
call   1040 <ok@plt>
mov    0x8(%rsp),%rdi
call   1080 <KeyVal_delete@plt>
lea    0xc16(%rip),%rsi
mov    %eax,%edi
call   1030 <_check_err@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.KeyVal = type { i32 }
@.str = [11 x i8] c"KeyVal_new\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [22 x i8] c"KeyVal_findIdealIndex\00"
@.str.3 = [37 x i8] c"7a. findIdealIndex ok on empty array\00"
@.str.4 = [32 x i8] c"7b. findIndex ok on empty array\00"
@.str.5 = [2 x i8] c"2\00"
@.str.6 = [5 x i8] c"asdf\00"
@.str.7 = [16 x i8] c"KeyVal_setValue\00"
@.str.8 = [2 x i8] c"1\00"
@.str.9 = [34 x i8] c"7d. findIdealIndex-1 ok on array1\00"
@.str.10 = [29 x i8] c"7e. findIndex-1 ok on array1\00"
@.str.11 = [34 x i8] c"7g. findIdealIndex-2 ok on array1\00"
@.str.12 = [17 x i8] c"KeyVal_findIndex\00"
@.str.13 = [29 x i8] c"7h. findIndex-2 ok on array1\00"
@.str.14 = [2 x i8] c"3\00"
@.str.15 = [34 x i8] c"7j. findIdealIndex-3 ok on array1\00"
@.str.16 = [29 x i8] c"7k. findIndex-3 ok on array1\00"
@.str.17 = [2 x i8] c"4\00"
@.str.18 = [34 x i8] c"7m. findIdealIndex-1 ok on array2\00"
@.str.19 = [29 x i8] c"7n. findIndex-1 ok on array2\00"
@.str.20 = [34 x i8] c"7p. findIdealIndex-2 ok on array2\00"
@.str.21 = [29 x i8] c"7q. findIndex-2 ok on array2\00"
@.str.22 = [34 x i8] c"7s. findIdealIndex-3 ok on array2\00"
@.str.23 = [29 x i8] c"7t. findIndex-3 ok on array2\00"
@.str.24 = [34 x i8] c"7v. findIdealIndex-4 ok on array2\00"
@.str.25 = [29 x i8] c"7w. findIndex-4 ok on array2\00"
@.str.26 = [2 x i8] c"5\00"
@.str.27 = [34 x i8] c"7y. findIdealIndex-5 ok on array2\00"
@.str.28 = [29 x i8] c"7z. findIndex-5 ok on array2\00"
@.str.29 = [2 x i8] c"6\00"
@.str.30 = [35 x i8] c"7ab. findIdealIndex-1 ok on array3\00"
@.str.31 = [30 x i8] c"7ac. findIndex-1 ok on array3\00"
@.str.32 = [35 x i8] c"7ae. findIdealIndex-2 ok on array3\00"
@.str.33 = [30 x i8] c"7af. findIndex-2 ok on array3\00"
@.str.34 = [35 x i8] c"7ah. findIdealIndex-3 ok on array3\00"
@.str.35 = [30 x i8] c"7ai. findIndex-3 ok on array3\00"
@.str.36 = [35 x i8] c"7ak. findIdealIndex-4 ok on array3\00"
@.str.37 = [30 x i8] c"7al. findIndex-4 ok on array3\00"
@.str.38 = [35 x i8] c"7an. findIdealIndex-5 ok on array3\00"
@.str.39 = [30 x i8] c"7ao. findIndex-5 ok on array3\00"
@.str.40 = [35 x i8] c"7aq. findIdealIndex-6 ok on array3\00"
@.str.41 = [30 x i8] c"7ar. findIndex-6 ok on array3\00"
@.str.42 = [2 x i8] c"7\00"
@.str.43 = [35 x i8] c"7at. findIdealIndex-7 ok on array3\00"
@.str.44 = [30 x i8] c"7au. findIndex-7 ok on array3\00"
@.str.45 = [14 x i8] c"KeyVal_delete\00"
define void @test7() {
%1 = alloca %struct.KeyVal*
%2 = alloca i64
%3 = call i32 @KeyVal_new(%struct.KeyVal** %1)
%4 = call i32 @_check_err(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = load %struct.KeyVal*, %struct.KeyVal** %1
%6 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @_check_err(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%8 = load i64, i64* %2
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @ok(i32 %10, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%12 = load %struct.KeyVal*, %struct.KeyVal** %1
%13 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32 %13, 2
%15 = zext i1 %14 to i32
%16 = call i32 @ok(i32 %15, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%17 = load %struct.KeyVal*, %struct.KeyVal** %1
%18 = call i32 @KeyVal_setValue(%struct.KeyVal* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%19 = call i32 @_check_err(i32 %18, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%20 = load %struct.KeyVal*, %struct.KeyVal** %1
%21 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%22 = call i32 @_check_err(i32 %21, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%23 = load i64, i64* %2
%24 = icmp eq i64 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @ok(i32 %25, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%27 = load %struct.KeyVal*, %struct.KeyVal** %1
%28 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%29 = icmp eq i32 %28, 2
%30 = zext i1 %29 to i32
%31 = call i32 @ok(i32 %30, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%32 = load %struct.KeyVal*, %struct.KeyVal** %1
%33 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%34 = call i32 @_check_err(i32 %33, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%35 = load i64, i64* %2
%36 = icmp eq i64 %35, 0
%37 = zext i1 %36 to i32
%38 = call i32 @ok(i32 %37, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0))
%39 = load %struct.KeyVal*, %struct.KeyVal** %1
%40 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %39, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%41 = call i32 @_check_err(i32 %40, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%42 = load i64, i64* %2
%43 = icmp eq i64 %42, 0
%44 = zext i1 %43 to i32
%45 = call i32 @ok(i32 %44, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0))
%46 = load %struct.KeyVal*, %struct.KeyVal** %1
%47 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%48 = call i32 @_check_err(i32 %47, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%49 = load i64, i64* %2
%50 = icmp eq i64 %49, 1
%51 = zext i1 %50 to i32
%52 = call i32 @ok(i32 %51, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0))
%53 = load %struct.KeyVal*, %struct.KeyVal** %1
%54 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%55 = icmp eq i32 %54, 2
%56 = zext i1 %55 to i32
%57 = call i32 @ok(i32 %56, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0))
%58 = load %struct.KeyVal*, %struct.KeyVal** %1
%59 = call i32 @KeyVal_setValue(%struct.KeyVal* %58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%60 = call i32 @_check_err(i32 %59, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%61 = load %struct.KeyVal*, %struct.KeyVal** %1
%62 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %61, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%63 = call i32 @_check_err(i32 %62, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%64 = load i64, i64* %2
%65 = icmp eq i64 %64, 0
%66 = zext i1 %65 to i32
%67 = call i32 @ok(i32 %66, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.18, i64 0, i64 0))
%68 = load %struct.KeyVal*, %struct.KeyVal** %1
%69 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %68, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%70 = icmp eq i32 %69, 2
%71 = zext i1 %70 to i32
%72 = call i32 @ok(i32 %71, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0))
%73 = load %struct.KeyVal*, %struct.KeyVal** %1
%74 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %73, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%75 = call i32 @_check_err(i32 %74, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%76 = load i64, i64* %2
%77 = icmp eq i64 %76, 0
%78 = zext i1 %77 to i32
%79 = call i32 @ok(i32 %78, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.20, i64 0, i64 0))
%80 = load %struct.KeyVal*, %struct.KeyVal** %1
%81 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %80, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%82 = call i32 @_check_err(i32 %81, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%83 = load i64, i64* %2
%84 = icmp eq i64 %83, 0
%85 = zext i1 %84 to i32
%86 = call i32 @ok(i32 %85, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.21, i64 0, i64 0))
%87 = load %struct.KeyVal*, %struct.KeyVal** %1
%88 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %87, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%89 = call i32 @_check_err(i32 %88, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%90 = load i64, i64* %2
%91 = icmp eq i64 %90, 1
%92 = zext i1 %91 to i32
%93 = call i32 @ok(i32 %92, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.22, i64 0, i64 0))
%94 = load %struct.KeyVal*, %struct.KeyVal** %1
%95 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %94, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%96 = icmp eq i32 %95, 2
%97 = zext i1 %96 to i32
%98 = call i32 @ok(i32 %97, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0))
%99 = load %struct.KeyVal*, %struct.KeyVal** %1
%100 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %99, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%101 = call i32 @_check_err(i32 %100, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%102 = load i64, i64* %2
%103 = icmp eq i64 %102, 1
%104 = zext i1 %103 to i32
%105 = call i32 @ok(i32 %104, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.24, i64 0, i64 0))
%106 = load %struct.KeyVal*, %struct.KeyVal** %1
%107 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %106, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%108 = call i32 @_check_err(i32 %107, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%109 = load i64, i64* %2
%110 = icmp eq i64 %109, 1
%111 = zext i1 %110 to i32
%112 = call i32 @ok(i32 %111, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.25, i64 0, i64 0))
%113 = load %struct.KeyVal*, %struct.KeyVal** %1
%114 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %113, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%115 = call i32 @_check_err(i32 %114, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%116 = load i64, i64* %2
%117 = icmp eq i64 %116, 2
%118 = zext i1 %117 to i32
%119 = call i32 @ok(i32 %118, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.27, i64 0, i64 0))
%120 = load %struct.KeyVal*, %struct.KeyVal** %1
%121 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%122 = icmp eq i32 %121, 2
%123 = zext i1 %122 to i32
%124 = call i32 @ok(i32 %123, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.28, i64 0, i64 0))
%125 = load %struct.KeyVal*, %struct.KeyVal** %1
%126 = call i32 @KeyVal_setValue(%struct.KeyVal* %125, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%127 = call i32 @_check_err(i32 %126, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%128 = load %struct.KeyVal*, %struct.KeyVal** %1
%129 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %128, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%130 = call i32 @_check_err(i32 %129, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%131 = load i64, i64* %2
%132 = icmp eq i64 %131, 0
%133 = zext i1 %132 to i32
%134 = call i32 @ok(i32 %133, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.30, i64 0, i64 0))
%135 = load %struct.KeyVal*, %struct.KeyVal** %1
%136 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %135, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%137 = icmp eq i32 %136, 2
%138 = zext i1 %137 to i32
%139 = call i32 @ok(i32 %138, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.31, i64 0, i64 0))
%140 = load %struct.KeyVal*, %struct.KeyVal** %1
%141 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %140, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%142 = call i32 @_check_err(i32 %141, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%143 = load i64, i64* %2
%144 = icmp eq i64 %143, 0
%145 = zext i1 %144 to i32
%146 = call i32 @ok(i32 %145, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.32, i64 0, i64 0))
%147 = load %struct.KeyVal*, %struct.KeyVal** %1
%148 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %147, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%149 = call i32 @_check_err(i32 %148, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%150 = load i64, i64* %2
%151 = icmp eq i64 %150, 0
%152 = zext i1 %151 to i32
%153 = call i32 @ok(i32 %152, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.33, i64 0, i64 0))
%154 = load %struct.KeyVal*, %struct.KeyVal** %1
%155 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %154, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%156 = call i32 @_check_err(i32 %155, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%157 = load i64, i64* %2
%158 = icmp eq i64 %157, 1
%159 = zext i1 %158 to i32
%160 = call i32 @ok(i32 %159, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.34, i64 0, i64 0))
%161 = load %struct.KeyVal*, %struct.KeyVal** %1
%162 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %161, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%163 = icmp eq i32 %162, 2
%164 = zext i1 %163 to i32
%165 = call i32 @ok(i32 %164, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.35, i64 0, i64 0))
%166 = load %struct.KeyVal*, %struct.KeyVal** %1
%167 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %166, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%168 = call i32 @_check_err(i32 %167, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%169 = load i64, i64* %2
%170 = icmp eq i64 %169, 1
%171 = zext i1 %170 to i32
%172 = call i32 @ok(i32 %171, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.36, i64 0, i64 0))
%173 = load %struct.KeyVal*, %struct.KeyVal** %1
%174 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %173, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%175 = call i32 @_check_err(i32 %174, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%176 = load i64, i64* %2
%177 = icmp eq i64 %176, 1
%178 = zext i1 %177 to i32
%179 = call i32 @ok(i32 %178, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.37, i64 0, i64 0))
%180 = load %struct.KeyVal*, %struct.KeyVal** %1
%181 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %180, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%182 = call i32 @_check_err(i32 %181, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%183 = load i64, i64* %2
%184 = icmp eq i64 %183, 2
%185 = zext i1 %184 to i32
%186 = call i32 @ok(i32 %185, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.38, i64 0, i64 0))
%187 = load %struct.KeyVal*, %struct.KeyVal** %1
%188 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %187, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%189 = icmp eq i32 %188, 2
%190 = zext i1 %189 to i32
%191 = call i32 @ok(i32 %190, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.39, i64 0, i64 0))
%192 = load %struct.KeyVal*, %struct.KeyVal** %1
%193 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %192, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0))
%194 = call i32 @_check_err(i32 %193, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%195 = load i64, i64* %2
%196 = icmp eq i64 %195, 2
%197 = zext i1 %196 to i32
%198 = call i32 @ok(i32 %197, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.40, i64 0, i64 0))
%199 = load %struct.KeyVal*, %struct.KeyVal** %1
%200 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %199, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0))
%201 = call i32 @_check_err(i32 %200, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%202 = load i64, i64* %2
%203 = icmp eq i64 %202, 2
%204 = zext i1 %203 to i32
%205 = call i32 @ok(i32 %204, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.41, i64 0, i64 0))
%206 = load %struct.KeyVal*, %struct.KeyVal** %1
%207 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %206, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.42, i64 0, i64 0))
%208 = call i32 @_check_err(i32 %207, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%209 = load i64, i64* %2
%210 = icmp eq i64 %209, 3
%211 = zext i1 %210 to i32
%212 = call i32 @ok(i32 %211, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.43, i64 0, i64 0))
%213 = load %struct.KeyVal*, %struct.KeyVal** %1
%214 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %213, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.42, i64 0, i64 0))
%215 = icmp eq i32 %214, 2
%216 = zext i1 %215 to i32
%217 = call i32 @ok(i32 %216, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.44, i64 0, i64 0))
%218 = load %struct.KeyVal*, %struct.KeyVal** %1
%219 = call i32 @KeyVal_delete(%struct.KeyVal* %218)
%220 = call i32 @_check_err(i32 %219, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.45, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.KeyVal = type { i32 }
@.str = [11 x i8] c"KeyVal_new\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [22 x i8] c"KeyVal_findIdealIndex\00"
@.str.3 = [37 x i8] c"7a. findIdealIndex ok on empty array\00"
@.str.4 = [32 x i8] c"7b. findIndex ok on empty array\00"
@.str.5 = [2 x i8] c"2\00"
@.str.6 = [5 x i8] c"asdf\00"
@.str.7 = [16 x i8] c"KeyVal_setValue\00"
@.str.8 = [2 x i8] c"1\00"
@.str.9 = [34 x i8] c"7d. findIdealIndex-1 ok on array1\00"
@.str.10 = [29 x i8] c"7e. findIndex-1 ok on array1\00"
@.str.11 = [34 x i8] c"7g. findIdealIndex-2 ok on array1\00"
@.str.12 = [17 x i8] c"KeyVal_findIndex\00"
@.str.13 = [29 x i8] c"7h. findIndex-2 ok on array1\00"
@.str.14 = [2 x i8] c"3\00"
@.str.15 = [34 x i8] c"7j. findIdealIndex-3 ok on array1\00"
@.str.16 = [29 x i8] c"7k. findIndex-3 ok on array1\00"
@.str.17 = [2 x i8] c"4\00"
@.str.18 = [34 x i8] c"7m. findIdealIndex-1 ok on array2\00"
@.str.19 = [29 x i8] c"7n. findIndex-1 ok on array2\00"
@.str.20 = [34 x i8] c"7p. findIdealIndex-2 ok on array2\00"
@.str.21 = [29 x i8] c"7q. findIndex-2 ok on array2\00"
@.str.22 = [34 x i8] c"7s. findIdealIndex-3 ok on array2\00"
@.str.23 = [29 x i8] c"7t. findIndex-3 ok on array2\00"
@.str.24 = [34 x i8] c"7v. findIdealIndex-4 ok on array2\00"
@.str.25 = [29 x i8] c"7w. findIndex-4 ok on array2\00"
@.str.26 = [2 x i8] c"5\00"
@.str.27 = [34 x i8] c"7y. findIdealIndex-5 ok on array2\00"
@.str.28 = [29 x i8] c"7z. findIndex-5 ok on array2\00"
@.str.29 = [2 x i8] c"6\00"
@.str.30 = [35 x i8] c"7ab. findIdealIndex-1 ok on array3\00"
@.str.31 = [30 x i8] c"7ac. findIndex-1 ok on array3\00"
@.str.32 = [35 x i8] c"7ae. findIdealIndex-2 ok on array3\00"
@.str.33 = [30 x i8] c"7af. findIndex-2 ok on array3\00"
@.str.34 = [35 x i8] c"7ah. findIdealIndex-3 ok on array3\00"
@.str.35 = [30 x i8] c"7ai. findIndex-3 ok on array3\00"
@.str.36 = [35 x i8] c"7ak. findIdealIndex-4 ok on array3\00"
@.str.37 = [30 x i8] c"7al. findIndex-4 ok on array3\00"
@.str.38 = [35 x i8] c"7an. findIdealIndex-5 ok on array3\00"
@.str.39 = [30 x i8] c"7ao. findIndex-5 ok on array3\00"
@.str.40 = [35 x i8] c"7aq. findIdealIndex-6 ok on array3\00"
@.str.41 = [30 x i8] c"7ar. findIndex-6 ok on array3\00"
@.str.42 = [2 x i8] c"7\00"
@.str.43 = [35 x i8] c"7at. findIdealIndex-7 ok on array3\00"
@.str.44 = [30 x i8] c"7au. findIndex-7 ok on array3\00"
@.str.45 = [14 x i8] c"KeyVal_delete\00"
define void @test7() {
%1 = alloca %struct.KeyVal*
%2 = alloca i64
%3 = bitcast %struct.KeyVal** %1 to i8*
%4 = call i32 @KeyVal_new(%struct.KeyVal** %1)
%5 = call i32 @_check_err(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = bitcast i64* %2 to i8*
%7 = load %struct.KeyVal*, %struct.KeyVal** %1
%8 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @_check_err(i32 %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%10 = load i64, i64* %2
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @ok(i32 %12, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%14 = load %struct.KeyVal*, %struct.KeyVal** %1
%15 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32 %15, 2
%17 = zext i1 %16 to i32
%18 = call i32 @ok(i32 %17, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%19 = load %struct.KeyVal*, %struct.KeyVal** %1
%20 = call i32 @KeyVal_setValue(%struct.KeyVal* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%21 = call i32 @_check_err(i32 %20, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%22 = load %struct.KeyVal*, %struct.KeyVal** %1
%23 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%24 = call i32 @_check_err(i32 %23, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%25 = load i64, i64* %2
%26 = icmp eq i64 %25, 0
%27 = zext i1 %26 to i32
%28 = call i32 @ok(i32 %27, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%29 = load %struct.KeyVal*, %struct.KeyVal** %1
%30 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%31 = icmp eq i32 %30, 2
%32 = zext i1 %31 to i32
%33 = call i32 @ok(i32 %32, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%34 = load %struct.KeyVal*, %struct.KeyVal** %1
%35 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%36 = call i32 @_check_err(i32 %35, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%37 = load i64, i64* %2
%38 = icmp eq i64 %37, 0
%39 = zext i1 %38 to i32
%40 = call i32 @ok(i32 %39, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0))
%41 = load %struct.KeyVal*, %struct.KeyVal** %1
%42 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%43 = call i32 @_check_err(i32 %42, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%44 = load i64, i64* %2
%45 = icmp eq i64 %44, 0
%46 = zext i1 %45 to i32
%47 = call i32 @ok(i32 %46, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0))
%48 = load %struct.KeyVal*, %struct.KeyVal** %1
%49 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%50 = call i32 @_check_err(i32 %49, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%51 = load i64, i64* %2
%52 = icmp eq i64 %51, 1
%53 = zext i1 %52 to i32
%54 = call i32 @ok(i32 %53, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0))
%55 = load %struct.KeyVal*, %struct.KeyVal** %1
%56 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %55, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%57 = icmp eq i32 %56, 2
%58 = zext i1 %57 to i32
%59 = call i32 @ok(i32 %58, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0))
%60 = load %struct.KeyVal*, %struct.KeyVal** %1
%61 = call i32 @KeyVal_setValue(%struct.KeyVal* %60, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%62 = call i32 @_check_err(i32 %61, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%63 = load %struct.KeyVal*, %struct.KeyVal** %1
%64 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %63, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%65 = call i32 @_check_err(i32 %64, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%66 = load i64, i64* %2
%67 = icmp eq i64 %66, 0
%68 = zext i1 %67 to i32
%69 = call i32 @ok(i32 %68, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.18, i64 0, i64 0))
%70 = load %struct.KeyVal*, %struct.KeyVal** %1
%71 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %70, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%72 = icmp eq i32 %71, 2
%73 = zext i1 %72 to i32
%74 = call i32 @ok(i32 %73, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0))
%75 = load %struct.KeyVal*, %struct.KeyVal** %1
%76 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %75, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%77 = call i32 @_check_err(i32 %76, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%78 = load i64, i64* %2
%79 = icmp eq i64 %78, 0
%80 = zext i1 %79 to i32
%81 = call i32 @ok(i32 %80, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.20, i64 0, i64 0))
%82 = load %struct.KeyVal*, %struct.KeyVal** %1
%83 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %82, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%84 = call i32 @_check_err(i32 %83, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%85 = load i64, i64* %2
%86 = icmp eq i64 %85, 0
%87 = zext i1 %86 to i32
%88 = call i32 @ok(i32 %87, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.21, i64 0, i64 0))
%89 = load %struct.KeyVal*, %struct.KeyVal** %1
%90 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %89, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%91 = call i32 @_check_err(i32 %90, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%92 = load i64, i64* %2
%93 = icmp eq i64 %92, 1
%94 = zext i1 %93 to i32
%95 = call i32 @ok(i32 %94, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.22, i64 0, i64 0))
%96 = load %struct.KeyVal*, %struct.KeyVal** %1
%97 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %96, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%98 = icmp eq i32 %97, 2
%99 = zext i1 %98 to i32
%100 = call i32 @ok(i32 %99, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0))
%101 = load %struct.KeyVal*, %struct.KeyVal** %1
%102 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %101, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%103 = call i32 @_check_err(i32 %102, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%104 = load i64, i64* %2
%105 = icmp eq i64 %104, 1
%106 = zext i1 %105 to i32
%107 = call i32 @ok(i32 %106, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.24, i64 0, i64 0))
%108 = load %struct.KeyVal*, %struct.KeyVal** %1
%109 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %108, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%110 = call i32 @_check_err(i32 %109, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%111 = load i64, i64* %2
%112 = icmp eq i64 %111, 1
%113 = zext i1 %112 to i32
%114 = call i32 @ok(i32 %113, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.25, i64 0, i64 0))
%115 = load %struct.KeyVal*, %struct.KeyVal** %1
%116 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %115, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%117 = call i32 @_check_err(i32 %116, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%118 = load i64, i64* %2
%119 = icmp eq i64 %118, 2
%120 = zext i1 %119 to i32
%121 = call i32 @ok(i32 %120, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.27, i64 0, i64 0))
%122 = load %struct.KeyVal*, %struct.KeyVal** %1
%123 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %122, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%124 = icmp eq i32 %123, 2
%125 = zext i1 %124 to i32
%126 = call i32 @ok(i32 %125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.28, i64 0, i64 0))
%127 = load %struct.KeyVal*, %struct.KeyVal** %1
%128 = call i32 @KeyVal_setValue(%struct.KeyVal* %127, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%129 = call i32 @_check_err(i32 %128, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%130 = load %struct.KeyVal*, %struct.KeyVal** %1
%131 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %130, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%132 = call i32 @_check_err(i32 %131, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%133 = load i64, i64* %2
%134 = icmp eq i64 %133, 0
%135 = zext i1 %134 to i32
%136 = call i32 @ok(i32 %135, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.30, i64 0, i64 0))
%137 = load %struct.KeyVal*, %struct.KeyVal** %1
%138 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %137, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%139 = icmp eq i32 %138, 2
%140 = zext i1 %139 to i32
%141 = call i32 @ok(i32 %140, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.31, i64 0, i64 0))
%142 = load %struct.KeyVal*, %struct.KeyVal** %1
%143 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %142, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%144 = call i32 @_check_err(i32 %143, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%145 = load i64, i64* %2
%146 = icmp eq i64 %145, 0
%147 = zext i1 %146 to i32
%148 = call i32 @ok(i32 %147, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.32, i64 0, i64 0))
%149 = load %struct.KeyVal*, %struct.KeyVal** %1
%150 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %149, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%151 = call i32 @_check_err(i32 %150, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%152 = load i64, i64* %2
%153 = icmp eq i64 %152, 0
%154 = zext i1 %153 to i32
%155 = call i32 @ok(i32 %154, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.33, i64 0, i64 0))
%156 = load %struct.KeyVal*, %struct.KeyVal** %1
%157 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %156, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%158 = call i32 @_check_err(i32 %157, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%159 = load i64, i64* %2
%160 = icmp eq i64 %159, 1
%161 = zext i1 %160 to i32
%162 = call i32 @ok(i32 %161, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.34, i64 0, i64 0))
%163 = load %struct.KeyVal*, %struct.KeyVal** %1
%164 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %163, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%165 = icmp eq i32 %164, 2
%166 = zext i1 %165 to i32
%167 = call i32 @ok(i32 %166, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.35, i64 0, i64 0))
%168 = load %struct.KeyVal*, %struct.KeyVal** %1
%169 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %168, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%170 = call i32 @_check_err(i32 %169, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%171 = load i64, i64* %2
%172 = icmp eq i64 %171, 1
%173 = zext i1 %172 to i32
%174 = call i32 @ok(i32 %173, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.36, i64 0, i64 0))
%175 = load %struct.KeyVal*, %struct.KeyVal** %1
%176 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %175, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%177 = call i32 @_check_err(i32 %176, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%178 = load i64, i64* %2
%179 = icmp eq i64 %178, 1
%180 = zext i1 %179 to i32
%181 = call i32 @ok(i32 %180, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.37, i64 0, i64 0))
%182 = load %struct.KeyVal*, %struct.KeyVal** %1
%183 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %182, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%184 = call i32 @_check_err(i32 %183, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%185 = load i64, i64* %2
%186 = icmp eq i64 %185, 2
%187 = zext i1 %186 to i32
%188 = call i32 @ok(i32 %187, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.38, i64 0, i64 0))
%189 = load %struct.KeyVal*, %struct.KeyVal** %1
%190 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %189, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%191 = icmp eq i32 %190, 2
%192 = zext i1 %191 to i32
%193 = call i32 @ok(i32 %192, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.39, i64 0, i64 0))
%194 = load %struct.KeyVal*, %struct.KeyVal** %1
%195 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %194, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0))
%196 = call i32 @_check_err(i32 %195, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%197 = load i64, i64* %2
%198 = icmp eq i64 %197, 2
%199 = zext i1 %198 to i32
%200 = call i32 @ok(i32 %199, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.40, i64 0, i64 0))
%201 = load %struct.KeyVal*, %struct.KeyVal** %1
%202 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %201, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0))
%203 = call i32 @_check_err(i32 %202, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%204 = load i64, i64* %2
%205 = icmp eq i64 %204, 2
%206 = zext i1 %205 to i32
%207 = call i32 @ok(i32 %206, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.41, i64 0, i64 0))
%208 = load %struct.KeyVal*, %struct.KeyVal** %1
%209 = call i32 @KeyVal_findIdealIndex(i64* %2, %struct.KeyVal* %208, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.42, i64 0, i64 0))
%210 = call i32 @_check_err(i32 %209, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%211 = load i64, i64* %2
%212 = icmp eq i64 %211, 3
%213 = zext i1 %212 to i32
%214 = call i32 @ok(i32 %213, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.43, i64 0, i64 0))
%215 = load %struct.KeyVal*, %struct.KeyVal** %1
%216 = call i32 @KeyVal_findIndex(i64* %2, %struct.KeyVal* %215, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.42, i64 0, i64 0))
%217 = icmp eq i32 %216, 2
%218 = zext i1 %217 to i32
%219 = call i32 @ok(i32 %218, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.44, i64 0, i64 0))
%220 = load %struct.KeyVal*, %struct.KeyVal** %1
%221 = call i32 @KeyVal_delete(%struct.KeyVal* %220)
%222 = call i32 @_check_err(i32 %221, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.45, i64 0, i64 0))
ret void
}