	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_umad_init_port
_ib_umad_init_port:                     ## @ib_umad_init_port
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_port_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movq	_dev_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IB_UMAD_MAX_PORTS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_find_first_zero_bit
	cmpl	(%r12), %eax
	jge	LBB0_1
## %bb.3:
	movl	%eax, %r14d
	movl	%eax, (%rbx)
	movslq	%eax, %r12
	movq	_dev_map@GOTPCREL(%rip), %rax
	movq	_base_dev@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_1:
	movq	_port_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movq	%r15, %rdi
	callq	_find_overflow_devnum
	testl	%eax, %eax
	js	LBB0_20
## %bb.2:
	movl	%eax, %r14d
	movq	_port_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movl	(%r12), %eax
	addl	%r14d, %eax
	movl	%eax, (%rbx)
	movl	%r14d, %r12d
	movq	_overflow_map@GOTPCREL(%rip), %rax
	movq	_overflow_maj@GOTPCREL(%rip), %rcx
LBB0_4:
	addq	(%rcx), %r12
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_set_bit
	movq	_port_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movq	%r15, 88(%rbx)
	movl	%r13d, 4(%rbx)
	leaq	80(%rbx), %rdi
	movl	$1, %esi
	callq	_sema_init
	leaq	76(%rbx), %rdi
	callq	_mutex_init
	leaq	72(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	8(%rbx), %r13
	movq	_umad_fops@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_cdev_init
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	leaq	16(%rbx), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_kobject_set_name
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_cdev_add
	testq	%rax, %rax
	jne	LBB0_16
## %bb.5:
	movq	_umad_class@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	movl	(%rbx), %r9d
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %r8
	movq	%rbx, %rcx
	callq	_device_create
	movq	%rax, 64(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_16
## %bb.6:
	movq	64(%rbx), %rdi
	movq	_dev_attr_ibdev@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testq	%rax, %rax
	jne	LBB0_15
## %bb.7:
	movq	64(%rbx), %rdi
	movq	_dev_attr_port@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testq	%rax, %rax
	jne	LBB0_15
## %bb.8:
	movq	_IB_UMAD_MAX_PORTS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%rax, %r12
	leaq	32(%rbx), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_umad_sm_fops@GOTPCREL(%rip), %rsi
	callq	_cdev_init
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%rbx)
	leaq	40(%rbx), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%rbx)
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_kobject_set_name
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rdi, %r12
	movl	$1, %edx
	callq	_cdev_add
	testq	%rax, %rax
	jne	LBB0_14
## %bb.9:
	movq	_umad_class@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	movl	(%rbx), %r9d
	movl	32(%rbx), %edx
	leaq	L_.str.1(%rip), %r8
	movq	%rbx, %rcx
	callq	_device_create
	movq	%rax, 56(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_14
## %bb.10:
	movq	56(%rbx), %rdi
	movq	_dev_attr_ibdev@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testq	%rax, %rax
	jne	LBB0_13
## %bb.11:
	movq	56(%rbx), %rdi
	movq	_dev_attr_port@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testq	%rax, %rax
	je	LBB0_12
LBB0_13:
	movq	_umad_class@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_device_destroy
LBB0_14:
	movq	%r12, %rdi
	callq	_cdev_del
LBB0_15:
	movq	_umad_class@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	callq	_device_destroy
LBB0_16:
	movq	%r13, %rdi
	callq	_cdev_del
	movl	(%rbx), %eax
	movq	_IB_UMAD_MAX_PORTS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_17
## %bb.18:
	movq	_dev_map@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_overflow_map@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_clear_bit
LBB0_20:
	movl	$-1, %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_port_lock,4,2                  ## @port_lock
	.comm	_dev_map,4,2                    ## @dev_map
	.comm	_IB_UMAD_MAX_PORTS,4,2          ## @IB_UMAD_MAX_PORTS
	.comm	_overflow_maj,8,3               ## @overflow_maj
	.comm	_overflow_map,4,2               ## @overflow_map
	.comm	_base_dev,8,3                   ## @base_dev
	.comm	_umad_fops,4,2                  ## @umad_fops
	.comm	_THIS_MODULE,8,3                ## @THIS_MODULE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"umad%d"

	.comm	_umad_class,4,2                 ## @umad_class
	.comm	_dev_attr_ibdev,4,2             ## @dev_attr_ibdev
	.comm	_dev_attr_port,4,2              ## @dev_attr_port
	.comm	_umad_sm_fops,4,2               ## @umad_sm_fops
L_.str.1:                               ## @.str.1
	.asciz	"issm%d"

	.no_dead_strip	_ib_umad_init_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ib_umad_init_port
_ib_umad_init_port:                     ; @ib_umad_init_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x0, _port_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _port_lock@GOTPAGEOFF]
	bl	_spin_lock
Lloh2:
	adrp	x26, _dev_map@GOTPAGE
Lloh3:
	ldr	x26, [x26, _dev_map@GOTPAGEOFF]
	ldr	w0, [x26]
Lloh4:
	adrp	x27, _IB_UMAD_MAX_PORTS@GOTPAGE
Lloh5:
	ldr	x27, [x27, _IB_UMAD_MAX_PORTS@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_find_first_zero_bit
	ldr	w8, [x27]
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.1:
	mov	x20, x0
	str	w0, [x19]
	sxtw	x8, w20
Lloh6:
	adrp	x9, _dev_map@GOTPAGE
Lloh7:
	ldr	x9, [x9, _dev_map@GOTPAGEOFF]
Lloh8:
	adrp	x10, _base_dev@GOTPAGE
Lloh9:
	ldr	x10, [x10, _base_dev@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh10:
	adrp	x0, _port_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _port_lock@GOTPAGEOFF]
	bl	_spin_unlock
	mov	x0, x21
	bl	_find_overflow_devnum
	tbnz	w0, #31, LBB0_16
; %bb.3:
	mov	x20, x0
Lloh12:
	adrp	x0, _port_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _port_lock@GOTPAGEOFF]
	bl	_spin_lock
	ldr	w8, [x27]
	add	w8, w8, w20
	str	w8, [x19]
	mov	w8, w20
Lloh14:
	adrp	x9, _overflow_map@GOTPAGE
Lloh15:
	ldr	x9, [x9, _overflow_map@GOTPAGEOFF]
Lloh16:
	adrp	x10, _overflow_maj@GOTPAGE
Lloh17:
	ldr	x10, [x10, _overflow_maj@GOTPAGEOFF]
LBB0_4:
	ldr	x10, [x10]
	add	x24, x10, x8
	ldr	w1, [x9]
	mov	x0, x20
	bl	_set_bit
Lloh18:
	adrp	x0, _port_lock@GOTPAGE
Lloh19:
	ldr	x0, [x0, _port_lock@GOTPAGEOFF]
	bl	_spin_unlock
	str	x21, [x19, #88]
	str	w23, [x19, #4]
	add	x0, x19, #80
	mov	w1, #1
	bl	_sema_init
	add	x0, x19, #76
	bl	_mutex_init
	add	x0, x19, #72
	bl	_INIT_LIST_HEAD
	add	x23, x19, #8
Lloh20:
	adrp	x1, _umad_fops@GOTPAGE
Lloh21:
	ldr	x1, [x1, _umad_fops@GOTPAGEOFF]
	mov	x0, x23
	bl	_cdev_init
Lloh22:
	adrp	x25, _THIS_MODULE@GOTPAGE
Lloh23:
	ldr	x25, [x25, _THIS_MODULE@GOTPAGEOFF]
	ldr	x8, [x25]
	str	x8, [x19, #24]
	mov	x0, x19
	str	x22, [x0, #16]!
	ldr	w2, [x19]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_kobject_set_name
	mov	x0, x23
	mov	x1, x24
	mov	w2, #1
	bl	_cdev_add
	cbnz	x0, LBB0_15
; %bb.5:
Lloh26:
	adrp	x28, _umad_class@GOTPAGE
Lloh27:
	ldr	x28, [x28, _umad_class@GOTPAGEOFF]
	ldr	w0, [x28]
	ldr	w1, [x21]
	ldr	w2, [x19, #8]
	ldr	w5, [x19]
Lloh28:
	adrp	x4, l_.str@PAGE
Lloh29:
	add	x4, x4, l_.str@PAGEOFF
	mov	x3, x19
	bl	_device_create
	str	x0, [x19, #64]
	bl	_IS_ERR
	cbnz	x0, LBB0_15
; %bb.6:
	ldr	x0, [x19, #64]
Lloh30:
	adrp	x1, _dev_attr_ibdev@GOTPAGE
Lloh31:
	ldr	x1, [x1, _dev_attr_ibdev@GOTPAGEOFF]
	bl	_device_create_file
	cbnz	x0, LBB0_14
; %bb.7:
	ldr	x0, [x19, #64]
Lloh32:
	adrp	x1, _dev_attr_port@GOTPAGE
Lloh33:
	ldr	x1, [x1, _dev_attr_port@GOTPAGEOFF]
	bl	_device_create_file
	cbnz	x0, LBB0_14
; %bb.8:
	ldrsw	x8, [x27]
	add	x8, x24, x8
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	x24, x19, #32
Lloh34:
	adrp	x1, _umad_sm_fops@GOTPAGE
Lloh35:
	ldr	x1, [x1, _umad_sm_fops@GOTPAGEOFF]
	mov	x0, x24
	bl	_cdev_init
	ldr	x8, [x25]
	str	x8, [x19, #48]
	mov	x0, x19
	str	x22, [x0, #40]!
	ldr	w2, [x19]
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_kobject_set_name
	mov	x0, x24
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	mov	w2, #1
	bl	_cdev_add
	cbnz	x0, LBB0_13
; %bb.9:
	ldr	w0, [x28]
	ldr	w1, [x21]
	ldr	w2, [x19, #32]
	ldr	w5, [x19]
Lloh38:
	adrp	x4, l_.str.1@PAGE
Lloh39:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	x3, x19
	bl	_device_create
	str	x0, [x19, #56]
	bl	_IS_ERR
	cbnz	x0, LBB0_13
; %bb.10:
	ldr	x0, [x19, #56]
Lloh40:
	adrp	x1, _dev_attr_ibdev@GOTPAGE
Lloh41:
	ldr	x1, [x1, _dev_attr_ibdev@GOTPAGEOFF]
	bl	_device_create_file
	cbnz	x0, LBB0_12
; %bb.11:
	ldr	x0, [x19, #56]
Lloh42:
	adrp	x1, _dev_attr_port@GOTPAGE
Lloh43:
	ldr	x1, [x1, _dev_attr_port@GOTPAGEOFF]
	bl	_device_create_file
	cbz	x0, LBB0_17
LBB0_12:
	ldr	w0, [x28]
	ldr	w1, [x24]
	bl	_device_destroy
LBB0_13:
	mov	x0, x24
	bl	_cdev_del
LBB0_14:
	ldr	w0, [x28]
	ldr	w1, [x23]
	bl	_device_destroy
LBB0_15:
Lloh44:
	adrp	x21, _overflow_map@GOTPAGE
Lloh45:
	ldr	x21, [x21, _overflow_map@GOTPAGEOFF]
	mov	x0, x23
	bl	_cdev_del
	ldr	w8, [x19]
	ldr	w9, [x27]
	cmp	w8, w9
	csel	x8, x26, x21, lt
	ldr	w1, [x8]
	mov	x0, x20
	bl	_clear_bit
LBB0_16:
	mov	w0, #-1
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_port_lock,4,2                  ; @port_lock
	.comm	_dev_map,4,2                    ; @dev_map
	.comm	_IB_UMAD_MAX_PORTS,4,2          ; @IB_UMAD_MAX_PORTS
	.comm	_overflow_maj,8,3               ; @overflow_maj
	.comm	_overflow_map,4,2               ; @overflow_map
	.comm	_base_dev,8,3                   ; @base_dev
	.comm	_umad_fops,4,2                  ; @umad_fops
	.comm	_THIS_MODULE,8,3                ; @THIS_MODULE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"umad%d"

	.comm	_umad_class,4,2                 ; @umad_class
	.comm	_dev_attr_ibdev,4,2             ; @dev_attr_ibdev
	.comm	_dev_attr_port,4,2              ; @dev_attr_port
	.comm	_umad_sm_fops,4,2               ; @umad_sm_fops
l_.str.1:                               ; @.str.1
	.asciz	"issm%d"

	.no_dead_strip	_ib_umad_init_port
.subsections_via_symbols
