	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_alloc_devdata              ## -- Begin function qib_alloc_devdata
	.p2align	4, 0x90
_qib_alloc_devdata:                     ## @qib_alloc_devdata
	.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
	leal	16(%rsi), %edi
	shrq	$2, %rsi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_rvt_alloc_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %r14
	leaq	12(%rax), %rsi
	movq	_xa_limit_32b@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	movq	_qib_dev_table@GOTPCREL(%rip), %rdi
	movq	%rbx, %rdx
	callq	_xa_alloc_irq
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	12(%r14), %ecx
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	callq	_rvt_set_ibdev_name
	movq	_u64@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_alloc_percpu
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.10:
	movq	_qib_cpulist_count@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	jne	LBB0_13
## %bb.11:
	xorl	%eax, %eax
	callq	_num_online_cpus
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_BITS_TO_LONGS
	movl	(%r13), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	_qib_cpulist@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rbx, (%r15)
LBB0_13:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_4:
	movl	%eax, %r12d
	movl	%eax, %edx
	negl	%edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_qib_early_err
	jmp	LBB0_7
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_qib_early_err
LBB0_7:
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_list_del_init
LBB0_9:
	movq	%r14, %rdi
	callq	_rvt_dealloc_device
	movl	%r12d, %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_qib_dev_table,4,2              ## @qib_dev_table
	.comm	_xa_limit_32b,4,2               ## @xa_limit_32b
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not allocate unit ID: error %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s%d"

L_.str.2:                               ## @.str.2
	.asciz	"qib"

	.comm	_u64,4,2                        ## @u64
L_.str.3:                               ## @.str.3
	.asciz	"Could not allocate per-cpu int_counter\n"

	.comm	_qib_cpulist_count,8,3          ## @qib_cpulist_count
	.comm	_qib_cpulist,8,3                ## @qib_cpulist
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_alloc_devdata              ; -- Begin function qib_alloc_devdata
	.p2align	2
_qib_alloc_devdata:                     ; @qib_alloc_devdata
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	lsr	x8, x1, #2
	add	w0, w1, #16
	mov	x1, x8
	bl	_rvt_alloc_device
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	add	x1, x0, #12
Lloh0:
	adrp	x8, _xa_limit_32b@GOTPAGE
Lloh1:
	ldr	x8, [x8, _xa_limit_32b@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w4, [x22]
Lloh5:
	adrp	x0, _qib_dev_table@GOTPAGE
Lloh6:
	ldr	x0, [x0, _qib_dev_table@GOTPAGEOFF]
	mov	x2, x19
	bl	_xa_alloc_irq
	tbnz	w0, #31, LBB0_8
; %bb.2:
	ldr	w3, [x19, #12]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_rvt_set_ibdev_name
Lloh11:
	adrp	x8, _u64@GOTPAGE
Lloh12:
	ldr	x8, [x8, _u64@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_alloc_percpu
	str	w0, [x19, #8]
	cbz	w0, LBB0_9
; %bb.3:
Lloh14:
	adrp	x21, _qib_cpulist_count@GOTPAGE
Lloh15:
	ldr	x21, [x21, _qib_cpulist_count@GOTPAGEOFF]
	ldr	x8, [x21]
	cbnz	x8, LBB0_6
; %bb.4:
	bl	_num_online_cpus
	mov	x20, x0
	bl	_BITS_TO_LONGS
	ldr	w2, [x22]
	mov	w1, #8
	bl	_kcalloc
Lloh16:
	adrp	x8, _qib_cpulist@GOTPAGE
Lloh17:
	ldr	x8, [x8, _qib_cpulist@GOTPAGEOFF]
Lloh18:
	str	x0, [x8]
	cbz	x0, LBB0_6
; %bb.5:
	str	x20, [x21]
LBB0_6:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
LBB0_7:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_8:
	mov	x21, x0
	neg	w8, w0
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x20
	bl	_qib_early_err
	add	x20, x19, #4
	mov	x0, x20
	bl	_list_empty
	cbnz	w0, LBB0_12
; %bb.11:
	mov	x0, x20
	bl	_list_del_init
LBB0_12:
	mov	x0, x19
	bl	_rvt_dealloc_device
	mov	x0, x21
LBB0_13:
	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
	add	sp, sp, #64
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_qib_dev_table,4,2              ; @qib_dev_table
	.comm	_xa_limit_32b,4,2               ; @xa_limit_32b
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not allocate unit ID: error %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s%d"

l_.str.2:                               ; @.str.2
	.asciz	"qib"

	.comm	_u64,4,2                        ; @u64
l_.str.3:                               ; @.str.3
	.asciz	"Could not allocate per-cpu int_counter\n"

	.comm	_qib_cpulist_count,8,3          ; @qib_cpulist_count
	.comm	_qib_cpulist,8,3                ; @qib_cpulist
.subsections_via_symbols
