	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _do_madrpc
__do_madrpc:                            ## @_do_madrpc
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r12d
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%edi, %r15d
	movq	_ibdebug@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_umad_size
	movslq	%r12d, %r13
	leaq	(%rax,%r13), %rdx
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_IBWARN
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_umad_size
	addq	%rax, %r13
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_xdump
LBB0_2:
	movl	16(%rbp), %esi
	movq	_save_mad@GOTPCREL(%rip), %r14
	movq	(%r14), %r13
	testq	%r13, %r13
	je	LBB0_4
## %bb.3:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_umad_get_mad
	movq	_save_mad_len@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%r12d, %edx
	cmovgel	%r12d, %edx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_memcpy
	movl	16(%rbp), %esi
	movq	$0, (%r14)
LBB0_4:
	movq	24(%rbp), %rdx
	testl	%esi, %esi
	jle	LBB0_21
## %bb.5:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_umad_get_mad
	movq	_IB_MAD_TRID_F@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_mad_get_field64
	movq	%rax, %r13
	xorl	%ecx, %ecx
	movl	-52(%rbp), %r14d                ## 4-byte Reload
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	testl	%ecx, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.3(%rip), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ERRS
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, -44(%rbp)
	movl	%r15d, %edi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	callq	_umad_send
	testq	%rax, %rax
	jns	LBB0_10
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=2
	movq	%rbx, %rdi
	callq	_umad_get_mad
	movq	_IB_MAD_TRID_F@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_mad_get_field64
	cmpq	%r13, %rax
	je	LBB0_15
LBB0_10:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, -44(%rbp)
	movl	%r15d, %edi
	movq	%rbx, %rsi
	leaq	-44(%rbp), %rdx
	movl	%r14d, %ecx
	callq	_umad_recv
	testq	%rax, %rax
	js	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	_ibdebug@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$3, %eax
	jl	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%rbx, %rdi
	callq	_umad_get_mad_addr
	movl	%eax, %edi
	callq	_umad_addr_dump
	movq	_ibdebug@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=2
	cmpl	$2, %eax
	jl	LBB0_9
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=2
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_IBWARN
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_umad_get_mad
	movq	_IB_MAD_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r14d, %edi
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	leaq	L_.str.7(%rip), %rsi
	movq	%rax, %rdx
	callq	_xdump
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_umad_status
	testl	%eax, %eax
	je	LBB0_26
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_26
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	cmpl	16(%rbp), %ecx
	jne	LBB0_6
## %bb.18:
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%rbp), %rcx
	movl	%eax, (%rcx)
	movl	16(%rbp), %esi
	imull	%esi, %r14d
	leaq	L_.str.8(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ERRS
	jmp	LBB0_22
LBB0_19:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.5(%rip), %rdi
LBB0_20:
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_IBWARN
	jmp	LBB0_22
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%eax, (%rdx)
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERRS
LBB0_22:
	movl	$-1, %eax
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_20
LBB0_26:
	movl	-44(%rbp), %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_ibdebug,4,2                    ## @ibdebug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	">>> sending: len %d pktsz %zu"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"send buf\n"

	.comm	_save_mad,8,3                   ## @save_mad
	.comm	_save_mad_len,4,2               ## @save_mad_len
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"max_retries %d <= 0"

	.comm	_IB_MAD_TRID_F,4,2              ## @IB_MAD_TRID_F
L_.str.3:                               ## @.str.3
	.asciz	"retry %d (timeout %d ms)"

L_.str.4:                               ## @.str.4
	.asciz	"send failed; %s"

L_.str.5:                               ## @.str.5
	.asciz	"recv failed: %s"

L_.str.6:                               ## @.str.6
	.asciz	"rcv buf:"

L_.str.7:                               ## @.str.7
	.asciz	"rcv buf\n"

	.comm	_IB_MAD_SIZE,8,3                ## @IB_MAD_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.8:                               ## @.str.8
	.asciz	"timeout after %d retries, %d ms"

	.no_dead_strip	__do_madrpc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _do_madrpc
__do_madrpc:                            ; @_do_madrpc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x27, x7
	mov	x23, x6
	mov	x21, x5
	mov	x22, x4
	str	w3, [sp, #40]                   ; 4-byte Folded Spill
	mov	x24, x2
	mov	x28, x1
	mov	x26, x0
Lloh0:
	adrp	x25, _ibdebug@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ibdebug@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.1:
	bl	_umad_size
	sxtw	x19, w22
	add	x8, x0, x19
	stp	x22, x8, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IBWARN
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w20, [x8]
	bl	_umad_size
	add	x3, x0, x19
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x28
	bl	_xdump
LBB0_2:
Lloh9:
	adrp	x19, _save_mad@GOTPAGE
Lloh10:
	ldr	x19, [x19, _save_mad@GOTPAGEOFF]
	ldr	x20, [x19]
	cbz	x20, LBB0_4
; %bb.3:
	mov	x0, x28
	bl	_umad_get_mad
	mov	x1, x0
Lloh11:
	adrp	x8, _save_mad_len@GOTPAGE
Lloh12:
	ldr	x8, [x8, _save_mad_len@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w22
	csel	w2, w8, w22, lt
	mov	x0, x20
	bl	_memcpy
	str	xzr, [x19]
LBB0_4:
	cmp	w23, #0
	b.le	LBB0_20
; %bb.5:
	str	x27, [sp, #16]                  ; 8-byte Folded Spill
	str	w23, [sp, #28]                  ; 4-byte Folded Spill
	str	x28, [sp, #32]                  ; 8-byte Folded Spill
	mov	x0, x28
	bl	_umad_get_mad
Lloh14:
	adrp	x20, _IB_MAD_TRID_F@GOTPAGE
Lloh15:
	ldr	x20, [x20, _IB_MAD_TRID_F@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_mad_get_field64
	mov	x27, x0
	mov	w28, #0
Lloh16:
	adrp	x23, l_.str.7@PAGE
Lloh17:
	add	x23, x23, l_.str.7@PAGEOFF
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cbz	w28, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x21, [sp]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x28
	bl	_ERRS
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [sp, #44]
	mov	x0, x26
	ldr	w1, [sp, #40]                   ; 4-byte Folded Reload
	ldr	x2, [sp, #32]                   ; 8-byte Folded Reload
	mov	x3, x22
	mov	x4, x21
	mov	w5, #0
	bl	_umad_send
	tbz	x0, #63, LBB0_10
	b	LBB0_24
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x24
	bl	_umad_get_mad
	ldr	w2, [x20]
	mov	w1, #0
	bl	_mad_get_field64
	cmp	x0, x27
	b.eq	LBB0_15
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w22, [sp, #44]
	add	x2, sp, #44
	mov	x0, x26
	mov	x1, x24
	mov	x3, x21
	bl	_umad_recv
	tbnz	x0, #63, LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x25]
	cmp	w8, #2
	b.le	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x24
	bl	_umad_get_mad_addr
	bl	_umad_addr_dump
	ldr	w8, [x25]
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=2
	cmp	w8, #2
	b.lt	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=2
Lloh20:
	adrp	x0, l_.str.6@PAGE
Lloh21:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_IBWARN
Lloh22:
	adrp	x8, _stderr@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh24:
	ldr	w19, [x8]
	mov	x0, x24
	bl	_umad_get_mad
	mov	x2, x0
Lloh25:
	adrp	x8, _IB_MAD_SIZE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IB_MAD_SIZE@GOTPAGEOFF]
Lloh27:
	ldr	x3, [x8]
	mov	x0, x19
	mov	x1, x23
	bl	_xdump
	b	LBB0_9
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	bl	_umad_status
	cbz	w0, LBB0_25
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_25
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	add	w28, w28, #1
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w28, w8
	b.ne	LBB0_6
; %bb.18:
Lloh31:
	adrp	x8, _errno@GOTPAGE
Lloh32:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh33:
	str	w0, [x8]
Lloh34:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	str	w8, [x9]
	ldr	w1, [sp, #28]                   ; 4-byte Folded Reload
	mul	w8, w1, w21
	str	x8, [sp]
Lloh37:
	adrp	x0, l_.str.8@PAGE
Lloh38:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_21
LBB0_19:
Lloh39:
	adrp	x8, _errno@GOTPAGE
Lloh40:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh42:
	adrp	x0, l_.str.5@PAGE
Lloh43:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_IBWARN
	b	LBB0_22
LBB0_20:
Lloh44:
	adrp	x8, _EINVAL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
Lloh47:
	adrp	x9, _errno@GOTPAGE
Lloh48:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh49:
	str	w8, [x9]
	str	w8, [x27]
Lloh50:
	adrp	x0, l_.str.2@PAGE
Lloh51:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
LBB0_21:
	bl	_ERRS
LBB0_22:
	mov	w0, #-1
LBB0_23:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_24:
Lloh52:
	adrp	x8, _errno@GOTPAGE
Lloh53:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh55:
	adrp	x0, l_.str.4@PAGE
Lloh56:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_IBWARN
	b	LBB0_22
LBB0_25:
	ldr	w0, [sp, #44]
	b	LBB0_23
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotStr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_ibdebug,4,2                    ; @ibdebug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	">>> sending: len %d pktsz %zu"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"send buf\n"

	.comm	_save_mad,8,3                   ; @save_mad
	.comm	_save_mad_len,4,2               ; @save_mad_len
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"max_retries %d <= 0"

	.comm	_IB_MAD_TRID_F,4,2              ; @IB_MAD_TRID_F
l_.str.3:                               ; @.str.3
	.asciz	"retry %d (timeout %d ms)"

l_.str.4:                               ; @.str.4
	.asciz	"send failed; %s"

l_.str.5:                               ; @.str.5
	.asciz	"recv failed: %s"

l_.str.6:                               ; @.str.6
	.asciz	"rcv buf:"

l_.str.7:                               ; @.str.7
	.asciz	"rcv buf\n"

	.comm	_IB_MAD_SIZE,8,3                ; @IB_MAD_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.8:                               ; @.str.8
	.asciz	"timeout after %d retries, %d ms"

	.no_dead_strip	__do_madrpc
.subsections_via_symbols
