#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 */
typedef struct TYPE_6__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ hwloc_topology_t;
typedef TYPE_1__ *hwloc_obj_t;
typedef int /*<<< orphan*/ hwloc_bitmap_t;
struct TYPE_6__ {
  int /*<<< orphan*/ cpuset;
};

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ hwloc_bitmap_alloc();
int /*<<< orphan*/ hwloc_bitmap_andnot(int /*<<< orphan*/, int /*<<< orphan*/,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ hwloc_bitmap_free(int /*<<< orphan*/);
int hwloc_bitmap_iszero(int /*<<< orphan*/);
int /*<<< orphan*/ hwloc_bitmap_sscanf(int /*<<< orphan*/, char *);
TYPE_1__ *hwloc_get_first_largest_obj_inside_cpuset(int /*<<< orphan*/,
                                                    int /*<<< orphan*/);
int hwloc_get_largest_objs_inside_cpuset(int /*<<< orphan*/, int /*<<< orphan*/,
                                         TYPE_1__ **, int);
int hwloc_get_nbobjs_by_depth(int /*<<< orphan*/, unsigned int);
TYPE_1__ *hwloc_get_obj_by_depth(int /*<<< orphan*/, int, int);
TYPE_1__ *hwloc_get_root_obj(int /*<<< orphan*/);
int /*<<< orphan*/ hwloc_topology_destroy(int /*<<< orphan*/);
unsigned int hwloc_topology_get_depth(int /*<<< orphan*/);
int /*<<< orphan*/ hwloc_topology_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ hwloc_topology_load(int /*<<< orphan*/);
int /*<<< orphan*/ hwloc_topology_set_synthetic(int /*<<< orphan*/, char *);
int main(void) {
  hwloc_topology_t topology;
  unsigned depth;
  hwloc_obj_t objs[16];
  hwloc_obj_t obj;
  hwloc_bitmap_t set;
  int ret;
  hwloc_topology_init(&topology);
  hwloc_topology_set_synthetic(topology, "6 5 4 3 2");
  hwloc_topology_load(topology);
  depth = hwloc_topology_get_depth(topology);
  obj = hwloc_get_root_obj(topology);
  ret = hwloc_get_largest_objs_inside_cpuset(topology, obj->cpuset, objs, 1);
  assert(ret == 1);
  assert(objs[0] == obj);
  objs[0] = hwloc_get_first_largest_obj_inside_cpuset(topology, obj->cpuset);
  assert(objs[0] == obj);
  obj = hwloc_get_obj_by_depth(
      topology, depth - 1, hwloc_get_nbobjs_by_depth(topology, depth - 1) - 1);
  ret = hwloc_get_largest_objs_inside_cpuset(topology, obj->cpuset, objs, 1);
  assert(ret == 1);
  assert(objs[0] == obj);
  set = hwloc_bitmap_alloc();
  ret = hwloc_get_largest_objs_inside_cpuset(topology, set, objs, 1);
  assert(ret == 0);
  objs[0] = hwloc_get_first_largest_obj_inside_cpuset(topology, set);
  assert(objs[0] == NULL);
  hwloc_bitmap_free(set);
  set = hwloc_bitmap_alloc();
  hwloc_bitmap_sscanf(set, "10000,,,,,,,,,,,,,,,,,,,,,,0");
  ret = hwloc_get_largest_objs_inside_cpuset(topology, set, objs, 1);
  assert(ret == -1);
  objs[0] = hwloc_get_first_largest_obj_inside_cpuset(topology, set);
  assert(objs[0] == NULL);
  hwloc_bitmap_free(set);
  set = hwloc_bitmap_alloc();
  hwloc_bitmap_sscanf(set, "8000,,,,,,,,,,,,,,,,,,,,,,1");
  ret = hwloc_get_largest_objs_inside_cpuset(topology, set, objs, 1);
  assert(ret == 1);
  assert(objs[0] == hwloc_get_obj_by_depth(topology, depth - 1, 0));
  objs[0] = hwloc_get_first_largest_obj_inside_cpuset(topology, set);
  assert(objs[0] == hwloc_get_obj_by_depth(topology, depth - 1, 0));
  ret = hwloc_get_largest_objs_inside_cpuset(topology, set, objs, 2);
  assert(ret == 2);
  assert(objs[0] == hwloc_get_obj_by_depth(topology, depth - 1, 0));
  assert(objs[1] == hwloc_get_obj_by_depth(
                        topology, depth - 1,
                        hwloc_get_nbobjs_by_depth(topology, depth - 1) - 1));
  objs[0] = hwloc_get_first_largest_obj_inside_cpuset(topology, set);
  hwloc_bitmap_andnot(set, set, objs[0]->cpuset);
  objs[1] = hwloc_get_first_largest_obj_inside_cpuset(topology, set);
  hwloc_bitmap_andnot(set, set, objs[1]->cpuset);
  objs[2] = hwloc_get_first_largest_obj_inside_cpuset(topology, set);
  assert(objs[0] == hwloc_get_obj_by_depth(topology, depth - 1, 0));
  assert(objs[1] == hwloc_get_obj_by_depth(
                        topology, depth - 1,
                        hwloc_get_nbobjs_by_depth(topology, depth - 1) - 1));
  assert(objs[2] == NULL);
  assert(hwloc_bitmap_iszero(set));
  hwloc_bitmap_free(set);
  set = hwloc_bitmap_alloc();
  hwloc_bitmap_sscanf(set, "07ff,ffffffff,e0000000");
  ret = hwloc_get_largest_objs_inside_cpuset(topology, set, objs, 16);
  assert(objs[0] == hwloc_get_obj_by_depth(topology, 5, 29));
  assert(objs[1] == hwloc_get_obj_by_depth(topology, 3, 5));
  assert(objs[2] == hwloc_get_obj_by_depth(topology, 3, 6));
  assert(objs[3] == hwloc_get_obj_by_depth(topology, 3, 7));
  assert(objs[4] == hwloc_get_obj_by_depth(topology, 2, 2));
  assert(objs[5] == hwloc_get_obj_by_depth(topology, 4, 36));
  assert(objs[6] == hwloc_get_obj_by_depth(topology, 5, 74));
  hwloc_bitmap_free(set);
  hwloc_topology_destroy(topology);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1080 <hwloc_topology_init@plt>
mov    -0x8(%rbp),%edi
lea    0xddb(%rip),%rsi
call   10d0 <hwloc_topology_set_synthetic@plt>
mov    -0x8(%rbp),%edi
call   1090 <hwloc_topology_load@plt>
mov    -0x8(%rbp),%edi
call   10a0 <hwloc_topology_get_depth@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1100 <hwloc_get_root_obj@plt>
mov    %rax,-0x98(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x98(%rbp),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
mov    %eax,-0xa0(%rbp)
cmpl   $0x1,-0xa0(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x90(%rbp),%rax
cmp    -0x98(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x98(%rbp),%rax
mov    (%rax),%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
cmp    -0x98(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x120(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x11c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   10c0 <hwloc_get_nbobjs_by_depth@plt>
mov    -0x120(%rbp),%edi
mov    -0x11c(%rbp),%esi
mov    %eax,%edx
sub    $0x1,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,-0x98(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x98(%rbp),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
mov    %eax,-0xa0(%rbp)
cmpl   $0x1,-0xa0(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x90(%rbp),%rax
cmp    -0x98(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    $0x0,%al
call   1040 <hwloc_bitmap_alloc@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
lea    -0x90(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
mov    %eax,-0xa0(%rbp)
cmpl   $0x0,-0xa0(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,-0x90(%rbp)
cmpq   $0x0,-0x90(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x9c(%rbp),%edi
call   1060 <hwloc_bitmap_free@plt>
mov    $0x0,%al
call   1040 <hwloc_bitmap_alloc@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%edi
lea    0xc17(%rip),%rsi
call   10e0 <hwloc_bitmap_sscanf@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
lea    -0x90(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
mov    %eax,-0xa0(%rbp)
cmpl   $0xffffffff,-0xa0(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,-0x90(%rbp)
cmpq   $0x0,-0x90(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x9c(%rbp),%edi
call   1060 <hwloc_bitmap_free@plt>
mov    $0x0,%al
call   1040 <hwloc_bitmap_alloc@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%edi
lea    0xbac(%rip),%rsi
call   10e0 <hwloc_bitmap_sscanf@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
lea    -0x90(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
mov    %eax,-0xa0(%rbp)
cmpl   $0x1,-0xa0(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x90(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
xor    %edx,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0x118(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
xor    %edx,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0x110(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
lea    -0x90(%rbp),%rdx
mov    $0x2,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
mov    %eax,-0xa0(%rbp)
cmpl   $0x2,-0xa0(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x90(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
xor    %edx,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0x108(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x88(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x100(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xfc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   10c0 <hwloc_get_nbobjs_by_depth@plt>
mov    -0x100(%rbp),%edi
mov    -0xfc(%rbp),%esi
mov    %eax,%edx
sub    $0x1,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xf8(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,-0x90(%rbp)
mov    -0x9c(%rbp),%edi
mov    -0x9c(%rbp),%esi
mov    -0x90(%rbp),%rax
mov    (%rax),%edx
call   10f0 <hwloc_bitmap_andnot@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,-0x88(%rbp)
mov    -0x9c(%rbp),%edi
mov    -0x9c(%rbp),%esi
mov    -0x88(%rbp),%rax
mov    (%rax),%edx
call   10f0 <hwloc_bitmap_andnot@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,-0x80(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
xor    %edx,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xf0(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x88(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xe8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xe4(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   10c0 <hwloc_get_nbobjs_by_depth@plt>
mov    -0xe8(%rbp),%edi
mov    -0xe4(%rbp),%esi
mov    %eax,%edx
sub    $0x1,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xe0(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
cmpq   $0x0,-0x80(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x9c(%rbp),%edi
call   1070 <hwloc_bitmap_iszero@plt>
mov    %eax,%edi
call   10b0 <assert@plt>
mov    -0x9c(%rbp),%edi
call   1060 <hwloc_bitmap_free@plt>
mov    $0x0,%al
call   1040 <hwloc_bitmap_alloc@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%edi
lea    0x8eb(%rip),%rsi
call   10e0 <hwloc_bitmap_sscanf@plt>
mov    -0x8(%rbp),%edi
mov    -0x9c(%rbp),%esi
lea    -0x90(%rbp),%rdx
mov    $0x10,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
mov    %eax,-0xa0(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
mov    $0x1d,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xd8(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x88(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
mov    $0x5,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xd0(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x80(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
mov    $0x6,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xc8(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x78(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
mov    $0x7,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xc0(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x70(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x2,%edx
mov    %edx,%esi
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xb8(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x68(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x4,%esi
mov    $0x24,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xb0(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x60(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
mov    $0x4a,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rcx
mov    -0xa8(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x9c(%rbp),%edi
call   1060 <hwloc_bitmap_free@plt>
mov    -0x8(%rbp),%edi
call   1110 <hwloc_topology_destroy@plt>
mov    0x26c5(%rip),%rax
mov    (%rax),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x90,%rsp
lea    0xc(%rsp),%rdi
call   1080 <hwloc_topology_init@plt>
mov    0xc(%rsp),%edi
lea    0xddc(%rip),%rsi
call   10d0 <hwloc_topology_set_synthetic@plt>
mov    0xc(%rsp),%edi
call   1090 <hwloc_topology_load@plt>
mov    0xc(%rsp),%edi
call   10a0 <hwloc_topology_get_depth@plt>
mov    %eax,%r15d
mov    0xc(%rsp),%edi
call   1100 <hwloc_get_root_obj@plt>
mov    %rax,%rbx
mov    0xc(%rsp),%edi
mov    (%rax),%esi
lea    0x10(%rsp),%r14
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   10b0 <assert@plt>
xor    %edi,%edi
cmp    %rbx,0x10(%rsp)
sete   %dil
call   10b0 <assert@plt>
mov    0xc(%rsp),%edi
mov    (%rbx),%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,0x10(%rsp)
xor    %edi,%edi
cmp    %rbx,%rax
sete   %dil
call   10b0 <assert@plt>
mov    0xc(%rsp),%ebx
add    $0xffffffff,%r15d
mov    %ebx,%edi
mov    %r15d,%esi
call   10c0 <hwloc_get_nbobjs_by_depth@plt>
lea    -0x1(%rax),%edx
mov    %ebx,%edi
mov    %r15d,%esi
call   1050 <hwloc_get_obj_by_depth@plt>
mov    %rax,%rbx
mov    0xc(%rsp),%edi
mov    (%rax),%esi
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   10b0 <assert@plt>
xor    %edi,%edi
cmp    %rbx,0x10(%rsp)
sete   %dil
call   10b0 <assert@plt>
xor    %eax,%eax
call   1040 <hwloc_bitmap_alloc@plt>
mov    %eax,%ebx
mov    0xc(%rsp),%edi
mov    %eax,%esi
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   10b0 <assert@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,0x10(%rsp)
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   10b0 <assert@plt>
mov    %ebx,%edi
call   1060 <hwloc_bitmap_free@plt>
xor    %eax,%eax
call   1040 <hwloc_bitmap_alloc@plt>
mov    %eax,%ebx
lea    0xcbb(%rip),%rsi
mov    %eax,%edi
call   10e0 <hwloc_bitmap_sscanf@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   10b0 <assert@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,0x10(%rsp)
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   10b0 <assert@plt>
mov    %ebx,%edi
call   1060 <hwloc_bitmap_free@plt>
xor    %eax,%eax
call   1040 <hwloc_bitmap_alloc@plt>
mov    %eax,%ebx
lea    0xc7b(%rip),%rsi
mov    %eax,%edi
call   10e0 <hwloc_bitmap_sscanf@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   10b0 <assert@plt>
mov    0x10(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    %r15d,%esi
xor    %edx,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,%rbp
mov    %rax,0x10(%rsp)
mov    0xc(%rsp),%edi
mov    %r15d,%esi
xor    %edx,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    $0x2,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   10b0 <assert@plt>
mov    0x10(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    %r15d,%esi
xor    %edx,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0x18(%rsp),%r12
mov    0xc(%rsp),%ebp
mov    %ebp,%edi
mov    %r15d,%esi
call   10c0 <hwloc_get_nbobjs_by_depth@plt>
lea    -0x1(%rax),%edx
mov    %ebp,%edi
mov    %r15d,%esi
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%r12
sete   %dil
call   10b0 <assert@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,0x10(%rsp)
mov    (%rax),%edx
mov    %ebx,%edi
mov    %ebx,%esi
call   10f0 <hwloc_bitmap_andnot@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,0x18(%rsp)
mov    (%rax),%edx
mov    %ebx,%edi
mov    %ebx,%esi
call   10f0 <hwloc_bitmap_andnot@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
call   1120 <hwloc_get_first_largest_obj_inside_cpuset@plt>
mov    %rax,0x20(%rsp)
mov    0x10(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    %r15d,%esi
xor    %edx,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0x18(%rsp),%r12
mov    0xc(%rsp),%ebp
mov    %ebp,%edi
mov    %r15d,%esi
call   10c0 <hwloc_get_nbobjs_by_depth@plt>
lea    -0x1(%rax),%edx
mov    %ebp,%edi
mov    %r15d,%esi
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%r12
sete   %dil
call   10b0 <assert@plt>
xor    %edi,%edi
cmpq   $0x0,0x20(%rsp)
sete   %dil
call   10b0 <assert@plt>
mov    %ebx,%edi
call   1070 <hwloc_bitmap_iszero@plt>
mov    %eax,%edi
call   10b0 <assert@plt>
mov    %ebx,%edi
call   1060 <hwloc_bitmap_free@plt>
xor    %eax,%eax
call   1040 <hwloc_bitmap_alloc@plt>
mov    %eax,%ebx
lea    0xae4(%rip),%rsi
mov    %eax,%edi
call   10e0 <hwloc_bitmap_sscanf@plt>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    $0x10,%ecx
call   1030 <hwloc_get_largest_objs_inside_cpuset@plt>
mov    0x10(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    $0x5,%esi
mov    $0x1d,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0x18(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    $0x3,%esi
mov    $0x5,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0x20(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    $0x3,%esi
mov    $0x6,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0x28(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    $0x3,%esi
mov    $0x7,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0x30(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    $0x2,%esi
mov    $0x2,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0x38(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    $0x4,%esi
mov    $0x24,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    0x40(%rsp),%rbp
mov    0xc(%rsp),%edi
mov    $0x5,%esi
mov    $0x4a,%edx
call   1050 <hwloc_get_obj_by_depth@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   10b0 <assert@plt>
mov    %ebx,%edi
call   1060 <hwloc_bitmap_free@plt>
mov    0xc(%rsp),%edi
call   1110 <hwloc_topology_destroy@plt>
mov    0x2946(%rip),%rax
mov    (%rax),%eax
add    $0x90,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_6__ = type { i32 }
@.str = [10 x i8] c"6 5 4 3 2\00"
@.str.1 = [29 x i8] c"10000,,,,,,,,,,,,,,,,,,,,,,0\00"
@.str.2 = [28 x i8] c"8000,,,,,,,,,,,,,,,,,,,,,,1\00"
@.str.3 = [23 x i8] c"07ff,ffffffff,e0000000\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [16 x %struct.TYPE_6__*]
%5 = alloca %struct.TYPE_6__*
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @hwloc_topology_init(i32* %2)
%9 = load i32, i32* %2
%10 = call i32 @hwloc_topology_set_synthetic(i32 %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = call i32 @hwloc_topology_load(i32 %11)
%13 = load i32, i32* %2
%14 = call i32 @hwloc_topology_get_depth(i32 %13)
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = call %struct.TYPE_6__* @hwloc_get_root_obj(i32 %15)
store %struct.TYPE_6__* %16, %struct.TYPE_6__** %5
%17 = load i32, i32* %2
%18 = load %struct.TYPE_6__*, %struct.TYPE_6__** %5
%19 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %18, i32 0, i32 0
%20 = load i32, i32* %19
%21 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%22 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %17, i32 %20, %struct.TYPE_6__** %21, i32 1)
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = icmp eq i32 %23, 1
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%28 = load %struct.TYPE_6__*, %struct.TYPE_6__** %27
%29 = load %struct.TYPE_6__*, %struct.TYPE_6__** %5
%30 = icmp eq %struct.TYPE_6__* %28, %29
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = load i32, i32* %2
%34 = load %struct.TYPE_6__*, %struct.TYPE_6__** %5
%35 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %34, i32 0, i32 0
%36 = load i32, i32* %35
%37 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %33, i32 %36)
%38 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
store %struct.TYPE_6__* %37, %struct.TYPE_6__** %38
%39 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%40 = load %struct.TYPE_6__*, %struct.TYPE_6__** %39
%41 = load %struct.TYPE_6__*, %struct.TYPE_6__** %5
%42 = icmp eq %struct.TYPE_6__* %40, %41
%43 = zext i1 %42 to i32
%44 = call i32 @assert(i32 %43)
%45 = load i32, i32* %2
%46 = load i32, i32* %3
%47 = sub i32 %46, 1
%48 = load i32, i32* %2
%49 = load i32, i32* %3
%50 = sub i32 %49, 1
%51 = call i32 @hwloc_get_nbobjs_by_depth(i32 %48, i32 %50)
%52 = sub nsw i32 %51, 1
%53 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %45, i32 %47, i32 %52)
store %struct.TYPE_6__* %53, %struct.TYPE_6__** %5
%54 = load i32, i32* %2
%55 = load %struct.TYPE_6__*, %struct.TYPE_6__** %5
%56 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %55, i32 0, i32 0
%57 = load i32, i32* %56
%58 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%59 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %54, i32 %57, %struct.TYPE_6__** %58, i32 1)
store i32 %59, i32* %7
%60 = load i32, i32* %7
%61 = icmp eq i32 %60, 1
%62 = zext i1 %61 to i32
%63 = call i32 @assert(i32 %62)
%64 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%65 = load %struct.TYPE_6__*, %struct.TYPE_6__** %64
%66 = load %struct.TYPE_6__*, %struct.TYPE_6__** %5
%67 = icmp eq %struct.TYPE_6__* %65, %66
%68 = zext i1 %67 to i32
%69 = call i32 @assert(i32 %68)
%70 = call i32 (...) @hwloc_bitmap_alloc()
store i32 %70, i32* %6
%71 = load i32, i32* %2
%72 = load i32, i32* %6
%73 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%74 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %71, i32 %72, %struct.TYPE_6__** %73, i32 1)
store i32 %74, i32* %7
%75 = load i32, i32* %7
%76 = icmp eq i32 %75, 0
%77 = zext i1 %76 to i32
%78 = call i32 @assert(i32 %77)
%79 = load i32, i32* %2
%80 = load i32, i32* %6
%81 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %79, i32 %80)
%82 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
store %struct.TYPE_6__* %81, %struct.TYPE_6__** %82
%83 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%84 = load %struct.TYPE_6__*, %struct.TYPE_6__** %83
%85 = icmp eq %struct.TYPE_6__* %84, null
%86 = zext i1 %85 to i32
%87 = call i32 @assert(i32 %86)
%88 = load i32, i32* %6
%89 = call i32 @hwloc_bitmap_free(i32 %88)
%90 = call i32 (...) @hwloc_bitmap_alloc()
store i32 %90, i32* %6
%91 = load i32, i32* %6
%92 = call i32 @hwloc_bitmap_sscanf(i32 %91, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%93 = load i32, i32* %2
%94 = load i32, i32* %6
%95 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%96 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %93, i32 %94, %struct.TYPE_6__** %95, i32 1)
store i32 %96, i32* %7
%97 = load i32, i32* %7
%98 = icmp eq i32 %97, -1
%99 = zext i1 %98 to i32
%100 = call i32 @assert(i32 %99)
%101 = load i32, i32* %2
%102 = load i32, i32* %6
%103 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %101, i32 %102)
%104 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
store %struct.TYPE_6__* %103, %struct.TYPE_6__** %104
%105 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%106 = load %struct.TYPE_6__*, %struct.TYPE_6__** %105
%107 = icmp eq %struct.TYPE_6__* %106, null
%108 = zext i1 %107 to i32
%109 = call i32 @assert(i32 %108)
%110 = load i32, i32* %6
%111 = call i32 @hwloc_bitmap_free(i32 %110)
%112 = call i32 (...) @hwloc_bitmap_alloc()
store i32 %112, i32* %6
%113 = load i32, i32* %6
%114 = call i32 @hwloc_bitmap_sscanf(i32 %113, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%115 = load i32, i32* %2
%116 = load i32, i32* %6
%117 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%118 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %115, i32 %116, %struct.TYPE_6__** %117, i32 1)
store i32 %118, i32* %7
%119 = load i32, i32* %7
%120 = icmp eq i32 %119, 1
%121 = zext i1 %120 to i32
%122 = call i32 @assert(i32 %121)
%123 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%124 = load %struct.TYPE_6__*, %struct.TYPE_6__** %123
%125 = load i32, i32* %2
%126 = load i32, i32* %3
%127 = sub i32 %126, 1
%128 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %125, i32 %127, i32 0)
%129 = icmp eq %struct.TYPE_6__* %124, %128
%130 = zext i1 %129 to i32
%131 = call i32 @assert(i32 %130)
%132 = load i32, i32* %2
%133 = load i32, i32* %6
%134 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %132, i32 %133)
%135 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
store %struct.TYPE_6__* %134, %struct.TYPE_6__** %135
%136 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%137 = load %struct.TYPE_6__*, %struct.TYPE_6__** %136
%138 = load i32, i32* %2
%139 = load i32, i32* %3
%140 = sub i32 %139, 1
%141 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %138, i32 %140, i32 0)
%142 = icmp eq %struct.TYPE_6__* %137, %141
%143 = zext i1 %142 to i32
%144 = call i32 @assert(i32 %143)
%145 = load i32, i32* %2
%146 = load i32, i32* %6
%147 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%148 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %145, i32 %146, %struct.TYPE_6__** %147, i32 2)
store i32 %148, i32* %7
%149 = load i32, i32* %7
%150 = icmp eq i32 %149, 2
%151 = zext i1 %150 to i32
%152 = call i32 @assert(i32 %151)
%153 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%154 = load %struct.TYPE_6__*, %struct.TYPE_6__** %153
%155 = load i32, i32* %2
%156 = load i32, i32* %3
%157 = sub i32 %156, 1
%158 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %155, i32 %157, i32 0)
%159 = icmp eq %struct.TYPE_6__* %154, %158
%160 = zext i1 %159 to i32
%161 = call i32 @assert(i32 %160)
%162 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 1
%163 = load %struct.TYPE_6__*, %struct.TYPE_6__** %162
%164 = load i32, i32* %2
%165 = load i32, i32* %3
%166 = sub i32 %165, 1
%167 = load i32, i32* %2
%168 = load i32, i32* %3
%169 = sub i32 %168, 1
%170 = call i32 @hwloc_get_nbobjs_by_depth(i32 %167, i32 %169)
%171 = sub nsw i32 %170, 1
%172 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %164, i32 %166, i32 %171)
%173 = icmp eq %struct.TYPE_6__* %163, %172
%174 = zext i1 %173 to i32
%175 = call i32 @assert(i32 %174)
%176 = load i32, i32* %2
%177 = load i32, i32* %6
%178 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %176, i32 %177)
%179 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
store %struct.TYPE_6__* %178, %struct.TYPE_6__** %179
%180 = load i32, i32* %6
%181 = load i32, i32* %6
%182 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%183 = load %struct.TYPE_6__*, %struct.TYPE_6__** %182
%184 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %183, i32 0, i32 0
%185 = load i32, i32* %184
%186 = call i32 @hwloc_bitmap_andnot(i32 %180, i32 %181, i32 %185)
%187 = load i32, i32* %2
%188 = load i32, i32* %6
%189 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %187, i32 %188)
%190 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 1
store %struct.TYPE_6__* %189, %struct.TYPE_6__** %190
%191 = load i32, i32* %6
%192 = load i32, i32* %6
%193 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 1
%194 = load %struct.TYPE_6__*, %struct.TYPE_6__** %193
%195 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %194, i32 0, i32 0
%196 = load i32, i32* %195
%197 = call i32 @hwloc_bitmap_andnot(i32 %191, i32 %192, i32 %196)
%198 = load i32, i32* %2
%199 = load i32, i32* %6
%200 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %198, i32 %199)
%201 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 2
store %struct.TYPE_6__* %200, %struct.TYPE_6__** %201
%202 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%203 = load %struct.TYPE_6__*, %struct.TYPE_6__** %202
%204 = load i32, i32* %2
%205 = load i32, i32* %3
%206 = sub i32 %205, 1
%207 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %204, i32 %206, i32 0)
%208 = icmp eq %struct.TYPE_6__* %203, %207
%209 = zext i1 %208 to i32
%210 = call i32 @assert(i32 %209)
%211 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 1
%212 = load %struct.TYPE_6__*, %struct.TYPE_6__** %211
%213 = load i32, i32* %2
%214 = load i32, i32* %3
%215 = sub i32 %214, 1
%216 = load i32, i32* %2
%217 = load i32, i32* %3
%218 = sub i32 %217, 1
%219 = call i32 @hwloc_get_nbobjs_by_depth(i32 %216, i32 %218)
%220 = sub nsw i32 %219, 1
%221 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %213, i32 %215, i32 %220)
%222 = icmp eq %struct.TYPE_6__* %212, %221
%223 = zext i1 %222 to i32
%224 = call i32 @assert(i32 %223)
%225 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 2
%226 = load %struct.TYPE_6__*, %struct.TYPE_6__** %225
%227 = icmp eq %struct.TYPE_6__* %226, null
%228 = zext i1 %227 to i32
%229 = call i32 @assert(i32 %228)
%230 = load i32, i32* %6
%231 = call i32 @hwloc_bitmap_iszero(i32 %230)
%232 = call i32 @assert(i32 %231)
%233 = load i32, i32* %6
%234 = call i32 @hwloc_bitmap_free(i32 %233)
%235 = call i32 (...) @hwloc_bitmap_alloc()
store i32 %235, i32* %6
%236 = load i32, i32* %6
%237 = call i32 @hwloc_bitmap_sscanf(i32 %236, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%238 = load i32, i32* %2
%239 = load i32, i32* %6
%240 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%241 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %238, i32 %239, %struct.TYPE_6__** %240, i32 16)
store i32 %241, i32* %7
%242 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 0
%243 = load %struct.TYPE_6__*, %struct.TYPE_6__** %242
%244 = load i32, i32* %2
%245 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %244, i32 5, i32 29)
%246 = icmp eq %struct.TYPE_6__* %243, %245
%247 = zext i1 %246 to i32
%248 = call i32 @assert(i32 %247)
%249 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 1
%250 = load %struct.TYPE_6__*, %struct.TYPE_6__** %249
%251 = load i32, i32* %2
%252 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %251, i32 3, i32 5)
%253 = icmp eq %struct.TYPE_6__* %250, %252
%254 = zext i1 %253 to i32
%255 = call i32 @assert(i32 %254)
%256 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 2
%257 = load %struct.TYPE_6__*, %struct.TYPE_6__** %256
%258 = load i32, i32* %2
%259 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %258, i32 3, i32 6)
%260 = icmp eq %struct.TYPE_6__* %257, %259
%261 = zext i1 %260 to i32
%262 = call i32 @assert(i32 %261)
%263 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 3
%264 = load %struct.TYPE_6__*, %struct.TYPE_6__** %263
%265 = load i32, i32* %2
%266 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %265, i32 3, i32 7)
%267 = icmp eq %struct.TYPE_6__* %264, %266
%268 = zext i1 %267 to i32
%269 = call i32 @assert(i32 %268)
%270 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 4
%271 = load %struct.TYPE_6__*, %struct.TYPE_6__** %270
%272 = load i32, i32* %2
%273 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %272, i32 2, i32 2)
%274 = icmp eq %struct.TYPE_6__* %271, %273
%275 = zext i1 %274 to i32
%276 = call i32 @assert(i32 %275)
%277 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 5
%278 = load %struct.TYPE_6__*, %struct.TYPE_6__** %277
%279 = load i32, i32* %2
%280 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %279, i32 4, i32 36)
%281 = icmp eq %struct.TYPE_6__* %278, %280
%282 = zext i1 %281 to i32
%283 = call i32 @assert(i32 %282)
%284 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %4, i64 0, i64 6
%285 = load %struct.TYPE_6__*, %struct.TYPE_6__** %284
%286 = load i32, i32* %2
%287 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %286, i32 5, i32 74)
%288 = icmp eq %struct.TYPE_6__* %285, %287
%289 = zext i1 %288 to i32
%290 = call i32 @assert(i32 %289)
%291 = load i32, i32* %6
%292 = call i32 @hwloc_bitmap_free(i32 %291)
%293 = load i32, i32* %2
%294 = call i32 @hwloc_topology_destroy(i32 %293)
%295 = load i32, i32* @EXIT_SUCCESS
ret i32 %295
}

LLVM IR (-O2):
%struct.TYPE_6__ = type { i32 }
@.str = [10 x i8] c"6 5 4 3 2\00"
@.str.1 = [29 x i8] c"10000,,,,,,,,,,,,,,,,,,,,,,0\00"
@.str.2 = [28 x i8] c"8000,,,,,,,,,,,,,,,,,,,,,,1\00"
@.str.3 = [23 x i8] c"07ff,ffffffff,e0000000\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x %struct.TYPE_6__*]
%3 = bitcast i32* %1 to i8*
%4 = bitcast [16 x %struct.TYPE_6__*]* %2 to i8*
%5 = call i32 @hwloc_topology_init(i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @hwloc_topology_set_synthetic(i32 %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %1
%9 = call i32 @hwloc_topology_load(i32 %8)
%10 = load i32, i32* %1
%11 = call i32 @hwloc_topology_get_depth(i32 %10)
%12 = load i32, i32* %1
%13 = call %struct.TYPE_6__* @hwloc_get_root_obj(i32 %12)
%14 = load i32, i32* %1
%15 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %13, i64 0, i32 0
%16 = load i32, i32* %15
%17 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %2, i64 0, i64 0
%18 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %14, i32 %16, %struct.TYPE_6__** %17, i32 1)
%19 = icmp eq i32 %18, 1
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = load %struct.TYPE_6__*, %struct.TYPE_6__** %17
%23 = icmp eq %struct.TYPE_6__* %22, %13
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = load i32, i32* %1
%27 = load i32, i32* %15
%28 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %26, i32 %27)
store %struct.TYPE_6__* %28, %struct.TYPE_6__** %17
%29 = icmp eq %struct.TYPE_6__* %28, %13
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = load i32, i32* %1
%33 = add i32 %11, -1
%34 = call i32 @hwloc_get_nbobjs_by_depth(i32 %32, i32 %33)
%35 = add nsw i32 %34, -1
%36 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %32, i32 %33, i32 %35)
%37 = load i32, i32* %1
%38 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %36, i64 0, i32 0
%39 = load i32, i32* %38
%40 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %37, i32 %39, %struct.TYPE_6__** %17, i32 1)
%41 = icmp eq i32 %40, 1
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42)
%44 = load %struct.TYPE_6__*, %struct.TYPE_6__** %17
%45 = icmp eq %struct.TYPE_6__* %44, %36
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46)
%48 = call i32 (...) @hwloc_bitmap_alloc()
%49 = load i32, i32* %1
%50 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %49, i32 %48, %struct.TYPE_6__** %17, i32 1)
%51 = icmp eq i32 %50, 0
%52 = zext i1 %51 to i32
%53 = call i32 @assert(i32 %52)
%54 = load i32, i32* %1
%55 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %54, i32 %48)
store %struct.TYPE_6__* %55, %struct.TYPE_6__** %17
%56 = icmp eq %struct.TYPE_6__* %55, null
%57 = zext i1 %56 to i32
%58 = call i32 @assert(i32 %57)
%59 = call i32 @hwloc_bitmap_free(i32 %48)
%60 = call i32 (...) @hwloc_bitmap_alloc()
%61 = call i32 @hwloc_bitmap_sscanf(i32 %60, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%62 = load i32, i32* %1
%63 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %62, i32 %60, %struct.TYPE_6__** %17, i32 1)
%64 = icmp eq i32 %63, -1
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i32, i32* %1
%68 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %67, i32 %60)
store %struct.TYPE_6__* %68, %struct.TYPE_6__** %17
%69 = icmp eq %struct.TYPE_6__* %68, null
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = call i32 @hwloc_bitmap_free(i32 %60)
%73 = call i32 (...) @hwloc_bitmap_alloc()
%74 = call i32 @hwloc_bitmap_sscanf(i32 %73, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%75 = load i32, i32* %1
%76 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %75, i32 %73, %struct.TYPE_6__** %17, i32 1)
%77 = icmp eq i32 %76, 1
%78 = zext i1 %77 to i32
%79 = call i32 @assert(i32 %78)
%80 = load %struct.TYPE_6__*, %struct.TYPE_6__** %17
%81 = load i32, i32* %1
%82 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %81, i32 %33, i32 0)
%83 = icmp eq %struct.TYPE_6__* %80, %82
%84 = zext i1 %83 to i32
%85 = call i32 @assert(i32 %84)
%86 = load i32, i32* %1
%87 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %86, i32 %73)
store %struct.TYPE_6__* %87, %struct.TYPE_6__** %17
%88 = load i32, i32* %1
%89 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %88, i32 %33, i32 0)
%90 = icmp eq %struct.TYPE_6__* %87, %89
%91 = zext i1 %90 to i32
%92 = call i32 @assert(i32 %91)
%93 = load i32, i32* %1
%94 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %93, i32 %73, %struct.TYPE_6__** %17, i32 2)
%95 = icmp eq i32 %94, 2
%96 = zext i1 %95 to i32
%97 = call i32 @assert(i32 %96)
%98 = load %struct.TYPE_6__*, %struct.TYPE_6__** %17
%99 = load i32, i32* %1
%100 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %99, i32 %33, i32 0)
%101 = icmp eq %struct.TYPE_6__* %98, %100
%102 = zext i1 %101 to i32
%103 = call i32 @assert(i32 %102)
%104 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %2, i64 0, i64 1
%105 = load %struct.TYPE_6__*, %struct.TYPE_6__** %104
%106 = load i32, i32* %1
%107 = call i32 @hwloc_get_nbobjs_by_depth(i32 %106, i32 %33)
%108 = add nsw i32 %107, -1
%109 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %106, i32 %33, i32 %108)
%110 = icmp eq %struct.TYPE_6__* %105, %109
%111 = zext i1 %110 to i32
%112 = call i32 @assert(i32 %111)
%113 = load i32, i32* %1
%114 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %113, i32 %73)
store %struct.TYPE_6__* %114, %struct.TYPE_6__** %17
%115 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %114, i64 0, i32 0
%116 = load i32, i32* %115
%117 = call i32 @hwloc_bitmap_andnot(i32 %73, i32 %73, i32 %116)
%118 = load i32, i32* %1
%119 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %118, i32 %73)
store %struct.TYPE_6__* %119, %struct.TYPE_6__** %104
%120 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %119, i64 0, i32 0
%121 = load i32, i32* %120
%122 = call i32 @hwloc_bitmap_andnot(i32 %73, i32 %73, i32 %121)
%123 = load i32, i32* %1
%124 = call %struct.TYPE_6__* @hwloc_get_first_largest_obj_inside_cpuset(i32 %123, i32 %73)
%125 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %2, i64 0, i64 2
store %struct.TYPE_6__* %124, %struct.TYPE_6__** %125
%126 = load %struct.TYPE_6__*, %struct.TYPE_6__** %17
%127 = load i32, i32* %1
%128 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %127, i32 %33, i32 0)
%129 = icmp eq %struct.TYPE_6__* %126, %128
%130 = zext i1 %129 to i32
%131 = call i32 @assert(i32 %130)
%132 = load %struct.TYPE_6__*, %struct.TYPE_6__** %104
%133 = load i32, i32* %1
%134 = call i32 @hwloc_get_nbobjs_by_depth(i32 %133, i32 %33)
%135 = add nsw i32 %134, -1
%136 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %133, i32 %33, i32 %135)
%137 = icmp eq %struct.TYPE_6__* %132, %136
%138 = zext i1 %137 to i32
%139 = call i32 @assert(i32 %138)
%140 = load %struct.TYPE_6__*, %struct.TYPE_6__** %125
%141 = icmp eq %struct.TYPE_6__* %140, null
%142 = zext i1 %141 to i32
%143 = call i32 @assert(i32 %142)
%144 = call i32 @hwloc_bitmap_iszero(i32 %73)
%145 = call i32 @assert(i32 %144)
%146 = call i32 @hwloc_bitmap_free(i32 %73)
%147 = call i32 (...) @hwloc_bitmap_alloc()
%148 = call i32 @hwloc_bitmap_sscanf(i32 %147, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%149 = load i32, i32* %1
%150 = call i32 @hwloc_get_largest_objs_inside_cpuset(i32 %149, i32 %147, %struct.TYPE_6__** %17, i32 16)
%151 = load %struct.TYPE_6__*, %struct.TYPE_6__** %17
%152 = load i32, i32* %1
%153 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %152, i32 5, i32 29)
%154 = icmp eq %struct.TYPE_6__* %151, %153
%155 = zext i1 %154 to i32
%156 = call i32 @assert(i32 %155)
%157 = load %struct.TYPE_6__*, %struct.TYPE_6__** %104
%158 = load i32, i32* %1
%159 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %158, i32 3, i32 5)
%160 = icmp eq %struct.TYPE_6__* %157, %159
%161 = zext i1 %160 to i32
%162 = call i32 @assert(i32 %161)
%163 = load %struct.TYPE_6__*, %struct.TYPE_6__** %125
%164 = load i32, i32* %1
%165 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %164, i32 3, i32 6)
%166 = icmp eq %struct.TYPE_6__* %163, %165
%167 = zext i1 %166 to i32
%168 = call i32 @assert(i32 %167)
%169 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %2, i64 0, i64 3
%170 = load %struct.TYPE_6__*, %struct.TYPE_6__** %169
%171 = load i32, i32* %1
%172 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %171, i32 3, i32 7)
%173 = icmp eq %struct.TYPE_6__* %170, %172
%174 = zext i1 %173 to i32
%175 = call i32 @assert(i32 %174)
%176 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %2, i64 0, i64 4
%177 = load %struct.TYPE_6__*, %struct.TYPE_6__** %176
%178 = load i32, i32* %1
%179 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %178, i32 2, i32 2)
%180 = icmp eq %struct.TYPE_6__* %177, %179
%181 = zext i1 %180 to i32
%182 = call i32 @assert(i32 %181)
%183 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %2, i64 0, i64 5
%184 = load %struct.TYPE_6__*, %struct.TYPE_6__** %183
%185 = load i32, i32* %1
%186 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %185, i32 4, i32 36)
%187 = icmp eq %struct.TYPE_6__* %184, %186
%188 = zext i1 %187 to i32
%189 = call i32 @assert(i32 %188)
%190 = getelementptr inbounds [16 x %struct.TYPE_6__*], [16 x %struct.TYPE_6__*]* %2, i64 0, i64 6
%191 = load %struct.TYPE_6__*, %struct.TYPE_6__** %190
%192 = load i32, i32* %1
%193 = call %struct.TYPE_6__* @hwloc_get_obj_by_depth(i32 %192, i32 5, i32 74)
%194 = icmp eq %struct.TYPE_6__* %191, %193
%195 = zext i1 %194 to i32
%196 = call i32 @assert(i32 %195)
%197 = call i32 @hwloc_bitmap_free(i32 %147)
%198 = load i32, i32* %1
%199 = call i32 @hwloc_topology_destroy(i32 %198)
%200 = load i32, i32* @EXIT_SUCCESS
ret i32 %200
}