	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_mad_init_device
_ib_mad_init_device:                    ## @ib_mad_init_device
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_rdma_start_port
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_rdma_end_port
	cmpl	%eax, %r14d
	jg	LBB0_17
## %bb.1:
	movl	%r14d, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%rbx), %r12d
	movq	%r15, %rdi
	callq	_rdma_end_port
	cmpl	%eax, %ebx
	movl	%r12d, %ebx
	jge	LBB0_17
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_rdma_cap_ib_mad
	testl	%eax, %eax
	je	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ib_mad_port_open
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ib_agent_port_open
	testq	%rax, %rax
	je	LBB0_18
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_err
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ib_mad_port_close
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rsi
LBB0_8:
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_9:
	cmpl	%r14d, %ebx
	jle	LBB0_17
## %bb.10:
	leaq	L_.str.2(%rip), %r12
	leaq	L_.str.3(%rip), %r13
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	%r14d, %ebx
	jle	LBB0_17
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_rdma_cap_ib_mad
	testl	%eax, %eax
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ib_agent_port_close
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ib_mad_port_close
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_16
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't open port %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Couldn't open port %d for agents\n"

L_.str.2:                               ## @.str.2
	.asciz	"Couldn't close port %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Couldn't close port %d for agents\n"

	.no_dead_strip	_ib_mad_init_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ib_mad_init_device
_ib_mad_init_device:                    ; @ib_mad_init_device
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_rdma_start_port
	mov	x20, x0
	mov	x0, x19
	bl	_rdma_end_port
	cmp	w20, w0
	b.gt	LBB0_18
; %bb.1:
	mov	x21, x20
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w21, #1
	mov	x0, x19
	bl	_rdma_end_port
	cmp	w21, w0
	mov	x21, x22
	b.ge	LBB0_18
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_rdma_cap_ib_mad
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ib_mad_port_open
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ib_agent_port_open
	cbz	x0, LBB0_2
; %bb.6:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	mov	x0, x19
	mov	x1, x21
	bl	_ib_mad_port_close
	cbz	x0, LBB0_10
; %bb.7:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
LBB0_9:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
LBB0_10:
	cmp	w21, w20
	b.le	LBB0_18
; %bb.11:
Lloh6:
	adrp	x22, l_.str.2@PAGE
Lloh7:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh8:
	adrp	x23, l_.str.3@PAGE
Lloh9:
	add	x23, x23, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	cmp	w21, w20
	b.le	LBB0_18
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, #1
	mov	x0, x19
	mov	x1, x21
	bl	_rdma_cap_ib_mad
	cbz	w0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ib_agent_port_close
	cbz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_dev_err
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ib_mad_port_close
	cbz	x0, LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_dev_err
	b	LBB0_12
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't open port %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Couldn't open port %d for agents\n"

l_.str.2:                               ; @.str.2
	.asciz	"Couldn't close port %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Couldn't close port %d for agents\n"

	.no_dead_strip	_ib_mad_init_device
.subsections_via_symbols
