// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/ibperfcli.c
// Function: test_ibperf
int
test_ibperf(const int argc, char ** const argv)
{
  if (argc < 6 || (strcmp(argv[0], "api") != 0)) {
    return -1;
  }
  const u64 pid = strtoull(argv[1], NULL, 10);
  char * const host = argv[2];
  const int pn = atoi(argv[3]);
  const u64 depth = strtoull(argv[4], NULL, 10);
  const u64 unit = strtoull(argv[5], NULL, 10);

  char *pref[64] = {};
  for (int i = 0; i < 6; i++) {
    pref[i] = argv[i];
  }
  pref[6] = NULL;

  struct worker_info wi = {};
  wi.port = ib_port_create(pid);
  wi.host = host;
  wi.pn = pn;
  wi.depth = depth;
  wi.unit = unit;

  struct pass_info pi = {};
  pi.api = &wi;
  pi.vctr_size = 1;
  pi.wf = ibperf_worker;
  pi.af = ibperf_analyze;

  const int n2 = maptest_passes(argc - 6, argv + 6, pref, &pi);
  ib_port_destroy(wi.port);
  if (n2 < 0) {
    return n2;
  }
  return 6 + n2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x6, -0x8(%rbp)
jl 0x6820
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x157fa(%rip), %rsi     # 0x1c010
callq 0x6490
cmpl $0x0, %eax
je 0x682c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x69de
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x6560
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x63c0
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x6560
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x6560
movq %rax, -0x38(%rbp)
leaq -0x240(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x6080
movl $0x0, -0x244(%rbp)
cmpl $0x6, -0x244(%rbp)
jge 0x68eb
movq -0x10(%rbp), %rax
movslq -0x244(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movslq -0x244(%rbp), %rax
movq %rcx, -0x240(%rbp,%rax,8)
movl -0x244(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x244(%rbp)
jmp 0x68b3
movq $0x0, -0x210(%rbp)
leaq -0x270(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x6080
movq -0x18(%rbp), %rdi
callq 0x1a210
movq %rax, -0x270(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x268(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x260(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x250(%rbp)
leaq -0x298(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x6080
leaq -0x270(%rbp), %rax
movq %rax, -0x290(%rbp)
movq $0x1, -0x288(%rbp)
leaq 0x7a(%rip), %rax        # 0x69f0
movq %rax, -0x280(%rbp)
leaq 0x4cc(%rip), %rax       # 0x6e50
movq %rax, -0x278(%rbp)
movl -0x8(%rbp), %edi
subl $0x6, %edi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq -0x240(%rbp), %rdx
leaq -0x298(%rbp), %rcx
callq 0x173e0
movl %eax, -0x29c(%rbp)
movq -0x270(%rbp), %rdi
callq 0x1a3c0
cmpl $0x0, -0x29c(%rbp)
jge 0x69d2
movl -0x29c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x69de
movl -0x29c(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
nopw (%rax,%rax)