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

/* Variables and functions */
unsigned long long
_ZNKSt6vectorIPiSaIS0_EE4sizeEv(struct l_class_OC_std_KD__KD_vector *);
unsigned long long
_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(struct l_class_OC_std_KD__KD_vector *);
int /*<<< orphan*/ _ZSt20__throw_length_errorPKc(unsigned char *);
unsigned long long *_ZSt3maxImERKT_S2_S2_(unsigned long long *,
                                          unsigned long long *);
unsigned long long _ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc(
    struct l_class_OC_std_KD__KD_vector *llvm_cbe_this,
    unsigned long long llvm_cbe___n, unsigned char *llvm_cbe___s) {
  unsigned long long llvm_cbe_retval;
  struct l_class_OC_std_KD__KD_vector *llvm_cbe_this_2e_addr;
  unsigned long long llvm_cbe___n_2e_addr;
  unsigned char *llvm_cbe___s_2e_addr;
  unsigned long long llvm_cbe___len;
  unsigned long long llvm_cbe_reftmp;
  struct l_class_OC_std_KD__KD_vector *llvm_cbe_this1;
  unsigned long long llvm_cbe_call;
  unsigned long long llvm_cbe_call2;
  unsigned long long llvm_cbe_tmp;
  unsigned char *llvm_cbe_tmp3;
  unsigned long long llvm_cbe_call5;
  unsigned long long llvm_cbe_call6;
  unsigned long long *llvm_cbe_call7;
  unsigned long long llvm_cbe_tmp8;
  unsigned long long llvm_cbe_tmp9;
  unsigned long long llvm_cbe_call10;
  unsigned long long llvm_cbe_tmp12;
  unsigned long long llvm_cbe_call13;
  unsigned long long llvm_cbe_call15;
  unsigned long long llvm_cbe_tmp16;
  unsigned long long llvm_cbe_cond;
  unsigned long long llvm_cbe_cond__PHI_TEMPORARY;
  unsigned long long llvm_cbe_tmp__27;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  *(&llvm_cbe___n_2e_addr) = llvm_cbe___n;
  *(&llvm_cbe___s_2e_addr) = llvm_cbe___s;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  llvm_cbe_call = _ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(llvm_cbe_this1);
  llvm_cbe_call2 = _ZNKSt6vectorIPiSaIS0_EE4sizeEv(llvm_cbe_this1);
  llvm_cbe_tmp = *(&llvm_cbe___n_2e_addr);
  if ((((unsigned long long)((
           (unsigned long long)(((unsigned long long)llvm_cbe_call) -
                                ((unsigned long long)llvm_cbe_call2))))) <
       ((unsigned long long)llvm_cbe_tmp))) {
    goto llvm_cbe_if_2e_then;
  } else {
    goto llvm_cbe_if_2e_end;
  }
llvm_cbe_if_2e_then:
  llvm_cbe_tmp3 = *(&llvm_cbe___s_2e_addr);
  _ZSt20__throw_length_errorPKc(llvm_cbe_tmp3);
  ;
llvm_cbe_if_2e_end:
  llvm_cbe_call5 = _ZNKSt6vectorIPiSaIS0_EE4sizeEv(llvm_cbe_this1);
  llvm_cbe_call6 = _ZNKSt6vectorIPiSaIS0_EE4sizeEv(llvm_cbe_this1);
  *(&llvm_cbe_reftmp) = llvm_cbe_call6;
  llvm_cbe_call7 =
      _ZSt3maxImERKT_S2_S2_((&llvm_cbe_reftmp), (&llvm_cbe___n_2e_addr));
  llvm_cbe_tmp8 = *llvm_cbe_call7;
  *(&llvm_cbe___len) =
      (((unsigned long long)(((unsigned long long)llvm_cbe_call5) +
                             ((unsigned long long)llvm_cbe_tmp8))));
  llvm_cbe_tmp9 = *(&llvm_cbe___len);
  llvm_cbe_call10 = _ZNKSt6vectorIPiSaIS0_EE4sizeEv(llvm_cbe_this1);
  if ((((unsigned long long)llvm_cbe_tmp9) <
       ((unsigned long long)llvm_cbe_call10))) {
    goto llvm_cbe_cond_2e_true;
  } else {
    goto llvm_cbe_lor_2e_lhs_2e_false;
  }
llvm_cbe_lor_2e_lhs_2e_false:
  llvm_cbe_tmp12 = *(&llvm_cbe___len);
  llvm_cbe_call13 = _ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(llvm_cbe_this1);
  if ((((unsigned long long)llvm_cbe_tmp12) >
       ((unsigned long long)llvm_cbe_call13))) {
    goto llvm_cbe_cond_2e_true;
  } else {
    goto llvm_cbe_cond_2e_false;
  }
llvm_cbe_cond_2e_true:
  llvm_cbe_call15 = _ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(llvm_cbe_this1);
  llvm_cbe_cond__PHI_TEMPORARY = llvm_cbe_call15;
  goto llvm_cbe_cond_2e_end;
llvm_cbe_cond_2e_false:
  llvm_cbe_tmp16 = *(&llvm_cbe___len);
  llvm_cbe_cond__PHI_TEMPORARY = llvm_cbe_tmp16;
  goto llvm_cbe_cond_2e_end;
llvm_cbe_cond_2e_end:
  llvm_cbe_cond = llvm_cbe_cond__PHI_TEMPORARY;
  *(&llvm_cbe_retval) = llvm_cbe_cond;
  llvm_cbe_tmp__27 = *(&llvm_cbe_retval);
  return llvm_cbe_tmp__27;
}


x86 assembly (clang, -O0):
<_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
call   1040 <_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv@plt>
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rdi
call   1050 <_ZNKSt6vectorIPiSaIS0_EE4sizeEv@plt>
mov    %rax,-0x60(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%rax
sub    -0x60(%rbp),%rax
cmp    -0x68(%rbp),%rax
jae    11b0 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x70>
jmp    11b5 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x75>
jmp    11c6 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x86>
mov    -0x38(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rdi
call   1060 <_ZSt20__throw_length_errorPKc@plt>
mov    -0x50(%rbp),%rdi
call   1050 <_ZNKSt6vectorIPiSaIS0_EE4sizeEv@plt>
mov    %rax,-0x78(%rbp)
mov    -0x50(%rbp),%rdi
call   1050 <_ZNKSt6vectorIPiSaIS0_EE4sizeEv@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x48(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <_ZSt3maxImERKT_S2_S2_@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x90(%rbp)
mov    -0x78(%rbp),%rax
add    -0x90(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x50(%rbp),%rdi
call   1050 <_ZNKSt6vectorIPiSaIS0_EE4sizeEv@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x98(%rbp),%rax
cmp    -0xa0(%rbp),%rax
jae    1250 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x110>
jmp    128e <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x14e>
jmp    1255 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x115>
mov    -0x40(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x50(%rbp),%rdi
call   1040 <_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xa8(%rbp),%rax
cmp    -0xb0(%rbp),%rax
jbe    1289 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x149>
jmp    128e <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x14e>
jmp    12b1 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x171>
mov    -0x50(%rbp),%rdi
call   1040 <_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rax
mov    %rax,-0xd0(%rbp)
jmp    12ca <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x18a>
mov    -0x40(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%r14
mov    %rsi,0x10(%rsp)
call   1040 <_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1050 <_ZNKSt6vectorIPiSaIS0_EE4sizeEv@plt>
sub    %rax,%rbx
cmp    %r12,%rbx
jae    1179 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x39>
mov    %r15,%rdi
call   1060 <_ZSt20__throw_length_errorPKc@plt>
mov    %r14,%rdi
call   1050 <_ZNKSt6vectorIPiSaIS0_EE4sizeEv@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1050 <_ZNKSt6vectorIPiSaIS0_EE4sizeEv@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <_ZSt3maxImERKT_S2_S2_@plt>
add    (%rax),%rbx
mov    %r14,%rdi
call   1050 <_ZNKSt6vectorIPiSaIS0_EE4sizeEv@plt>
cmp    %rax,%rbx
jb     11bd <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x7d>
mov    %r14,%rdi
call   1040 <_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv@plt>
cmp    %rax,%rbx
jbe    11c8 <_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc+0x88>
mov    %r14,%rdi
call   1040 <_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv@plt>
mov    %rax,%rbx
mov    %rbx,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.l_class_OC_std_KD__KD_vector = type { i32 }
define i64 @_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc(%struct.l_class_OC_std_KD__KD_vector* %0, i64 %1, i8* %2) {
%4 = alloca %struct.l_class_OC_std_KD__KD_vector*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
%8 = alloca %struct.l_class_OC_std_KD__KD_vector*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca %struct.l_class_OC_std_KD__KD_vector*
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64*
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i64
%26 = alloca i64
%27 = alloca i64
%28 = alloca i64
%29 = alloca i64
%30 = alloca i64
store %struct.l_class_OC_std_KD__KD_vector* %0, %struct.l_class_OC_std_KD__KD_vector** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%31 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %4
store %struct.l_class_OC_std_KD__KD_vector* %31, %struct.l_class_OC_std_KD__KD_vector** %8
%32 = load i64, i64* %5
store i64 %32, i64* %9
%33 = load i8*, i8** %6
store i8* %33, i8** %10
%34 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %8
store %struct.l_class_OC_std_KD__KD_vector* %34, %struct.l_class_OC_std_KD__KD_vector** %13
%35 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %13
%36 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%struct.l_class_OC_std_KD__KD_vector* %35)
store i64 %36, i64* %14
%37 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %13
%38 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%struct.l_class_OC_std_KD__KD_vector* %37)
store i64 %38, i64* %15
%39 = load i64, i64* %9
store i64 %39, i64* %16
%40 = load i64, i64* %14
%41 = load i64, i64* %15
%42 = sub i64 %40, %41
%43 = load i64, i64* %16
%44 = icmp ult i64 %42, %43
br i1 %44, label %45, label %46
45: ; preds = %3
br label %47
46: ; preds = %3
br label %51
47: ; preds = %45
%48 = load i8*, i8** %10
store i8* %48, i8** %17
%49 = load i8*, i8** %17
%50 = call i32 @_ZSt20__throw_length_errorPKc(i8* %49)
br label %51
51: ; preds = %47, %46
%52 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %13
%53 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%struct.l_class_OC_std_KD__KD_vector* %52)
store i64 %53, i64* %18
%54 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %13
%55 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%struct.l_class_OC_std_KD__KD_vector* %54)
store i64 %55, i64* %19
%56 = load i64, i64* %19
store i64 %56, i64* %12
%57 = call i64* @_ZSt3maxImERKT_S2_S2_(i64* %12, i64* %9)
store i64* %57, i64** %20
%58 = load i64*, i64** %20
%59 = load i64, i64* %58
store i64 %59, i64* %21
%60 = load i64, i64* %18
%61 = load i64, i64* %21
%62 = add i64 %60, %61
store i64 %62, i64* %11
%63 = load i64, i64* %11
store i64 %63, i64* %22
%64 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %13
%65 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%struct.l_class_OC_std_KD__KD_vector* %64)
store i64 %65, i64* %23
%66 = load i64, i64* %22
%67 = load i64, i64* %23
%68 = icmp ult i64 %66, %67
br i1 %68, label %69, label %70
69: ; preds = %51
br label %80
70: ; preds = %51
br label %71
71: ; preds = %70
%72 = load i64, i64* %11
store i64 %72, i64* %24
%73 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %13
%74 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%struct.l_class_OC_std_KD__KD_vector* %73)
store i64 %74, i64* %25
%75 = load i64, i64* %24
%76 = load i64, i64* %25
%77 = icmp ugt i64 %75, %76
br i1 %77, label %78, label %79
78: ; preds = %71
br label %80
79: ; preds = %71
br label %84
80: ; preds = %78, %69
%81 = load %struct.l_class_OC_std_KD__KD_vector*, %struct.l_class_OC_std_KD__KD_vector** %13
%82 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%struct.l_class_OC_std_KD__KD_vector* %81)
store i64 %82, i64* %26
%83 = load i64, i64* %26
store i64 %83, i64* %29
br label %87
84: ; preds = %79
%85 = load i64, i64* %11
store i64 %85, i64* %27
%86 = load i64, i64* %27
store i64 %86, i64* %29
br label %87
87: ; preds = %84, %80
%88 = load i64, i64* %29
store i64 %88, i64* %28
%89 = load i64, i64* %28
store i64 %89, i64* %7
%90 = load i64, i64* %7
store i64 %90, i64* %30
%91 = load i64, i64* %30
ret i64 %91
}

LLVM IR (-O2):
%struct.l_class_OC_std_KD__KD_vector = type { i32 }
define i64 @_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc(%struct.l_class_OC_std_KD__KD_vector* %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = bitcast i64* %4 to i8*
%7 = bitcast i64* %5 to i8*
store i64 %1, i64* %4
%8 = tail call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%struct.l_class_OC_std_KD__KD_vector* %0)
%9 = tail call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%struct.l_class_OC_std_KD__KD_vector* %0)
%10 = sub i64 %8, %9
%11 = icmp ult i64 %10, %1
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = tail call i32 @_ZSt20__throw_length_errorPKc(i8* %2)
br label %14
14: ; preds = %3, %12
%15 = tail call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%struct.l_class_OC_std_KD__KD_vector* %0)
%16 = tail call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%struct.l_class_OC_std_KD__KD_vector* %0)
store i64 %16, i64* %5
%17 = call i64* @_ZSt3maxImERKT_S2_S2_(i64* %5, i64* %4)
%18 = load i64, i64* %17
%19 = add i64 %18, %15
%20 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%struct.l_class_OC_std_KD__KD_vector* %0)
%21 = icmp ult i64 %19, %20
br i1 %21, label %25, label %22
22: ; preds = %14
%23 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%struct.l_class_OC_std_KD__KD_vector* %0)
%24 = icmp ugt i64 %19, %23
br i1 %24, label %25, label %27
25: ; preds = %22, %14
%26 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%struct.l_class_OC_std_KD__KD_vector* %0)
br label %27
27: ; preds = %22, %25
%28 = phi i64 [ %26, %25 ], [ %19, %22 ]
ret i64 %28
}