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

/* Variables and functions */
unsigned long long
_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(struct l_class_OC_DummyStream *);
int /*<<< orphan*/ _ZSt17__throw_bad_allocv();
unsigned char *_Znwm(unsigned long long);
unsigned int **_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv(
    struct l_class_OC_DummyStream *llvm_cbe_this,
    unsigned long long llvm_cbe___n, unsigned char *llvm_cbe_tmp__48) {
  unsigned int **llvm_cbe_retval;
  struct l_class_OC_DummyStream *llvm_cbe_this_2e_addr;
  unsigned long long llvm_cbe___n_2e_addr;
  unsigned char *llvm_cbe__2e_addr;
  struct l_class_OC_DummyStream *llvm_cbe_this1;
  unsigned long long llvm_cbe_tmp;
  unsigned long long llvm_cbe_call;
  unsigned long long llvm_cbe_tmp2;
  unsigned char *llvm_cbe_call3;
  unsigned int **llvm_cbe_tmp__49;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  *(&llvm_cbe___n_2e_addr) = llvm_cbe___n;
  *(&llvm_cbe__2e_addr) = llvm_cbe_tmp__48;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  llvm_cbe_tmp = *(&llvm_cbe___n_2e_addr);
  llvm_cbe_call = _ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(llvm_cbe_this1);
  if ((((unsigned long long)llvm_cbe_tmp) >
       ((unsigned long long)llvm_cbe_call))) {
    goto llvm_cbe_if_2e_then;
  } else {
    goto llvm_cbe_if_2e_end;
  }
llvm_cbe_if_2e_then:
  _ZSt17__throw_bad_allocv();
  ;
llvm_cbe_if_2e_end:
  llvm_cbe_tmp2 = *(&llvm_cbe___n_2e_addr);
  llvm_cbe_call3 =
      _Znwm((((unsigned long long)(((unsigned long long)llvm_cbe_tmp2) *
                                   ((unsigned long long)8ull)))));
  *(&llvm_cbe_retval) = (((unsigned int **)llvm_cbe_call3));
  llvm_cbe_tmp__49 = *(&llvm_cbe_retval);
  return llvm_cbe_tmp__49;
}


x86 assembly (clang, -O0):
<_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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,-0x40(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rdi
call   1030 <_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv@plt>
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x50(%rbp),%rax
jbe    118c <_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv+0x5c>
jmp    1191 <_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv+0x61>
jmp    1198 <_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv+0x68>
mov    $0x0,%al
call   1050 <_ZSt17__throw_bad_allocv@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <_Znwm@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv>:
push   %rbx
mov    %rsi,%rbx
call   1030 <_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv@plt>
cmp    %rbx,%rax
jae    1145 <_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv+0x15>
xor    %eax,%eax
call   1050 <_ZSt17__throw_bad_allocv@plt>
shl    $0x3,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <_Znwm@plt>

LLVM IR (-O0):
%struct.l_class_OC_DummyStream = type { i32 }
define i32** @_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv(%struct.l_class_OC_DummyStream* %0, i64 %1, i8* %2) {
%4 = alloca %struct.l_class_OC_DummyStream*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32**
%8 = alloca %struct.l_class_OC_DummyStream*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca %struct.l_class_OC_DummyStream*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i8*
%16 = alloca i32**
store %struct.l_class_OC_DummyStream* %0, %struct.l_class_OC_DummyStream** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%17 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %4
store %struct.l_class_OC_DummyStream* %17, %struct.l_class_OC_DummyStream** %8
%18 = load i64, i64* %5
store i64 %18, i64* %9
%19 = load i8*, i8** %6
store i8* %19, i8** %10
%20 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %8
store %struct.l_class_OC_DummyStream* %20, %struct.l_class_OC_DummyStream** %11
%21 = load i64, i64* %9
store i64 %21, i64* %12
%22 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %11
%23 = call i64 @_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(%struct.l_class_OC_DummyStream* %22)
store i64 %23, i64* %13
%24 = load i64, i64* %12
%25 = load i64, i64* %13
%26 = icmp ugt i64 %24, %25
br i1 %26, label %27, label %28
27: ; preds = %3
br label %29
28: ; preds = %3
br label %31
29: ; preds = %27
%30 = call i32 (...) @_ZSt17__throw_bad_allocv()
br label %31
31: ; preds = %29, %28
%32 = load i64, i64* %9
store i64 %32, i64* %14
%33 = load i64, i64* %14
%34 = mul i64 %33, 8
%35 = call i8* @_Znwm(i64 %34)
store i8* %35, i8** %15
%36 = load i8*, i8** %15
%37 = bitcast i8* %36 to i32**
store i32** %37, i32*** %7
%38 = load i32**, i32*** %7
store i32** %38, i32*** %16
%39 = load i32**, i32*** %16
ret i32** %39
}

LLVM IR (-O2):
%struct.l_class_OC_DummyStream = type { i32 }
define i32** @_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv(%struct.l_class_OC_DummyStream* %0, i64 %1, i8* nocapture readnone %2) {
%4 = tail call i64 @_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(%struct.l_class_OC_DummyStream* %0)
%5 = icmp ult i64 %4, %1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @_ZSt17__throw_bad_allocv()
br label %8
8: ; preds = %3, %6
%9 = shl i64 %1, 3
%10 = tail call i8* @_Znwm(i64 %9)
%11 = bitcast i8* %10 to i32**
ret i32** %11
}