	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rdmasniff_activate
_rdmasniff_activate:                    ## @rdmasniff_activate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	88(%rdi), %rbx
	movl	68(%rbx), %edi
	callq	_ibv_open_device
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	callq	_ibv_alloc_pd
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	8(%rbx), %rdi
	callq	_ibv_create_comp_channel
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	8(%rbx), %rdi
	movq	_RDMASNIFF_NUM_RECEIVES@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%edx, %edx
	movq	%rax, %rcx
	xorl	%r8d, %r8d
	callq	_ibv_create_cq
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_ibv_req_notify_cq
	leaq	-96(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	32(%rbx), %rax
	movq	%rax, -64(%rbp)
	movq	%rax, -56(%rbp)
	movl	(%r12), %eax
	movl	%eax, -72(%rbp)
	movl	$1, -68(%rbp)
	movq	_IBV_QPT_RAW_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	16(%rbx), %rdi
	movq	%r14, %rsi
	callq	_ibv_create_qp
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	leaq	-144(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_IBV_QPS_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -132(%rbp)
	movl	64(%rbx), %eax
	movl	%eax, -128(%rbp)
	movq	40(%rbx), %rdi
	movq	_IBV_QP_STATE@GOTPCREL(%rip), %r13
	movq	_IBV_QP_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r13), %edx
	movq	%r14, %rsi
	callq	_ibv_modify_qp
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_33
LBB0_1:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_33
LBB0_3:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_33
LBB0_5:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_33
LBB0_7:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_33
LBB0_9:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_33
LBB0_12:
	leaq	-144(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_IBV_QPS_RTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -132(%rbp)
	movq	40(%rbx), %rdi
	movl	(%r13), %edx
	movq	%r14, %rsi
	callq	_ibv_modify_qp
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
LBB0_33:
	callq	_pcap_snprintf
	movq	56(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_35
## %bb.34:
	callq	_ibv_dereg_mr
LBB0_35:
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_37
## %bb.36:
	callq	_ibv_destroy_flow
LBB0_37:
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_39
## %bb.38:
	callq	_ibv_destroy_qp
LBB0_39:
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_41
## %bb.40:
	callq	_ibv_destroy_cq
LBB0_41:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_43
## %bb.42:
	callq	_ibv_destroy_comp_channel
LBB0_43:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_45
## %bb.44:
	callq	_ibv_dealloc_pd
LBB0_45:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_47
## %bb.46:
	callq	_ibv_close_device
LBB0_47:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_49
## %bb.48:
	callq	_free
LBB0_49:
	movq	_PCAP_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_50:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	leaq	-192(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_IBV_FLOW_ATTR_SNIFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -184(%rbp)
	movl	$48, -192(%rbp)
	movl	64(%rbx), %eax
	movl	%eax, -188(%rbp)
	movq	40(%rbx), %rdi
	movq	%r14, %rsi
	callq	_ibv_create_flow
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	_RDMASNIFF_RECEIVE_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	imull	(%r12), %edi
	movl	%edi, (%r15)
	callq	_malloc
	movq	%rax, 80(%r15)
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movl	(%r13), %edi
	callq	_malloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:
	movq	16(%rbx), %rdi
	movq	80(%r15), %rsi
	movl	(%r15), %edx
	movq	_IBV_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_ibv_reg_mr
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_32
## %bb.21:
	cmpl	$0, (%r12)
	jle	LBB0_24
## %bb.22:
	xorl	%r14d, %r14d
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rdmasniff_post_recv
	incl	%r14d
	cmpl	(%r12), %r14d
	jl	LBB0_23
LBB0_24:
	movq	8(%rbx), %rdi
	movl	64(%rbx), %esi
	leaq	-48(%rbp), %rdx
	callq	_ibv_query_port
	testl	%eax, %eax
	jne	LBB0_27
## %bb.25:
	movq	-48(%rbp), %rax
	movq	_IBV_LINK_LAYER_INFINIBAND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.26:
	movq	_DLT_INFINIBAND@GOTPCREL(%rip), %rax
	jmp	LBB0_28
LBB0_15:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
	jmp	LBB0_33
LBB0_17:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdx
	jmp	LBB0_33
LBB0_19:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.9(%rip), %rdx
	jmp	LBB0_33
LBB0_27:
	movq	_DLT_EN10MB@GOTPCREL(%rip), %rax
LBB0_28:
	movl	(%rax), %eax
	movl	%eax, 64(%r15)
	movl	4(%r15), %ecx
	movl	(%r13), %eax
	testl	%ecx, %ecx
	jle	LBB0_30
## %bb.29:
	cmpl	%eax, %ecx
	jle	LBB0_31
LBB0_30:
	movl	%eax, 4(%r15)
LBB0_31:
	movq	$0, 56(%r15)
	movq	_rdmasniff_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15)
	movq	_rdmasniff_stats@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r15)
	movq	_rdmasniff_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r15)
	movq	_install_bpf_program@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r15)
	movq	_pcap_getnonblock_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movq	_pcap_setnonblock_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_rdmasniff_oneshot@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	xorl	%eax, %eax
	jmp	LBB0_50
LBB0_32:
	movl	68(%r15), %ecx
	movl	72(%r15), %edi
	movq	_PCAP_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.10(%rip), %rdx
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_PCAP_ERRBUF_SIZE,4,2           ## @PCAP_ERRBUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to open device %s"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to alloc PD for device %s"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to create comp channel for device %s"

	.comm	_RDMASNIFF_NUM_RECEIVES,4,2     ## @RDMASNIFF_NUM_RECEIVES
L_.str.3:                               ## @.str.3
	.asciz	"Failed to create CQ for device %s"

	.comm	_IBV_QPT_RAW_PACKET,4,2         ## @IBV_QPT_RAW_PACKET
L_.str.4:                               ## @.str.4
	.asciz	"Failed to create QP for device %s"

	.comm	_IBV_QPS_INIT,4,2               ## @IBV_QPS_INIT
	.comm	_IBV_QP_STATE,4,2               ## @IBV_QP_STATE
	.comm	_IBV_QP_PORT,4,2                ## @IBV_QP_PORT
L_.str.5:                               ## @.str.5
	.asciz	"Failed to modify QP to INIT for device %s"

	.comm	_IBV_QPS_RTR,4,2                ## @IBV_QPS_RTR
L_.str.6:                               ## @.str.6
	.asciz	"Failed to modify QP to RTR for device %s"

	.comm	_IBV_FLOW_ATTR_SNIFFER,4,2      ## @IBV_FLOW_ATTR_SNIFFER
L_.str.7:                               ## @.str.7
	.asciz	"Failed to create flow for device %s"

	.comm	_RDMASNIFF_RECEIVE_SIZE,4,2     ## @RDMASNIFF_RECEIVE_SIZE
L_.str.8:                               ## @.str.8
	.asciz	"Failed to allocate receive buffer for device %s"

L_.str.9:                               ## @.str.9
	.asciz	"Failed to allocate oneshot buffer for device %s"

	.comm	_IBV_ACCESS_LOCAL_WRITE,4,2     ## @IBV_ACCESS_LOCAL_WRITE
L_.str.10:                              ## @.str.10
	.asciz	"Failed to register MR for device %s"

	.comm	_IBV_LINK_LAYER_INFINIBAND,8,3  ## @IBV_LINK_LAYER_INFINIBAND
	.comm	_DLT_INFINIBAND,4,2             ## @DLT_INFINIBAND
	.comm	_DLT_EN10MB,4,2                 ## @DLT_EN10MB
	.comm	_rdmasniff_read,4,2             ## @rdmasniff_read
	.comm	_rdmasniff_stats,4,2            ## @rdmasniff_stats
	.comm	_rdmasniff_cleanup,4,2          ## @rdmasniff_cleanup
	.comm	_install_bpf_program,4,2        ## @install_bpf_program
	.comm	_pcap_getnonblock_fd,4,2        ## @pcap_getnonblock_fd
	.comm	_pcap_setnonblock_fd,4,2        ## @pcap_setnonblock_fd
	.comm	_rdmasniff_oneshot,4,2          ## @rdmasniff_oneshot
	.comm	_PCAP_ERROR,4,2                 ## @PCAP_ERROR
	.no_dead_strip	_rdmasniff_activate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rdmasniff_activate
_rdmasniff_activate:                    ; @rdmasniff_activate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x21, [x0, #88]
	ldr	w0, [x21, #68]
	bl	_ibv_open_device
	str	x0, [x21, #8]
	cbz	x0, LBB0_7
; %bb.1:
	bl	_ibv_alloc_pd
	str	x0, [x21, #16]
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x0, [x21, #8]
	bl	_ibv_create_comp_channel
	str	x0, [x21, #24]
	cbz	x0, LBB0_9
; %bb.3:
	mov	x3, x0
	ldr	x0, [x21, #8]
Lloh0:
	adrp	x22, _RDMASNIFF_NUM_RECEIVES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RDMASNIFF_NUM_RECEIVES@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, #0
	mov	w4, #0
	bl	_ibv_create_cq
	str	x0, [x21, #32]
	cbz	x0, LBB0_10
; %bb.4:
	mov	w1, #0
	bl	_ibv_req_notify_cq
	sub	x0, x29, #96
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	ldr	x8, [x21, #32]
	stp	x8, x8, [x29, #-64]
	ldr	w8, [x22]
	mov	w9, #1
	stur	w9, [x29, #-68]
Lloh2:
	adrp	x9, _IBV_QPT_RAW_PACKET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IBV_QPT_RAW_PACKET@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	stp	w9, w8, [x29, #-76]
	ldr	x0, [x21, #16]
	sub	x1, x29, #96
	bl	_ibv_create_qp
	str	x0, [x21, #40]
	cbz	x0, LBB0_11
; %bb.5:
	add	x0, sp, #64
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh5:
	adrp	x8, _IBV_QPS_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IBV_QPS_INIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x21, #64]
	stp	w8, w9, [sp, #76]
Lloh8:
	adrp	x23, _IBV_QP_STATE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _IBV_QP_STATE@GOTPAGEOFF]
	ldr	x0, [x21, #40]
	ldr	w8, [x23]
Lloh10:
	adrp	x9, _IBV_QP_PORT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IBV_QP_PORT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x1, sp, #64
	bl	_ibv_modify_qp
	cbz	x0, LBB0_12
; %bb.6:
Lloh13:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh16:
	adrp	x2, l_.str.5@PAGE
Lloh17:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_14
LBB0_7:
Lloh18:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_14
LBB0_8:
Lloh23:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_9:
Lloh28:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh31:
	adrp	x2, l_.str.2@PAGE
Lloh32:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_10:
Lloh33:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh36:
	adrp	x2, l_.str.3@PAGE
Lloh37:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_11:
Lloh38:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh41:
	adrp	x2, l_.str.4@PAGE
Lloh42:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_12:
	mov	w20, #48
	add	x0, sp, #64
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh43:
	adrp	x8, _IBV_QPS_RTR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _IBV_QPS_RTR@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	str	w8, [sp, #76]
	ldr	x0, [x21, #40]
	ldr	w2, [x23]
	add	x1, sp, #64
	bl	_ibv_modify_qp
	cbz	x0, LBB0_32
; %bb.13:
Lloh46:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh49:
	adrp	x2, l_.str.6@PAGE
Lloh50:
	add	x2, x2, l_.str.6@PAGEOFF
LBB0_14:
	bl	_pcap_snprintf
	ldr	x0, [x21, #56]
	cbz	x0, LBB0_16
; %bb.15:
	bl	_ibv_dereg_mr
LBB0_16:
	ldr	x0, [x21, #48]
	cbz	x0, LBB0_18
; %bb.17:
	bl	_ibv_destroy_flow
LBB0_18:
	ldr	x0, [x21, #40]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_ibv_destroy_qp
LBB0_20:
	ldr	x0, [x21, #32]
	cbz	x0, LBB0_22
; %bb.21:
	bl	_ibv_destroy_cq
LBB0_22:
	ldr	x0, [x21, #24]
	cbz	x0, LBB0_24
; %bb.23:
	bl	_ibv_destroy_comp_channel
LBB0_24:
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_26
; %bb.25:
	bl	_ibv_dealloc_pd
LBB0_26:
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_28
; %bb.27:
	bl	_ibv_close_device
LBB0_28:
	ldr	x0, [x21]
	cbz	x0, LBB0_30
; %bb.29:
	bl	_free
LBB0_30:
Lloh51:
	adrp	x8, _PCAP_ERROR@GOTPAGE
Lloh52:
	ldr	x8, [x8, _PCAP_ERROR@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
LBB0_31:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_32:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh54:
	adrp	x8, _IBV_FLOW_ATTR_SNIFFER@GOTPAGE
Lloh55:
	ldr	x8, [x8, _IBV_FLOW_ATTR_SNIFFER@GOTPAGEOFF]
Lloh56:
	ldr	w9, [x8]
	ldr	w8, [x21, #64]
	str	w20, [sp, #16]
	stp	w8, w9, [sp, #20]
	ldr	x0, [x21, #40]
	add	x1, sp, #16
	bl	_ibv_create_flow
	str	x0, [x21, #48]
	cbz	x0, LBB0_42
; %bb.33:
	ldr	w8, [x22]
Lloh57:
	adrp	x23, _RDMASNIFF_RECEIVE_SIZE@GOTPAGE
Lloh58:
	ldr	x23, [x23, _RDMASNIFF_RECEIVE_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
	mul	w0, w9, w8
	str	w0, [x19]
	bl	_malloc
	str	x0, [x19, #80]
	cbz	x0, LBB0_43
; %bb.34:
	ldr	w0, [x23]
	bl	_malloc
	str	x0, [x21]
	cbz	x0, LBB0_44
; %bb.35:
	ldr	x0, [x21, #16]
	ldr	x1, [x19, #80]
	ldr	w2, [x19]
Lloh59:
	adrp	x8, _IBV_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh60:
	ldr	x8, [x8, _IBV_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh61:
	ldr	w3, [x8]
	bl	_ibv_reg_mr
	str	x0, [x21, #56]
	cbz	x0, LBB0_50
; %bb.36:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_39
; %bb.37:
	mov	w20, #0
LBB0_38:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_rdmasniff_post_recv
	add	w20, w20, #1
	ldr	w8, [x22]
	cmp	w20, w8
	b.lt	LBB0_38
LBB0_39:
	ldr	x0, [x21, #8]
	ldr	w1, [x21, #64]
	add	x2, sp, #8
	bl	_ibv_query_port
	cbnz	w0, LBB0_45
; %bb.40:
	ldr	x8, [sp, #8]
Lloh62:
	adrp	x9, _IBV_LINK_LAYER_INFINIBAND@GOTPAGE
Lloh63:
	ldr	x9, [x9, _IBV_LINK_LAYER_INFINIBAND@GOTPAGEOFF]
Lloh64:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_45
; %bb.41:
Lloh65:
	adrp	x8, _DLT_INFINIBAND@GOTPAGE
Lloh66:
	ldr	x8, [x8, _DLT_INFINIBAND@GOTPAGEOFF]
	b	LBB0_46
LBB0_42:
Lloh67:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh68:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh69:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh70:
	adrp	x2, l_.str.7@PAGE
Lloh71:
	add	x2, x2, l_.str.7@PAGEOFF
	b	LBB0_14
LBB0_43:
Lloh72:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh73:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh74:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh75:
	adrp	x2, l_.str.8@PAGE
Lloh76:
	add	x2, x2, l_.str.8@PAGEOFF
	b	LBB0_14
LBB0_44:
Lloh77:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh78:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh79:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh80:
	adrp	x2, l_.str.9@PAGE
Lloh81:
	add	x2, x2, l_.str.9@PAGEOFF
	b	LBB0_14
LBB0_45:
Lloh82:
	adrp	x8, _DLT_EN10MB@GOTPAGE
Lloh83:
	ldr	x8, [x8, _DLT_EN10MB@GOTPAGEOFF]
LBB0_46:
	ldr	w8, [x8]
	str	w8, [x19, #64]
	ldr	w9, [x19, #4]
	ldr	w8, [x23]
	cmp	w9, #1
	b.lt	LBB0_48
; %bb.47:
	cmp	w9, w8
	b.le	LBB0_49
LBB0_48:
	str	w8, [x19, #4]
LBB0_49:
	mov	w0, #0
Lloh84:
	adrp	x8, _rdmasniff_read@GOTPAGE
Lloh85:
	ldr	x8, [x8, _rdmasniff_read@GOTPAGEOFF]
Lloh86:
	adrp	x9, _rdmasniff_stats@GOTPAGE
Lloh87:
	ldr	x9, [x9, _rdmasniff_stats@GOTPAGEOFF]
Lloh88:
	ldr	w8, [x8]
Lloh89:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #48]
Lloh90:
	adrp	x8, _rdmasniff_cleanup@GOTPAGE
Lloh91:
	ldr	x8, [x8, _rdmasniff_cleanup@GOTPAGEOFF]
Lloh92:
	ldr	w8, [x8]
Lloh93:
	adrp	x9, _install_bpf_program@GOTPAGE
Lloh94:
	ldr	x9, [x9, _install_bpf_program@GOTPAGEOFF]
Lloh95:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
Lloh96:
	adrp	x8, _pcap_getnonblock_fd@GOTPAGE
Lloh97:
	ldr	x8, [x8, _pcap_getnonblock_fd@GOTPAGEOFF]
Lloh98:
	ldr	w8, [x8]
	str	w8, [x19, #20]
Lloh99:
	adrp	x8, _pcap_setnonblock_fd@GOTPAGE
Lloh100:
	ldr	x8, [x8, _pcap_setnonblock_fd@GOTPAGEOFF]
Lloh101:
	ldr	w8, [x8]
Lloh102:
	adrp	x9, _rdmasniff_oneshot@GOTPAGE
Lloh103:
	ldr	x9, [x9, _rdmasniff_oneshot@GOTPAGEOFF]
Lloh104:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
	str	xzr, [x19, #56]
	stp	xzr, xzr, [x19, #24]
	ldr	x8, [x21, #24]
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_31
LBB0_50:
Lloh105:
	adrp	x8, _PCAP_ERRBUF_SIZE@GOTPAGE
Lloh106:
	ldr	x8, [x8, _PCAP_ERRBUF_SIZE@GOTPAGEOFF]
Lloh107:
	ldr	w1, [x8]
	ldp	w3, w0, [x19, #68]
Lloh108:
	adrp	x2, l_.str.10@PAGE
Lloh109:
	add	x2, x2, l_.str.10@PAGEOFF
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh102, Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh89
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh88
	.loh AdrpAdd	Lloh108, Lloh109
	.loh AdrpLdrGotLdr	Lloh105, Lloh106, Lloh107
	.cfi_endproc
                                        ; -- End function
	.comm	_PCAP_ERRBUF_SIZE,4,2           ; @PCAP_ERRBUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to open device %s"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to alloc PD for device %s"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to create comp channel for device %s"

	.comm	_RDMASNIFF_NUM_RECEIVES,4,2     ; @RDMASNIFF_NUM_RECEIVES
l_.str.3:                               ; @.str.3
	.asciz	"Failed to create CQ for device %s"

	.comm	_IBV_QPT_RAW_PACKET,4,2         ; @IBV_QPT_RAW_PACKET
l_.str.4:                               ; @.str.4
	.asciz	"Failed to create QP for device %s"

	.comm	_IBV_QPS_INIT,4,2               ; @IBV_QPS_INIT
	.comm	_IBV_QP_STATE,4,2               ; @IBV_QP_STATE
	.comm	_IBV_QP_PORT,4,2                ; @IBV_QP_PORT
l_.str.5:                               ; @.str.5
	.asciz	"Failed to modify QP to INIT for device %s"

	.comm	_IBV_QPS_RTR,4,2                ; @IBV_QPS_RTR
l_.str.6:                               ; @.str.6
	.asciz	"Failed to modify QP to RTR for device %s"

	.comm	_IBV_FLOW_ATTR_SNIFFER,4,2      ; @IBV_FLOW_ATTR_SNIFFER
l_.str.7:                               ; @.str.7
	.asciz	"Failed to create flow for device %s"

	.comm	_RDMASNIFF_RECEIVE_SIZE,4,2     ; @RDMASNIFF_RECEIVE_SIZE
l_.str.8:                               ; @.str.8
	.asciz	"Failed to allocate receive buffer for device %s"

l_.str.9:                               ; @.str.9
	.asciz	"Failed to allocate oneshot buffer for device %s"

	.comm	_IBV_ACCESS_LOCAL_WRITE,4,2     ; @IBV_ACCESS_LOCAL_WRITE
l_.str.10:                              ; @.str.10
	.asciz	"Failed to register MR for device %s"

	.comm	_IBV_LINK_LAYER_INFINIBAND,8,3  ; @IBV_LINK_LAYER_INFINIBAND
	.comm	_DLT_INFINIBAND,4,2             ; @DLT_INFINIBAND
	.comm	_DLT_EN10MB,4,2                 ; @DLT_EN10MB
	.comm	_rdmasniff_read,4,2             ; @rdmasniff_read
	.comm	_rdmasniff_stats,4,2            ; @rdmasniff_stats
	.comm	_rdmasniff_cleanup,4,2          ; @rdmasniff_cleanup
	.comm	_install_bpf_program,4,2        ; @install_bpf_program
	.comm	_pcap_getnonblock_fd,4,2        ; @pcap_getnonblock_fd
	.comm	_pcap_setnonblock_fd,4,2        ; @pcap_setnonblock_fd
	.comm	_rdmasniff_oneshot,4,2          ; @rdmasniff_oneshot
	.comm	_PCAP_ERROR,4,2                 ; @PCAP_ERROR
	.no_dead_strip	_rdmasniff_activate
.subsections_via_symbols
