	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_register_device             ## -- Begin function ib_register_device
	.p2align	4, 0x90
_ib_register_device:                    ## @ib_register_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_assign_name
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	%r14, %rdi
	callq	_setup_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	%r14, %rdi
	callq	_ib_cache_setup_one
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	jmp	LBB0_11
LBB0_4:
	movq	%r14, %rdi
	callq	_ib_device_register_rdmacg
	movq	%r14, %rdi
	callq	_rdma_counter_init
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_dev_set_uevent_suppress
	movq	%r14, %rdi
	callq	_device_add
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_ib_device_register_sysfs
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movq	%r14, %rdi
	callq	_device_del
LBB0_7:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dev_set_uevent_suppress
	movq	%r14, %rdi
	callq	_ib_device_unregister_rdmacg
	movq	%r14, %rdi
	callq	_ib_cache_cleanup_one
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	callq	_enable_device_and_get
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dev_set_uevent_suppress
	movq	_KOBJ_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kobject_uevent
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:
	movq	8(%r14), %rbx
	movq	$0, 8(%r14)
	movq	%r14, %rdi
	callq	_ib_device_put
	movq	%r14, %rdi
	callq	___ib_unregister_device
	movq	%rbx, 8(%r14)
	movl	%r15d, %ebx
	jmp	LBB0_11
LBB0_10:
	movq	%r14, %rdi
	callq	_ib_device_put
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't set up InfiniBand P_Key/GID cache\n"

L_.str.1:                               ## @.str.1
	.asciz	"Couldn't register device with driver model\n"

	.comm	_KOBJ_ADD,4,2                   ## @KOBJ_ADD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_register_device             ; -- Begin function ib_register_device
	.p2align	2
_ib_register_device:                    ; @ib_register_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	bl	_assign_name
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_setup_device
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.2:
	mov	x0, x19
	bl	_ib_cache_setup_one
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	b	LBB0_8
LBB0_4:
	mov	x0, x19
	bl	_ib_device_register_rdmacg
	mov	x0, x19
	bl	_rdma_counter_init
	mov	x0, x19
	mov	w1, #1
	bl	_dev_set_uevent_suppress
	mov	x0, x19
	bl	_device_add
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_ib_device_register_sysfs
	cbz	w0, LBB0_9
; %bb.6:
	mov	x20, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	mov	x0, x19
	bl	_device_del
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_dev_set_uevent_suppress
	mov	x0, x19
	bl	_ib_device_unregister_rdmacg
	mov	x0, x19
	bl	_ib_cache_cleanup_one
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x19
	bl	_enable_device_and_get
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	bl	_dev_set_uevent_suppress
Lloh4:
	adrp	x8, _KOBJ_ADD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _KOBJ_ADD@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kobject_uevent
	cbz	w20, LBB0_11
; %bb.10:
	ldr	x21, [x19, #8]
	str	xzr, [x19, #8]
	mov	x0, x19
	bl	_ib_device_put
	mov	x0, x19
	bl	___ib_unregister_device
	str	x21, [x19, #8]
	b	LBB0_8
LBB0_11:
	mov	x0, x19
	bl	_ib_device_put
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't set up InfiniBand P_Key/GID cache\n"

l_.str.1:                               ; @.str.1
	.asciz	"Couldn't register device with driver model\n"

	.comm	_KOBJ_ADD,4,2                   ; @KOBJ_ADD
.subsections_via_symbols
