	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmbus_device_register          ## -- Begin function vmbus_device_register
	.p2align	4, 0x90
_vmbus_device_register:                 ## @vmbus_device_register
	.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, %rbx
	movq	40(%rdi), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_set_name
	movq	_hv_bus@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	_hv_acpi_dev@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_vmbus_device_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_device_register
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_7
LBB0_2:
	leaq	24(%rbx), %rdx
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_kset_create_and_add
	movl	%eax, 32(%rbx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	40(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_vmbus_add_channel_kobj
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
	movl	32(%rbx), %edi
	callq	_kset_unregister
	movl	%r15d, %r14d
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movq	%rbx, %rdi
	callq	_device_unregister
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%pUl"

	.comm	_hv_bus,4,2                     ## @hv_bus
	.comm	_hv_acpi_dev,8,3                ## @hv_acpi_dev
	.comm	_vmbus_device_release,4,2       ## @vmbus_device_release
L_.str.1:                               ## @.str.1
	.asciz	"Unable to register child device\n"

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

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"Unable to register primary channeln"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmbus_device_register          ; -- Begin function vmbus_device_register
	.p2align	2
_vmbus_device_register:                 ; @vmbus_device_register
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #40]
	ldr	w2, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_set_name
Lloh2:
	adrp	x8, _hv_bus@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hv_bus@GOTPAGEOFF]
Lloh4:
	adrp	x9, _hv_acpi_dev@GOTPAGE
Lloh5:
	ldr	x9, [x9, _hv_acpi_dev@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #8]
Lloh7:
	adrp	x8, _vmbus_device_release@GOTPAGE
Lloh8:
	ldr	x8, [x8, _vmbus_device_release@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x19
	bl	_device_register
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_7
LBB0_2:
	add	x2, x19, #24
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, #0
	bl	_kset_create_and_add
	str	w0, [x19, #32]
	cbz	w0, LBB0_5
; %bb.3:
	ldr	x1, [x19, #40]
	mov	x0, x19
	bl	_vmbus_add_channel_kobj
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.4:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	ldr	w0, [x19, #32]
	bl	_kset_unregister
	b	LBB0_6
LBB0_5:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x19
	bl	_device_unregister
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%pUl"

	.comm	_hv_bus,4,2                     ; @hv_bus
	.comm	_hv_acpi_dev,8,3                ; @hv_acpi_dev
	.comm	_vmbus_device_release,4,2       ; @vmbus_device_release
l_.str.1:                               ; @.str.1
	.asciz	"Unable to register child device\n"

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

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"Unable to register primary channeln"

.subsections_via_symbols
