	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_subports
_init_subports:                         ## @init_subports
	.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
	xorl	%r15d, %r15d
	cmpl	$0, (%rdx)
	je	LBB0_16
## %bb.1:
	movq	%rdx, %rbx
	movq	%rdi, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	_IPATH_USER_SWMAJOR@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_IPATH_USER_SWMINOR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_ipath_supports_subports
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%r13), %edi
	movl	(%r14), %esi
	callq	_ipath_compatible_subports
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movl	4(%rbx), %edi
	movzwl	%di, %esi
	sarl	$16, %edi
	callq	_ipath_compatible_subports
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	(%rbx), %r13d
	movq	_INFINIPATH_MAX_SUBPORT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jbe	LBB0_9
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movq	8(%r12), %rdi
	movl	4(%rbx), %edx
	movzwl	%dx, %ecx
	sarl	$16, %edx
	movl	(%r13), %r8d
	movl	(%r14), %r9d
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_16
LBB0_9:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	imull	%r13d, %edi
	callq	_vzalloc
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movl	(%r12), %edi
	imull	4(%r12), %edi
	shll	$2, %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ALIGN
	imull	%r13d, %eax
	movl	%eax, %edi
	callq	_vzalloc
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	imull	(%r14), %r13d
	imull	4(%r14), %r13d
	movl	%r13d, %edi
	callq	_vzalloc
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.17:
	movl	(%rbx), %eax
	movl	%eax, 8(%r14)
	movl	8(%rbx), %eax
	movl	%eax, 36(%r14)
	movl	$1, 12(%r14)
	movq	_IPATH_PORT_MASTER_UNINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$32, %r14
	movq	%r14, %rsi
	callq	_set_bit
	jmp	LBB0_16
LBB0_3:
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_16
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_16
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_15
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	24(%r14), %rdi
	callq	_vfree
LBB0_15:
	negl	%r15d
	movq	16(%r14), %rdi
	callq	_vfree
	movq	$0, 16(%r14)
LBB0_16:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPATH_USER_SWMAJOR,4,2         ## @IPATH_USER_SWMAJOR
	.comm	_IPATH_USER_SWMINOR,4,2         ## @IPATH_USER_SWMINOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Inconsistent ipath_compatible_subports()\n"

L_.str.1:                               ## @.str.1
	.asciz	"Mismatched user version (%d.%d) and driver version (%d.%d) while port sharing. Ensure that driver and library are from the same release.\n"

	.comm	_INFINIPATH_MAX_SUBPORT,4,2     ## @INFINIPATH_MAX_SUBPORT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IPATH_PORT_MASTER_UNINIT,4,2   ## @IPATH_PORT_MASTER_UNINIT
	.no_dead_strip	_init_subports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_subports
_init_subports:                         ; @init_subports
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x2]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _IPATH_USER_SWMAJOR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IPATH_USER_SWMAJOR@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x23, _IPATH_USER_SWMINOR@GOTPAGE
Lloh3:
	ldr	x23, [x23, _IPATH_USER_SWMINOR@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_ipath_supports_subports
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_ipath_compatible_subports
	cbz	w0, LBB0_12
LBB0_3:
	ldr	w8, [x20, #4]
	asr	w0, w8, #16
	and	w1, w8, #0xffff
	bl	_ipath_compatible_subports
	cbz	w0, LBB0_7
; %bb.4:
	ldr	w22, [x20]
Lloh4:
	adrp	x8, _INFINIPATH_MAX_SUBPORT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INFINIPATH_MAX_SUBPORT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ls	LBB0_8
; %bb.5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_6:
	mov	w20, #0
	b	LBB0_19
LBB0_7:
	ldr	x0, [x21, #8]
	ldr	w8, [x20, #4]
	asr	w9, w8, #16
	and	w8, w8, #0xffff
	ldr	w10, [x22]
	ldr	w11, [x23]
	stp	x10, x11, [sp, #16]
	stp	x9, x8, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_8:
Lloh11:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	mul	w0, w8, w22
	bl	_vzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_14
; %bb.9:
	ldp	w8, w9, [x21]
	mul	w8, w8, w9
	lsl	w0, w8, #2
	ldr	w1, [x23]
	bl	_ALIGN
	mul	w0, w0, w22
	bl	_vzalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_16
; %bb.10:
	ldp	w8, w9, [x19]
	mul	w8, w8, w22
	mul	w0, w8, w9
	bl	_vzalloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_17
; %bb.11:
	ldr	w8, [x20]
	ldr	w9, [x20, #8]
	str	w9, [x19, #36]
	mov	w9, #1
	stp	w8, w9, [x19, #8]
Lloh13:
	adrp	x8, _IPATH_PORT_MASTER_UNINIT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IPATH_PORT_MASTER_UNINIT@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_set_bit
	mov	w20, #0
	b	LBB0_19
LBB0_12:
	ldr	x0, [x21, #8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
LBB0_13:
	bl	_dev_info
	mov	w20, #0
	b	LBB0_19
LBB0_14:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_16:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
	b	LBB0_18
LBB0_17:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
	ldr	x0, [x19, #24]
	bl	_vfree
LBB0_18:
	neg	w20, w20
	ldr	x0, [x19, #16]
	bl	_vfree
	str	xzr, [x19, #16]
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IPATH_USER_SWMAJOR,4,2         ; @IPATH_USER_SWMAJOR
	.comm	_IPATH_USER_SWMINOR,4,2         ; @IPATH_USER_SWMINOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Inconsistent ipath_compatible_subports()\n"

l_.str.1:                               ; @.str.1
	.asciz	"Mismatched user version (%d.%d) and driver version (%d.%d) while port sharing. Ensure that driver and library are from the same release.\n"

	.comm	_INFINIPATH_MAX_SUBPORT,4,2     ; @INFINIPATH_MAX_SUBPORT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IPATH_PORT_MASTER_UNINIT,4,2   ; @IPATH_PORT_MASTER_UNINIT
	.no_dead_strip	_init_subports
.subsections_via_symbols
