	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hpsb_alloc_host                ## -- Begin function hpsb_alloc_host
	.p2align	4, 0x90
_hpsb_alloc_host:                       ## @hpsb_alloc_host
	.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	%rdx, %r15
	movq	%rdi, %r12
	movl	$0, -44(%rbp)
	leal	136(%rsi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %r13
	movq	_CSR_BUS_INFO_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_csr_bus_ops@GOTPCREL(%rip), %rdi
	movq	%r14, %rdx
	callq	_csr1212_create_csr
	movl	%eax, 64(%r14)
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	leaq	136(%r14), %rax
	movq	%rax, 128(%r13)
	movq	%r12, 120(%r13)
	leaq	116(%r14), %rdi
	callq	_INIT_LIST_HEAD
	leaq	112(%r14), %rdi
	callq	_INIT_LIST_HEAD
	movq	_HZ@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rax
	imulq	$60, %rax, %rax
	movq	56(%r13), %rcx
	movq	_jiffies@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	subq	%rax, %rdx
	movq	%rdx, 16(%rcx)
	movq	%rdx, 24(%rcx)
	movq	%rdx, 32(%rcx)
	movq	%rdx, 40(%rcx)
	movq	%rdx, 48(%rcx)
	movq	%rdx, 56(%rcx)
	movq	%rdx, 64(%rcx)
	movq	%rdx, 72(%rcx)
	movq	%rdx, 80(%rcx)
	movq	%rdx, 88(%rcx)
	movq	%rdx, 96(%rcx)
	movq	%rdx, 104(%rcx)
	movq	%rdx, 112(%rcx)
	movq	%rdx, 120(%rcx)
	leaq	108(%r14), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	104(%r14), %rdi
	movq	_delayed_reset_bus@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	leaq	88(%r14), %rdi
	callq	_init_timer
	movq	%r13, 88(%r13)
	movq	_abort_timedouts@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 96(%r13)
	movslq	(%rbx), %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$35, %rax
	addl	%ecx, %eax
	movl	%eax, (%r13)
	movq	40(%r13), %rax
	movq	48(%r13), %rcx
	addq	$3, %rcx
	movq	%rcx, 80(%r13)
	addq	$2, %rax
	movq	%rax, 72(%r13)
	movq	_host_num_alloc@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_alloc_hostnum_cb@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdi
	callq	_nodemgr_for_each_host
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	-44(%rbp), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	incl	-44(%rbp)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_nodemgr_for_each_host
	testq	%rax, %rax
	jne	LBB0_4
LBB0_5:
	movq	_host_num_alloc@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	-44(%rbp), %eax
	movl	%eax, 4(%r13)
	leaq	8(%r14), %r12
	movq	_nodemgr_dev_template_host@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	%r15, 16(%r13)
	movq	%r15, %rdi
	callq	_dev_to_node
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_set_dev_node
	movl	4(%r13), %edx
	leaq	L_.str(%rip), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_dev_set_name
	addq	$24, %r14
	movq	%r12, 32(%r13)
	movq	_hpsb_host_class@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r13)
	movl	4(%r13), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_dev_set_name
	movq	%r12, %rdi
	callq	_device_register
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	%r14, %rdi
	callq	_device_register
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	callq	_device_unregister
LBB0_8:
	movq	%r13, %rdi
	callq	_kfree
LBB0_9:
	xorl	%r13d, %r13d
LBB0_10:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	_get_device
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_csr_bus_ops,4,2                ## @csr_bus_ops
	.comm	_CSR_BUS_INFO_SIZE,4,2          ## @CSR_BUS_INFO_SIZE
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.comm	_delayed_reset_bus,4,2          ## @delayed_reset_bus
	.comm	_abort_timedouts,4,2            ## @abort_timedouts
	.comm	_host_num_alloc,4,2             ## @host_num_alloc
	.comm	_alloc_hostnum_cb,4,2           ## @alloc_hostnum_cb
	.comm	_nodemgr_dev_template_host,4,2  ## @nodemgr_dev_template_host
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fw-host%d"

	.comm	_hpsb_host_class,4,2            ## @hpsb_host_class
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hpsb_alloc_host                ; -- Begin function hpsb_alloc_host
	.p2align	2
_hpsb_alloc_host:                       ; @hpsb_alloc_host
	.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, x2
	mov	x21, x0
	str	wzr, [sp, #12]
	add	w0, w1, #136
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.1:
Lloh3:
	adrp	x8, _CSR_BUS_INFO_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CSR_BUS_INFO_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x0, _csr_bus_ops@GOTPAGE
Lloh7:
	ldr	x0, [x0, _csr_bus_ops@GOTPAGEOFF]
	mov	x2, x19
	bl	_csr1212_create_csr
	str	w0, [x19, #64]
	cbz	w0, LBB0_8
; %bb.2:
	add	x8, x19, #136
	stp	x21, x8, [x19, #120]
	add	x0, x19, #116
	bl	_INIT_LIST_HEAD
	add	x0, x19, #112
	bl	_INIT_LIST_HEAD
Lloh8:
	adrp	x21, _HZ@GOTPAGE
Lloh9:
	ldr	x21, [x21, _HZ@GOTPAGEOFF]
	ldrsw	x8, [x21]
	mov	w9, #60
Lloh10:
	adrp	x10, _jiffies@GOTPAGE
Lloh11:
	ldr	x10, [x10, _jiffies@GOTPAGEOFF]
	ldr	x11, [x19, #56]
Lloh12:
	ldr	x10, [x10]
	msub	x8, x8, x9, x10
	stp	x8, x8, [x11, #16]
	stp	x8, x8, [x11, #32]
	stp	x8, x8, [x11, #48]
	stp	x8, x8, [x11, #64]
	stp	x8, x8, [x11, #80]
	stp	x8, x8, [x11, #96]
	stp	x8, x8, [x11, #112]
	add	x0, x19, #108
	mov	w1, #0
	bl	_atomic_set
	add	x0, x19, #104
Lloh13:
	adrp	x8, _delayed_reset_bus@GOTPAGE
Lloh14:
	ldr	x8, [x8, _delayed_reset_bus@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	add	x0, x19, #88
	bl	_init_timer
	str	x19, [x19, #88]
Lloh16:
	adrp	x8, _abort_timedouts@GOTPAGE
Lloh17:
	ldr	x8, [x8, _abort_timedouts@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #96]
	ldrsw	x8, [x21]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #3
	str	w8, [x19]
	ldp	x9, x8, [x19, #40]
	add	x8, x8, #3
	add	x9, x9, #2
	stp	x9, x8, [x19, #72]
Lloh19:
	adrp	x0, _host_num_alloc@GOTPAGE
Lloh20:
	ldr	x0, [x0, _host_num_alloc@GOTPAGEOFF]
	bl	_mutex_lock
Lloh21:
	adrp	x21, _alloc_hostnum_cb@GOTPAGE
Lloh22:
	ldr	x21, [x21, _alloc_hostnum_cb@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	add	x0, sp, #12
	bl	_nodemgr_for_each_host
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #12]
	add	w8, w8, #1
	str	w8, [sp, #12]
	b	LBB0_3
LBB0_5:
Lloh23:
	adrp	x0, _host_num_alloc@GOTPAGE
Lloh24:
	ldr	x0, [x0, _host_num_alloc@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w8, [sp, #12]
	str	w8, [x19, #4]
	add	x21, x19, #8
Lloh25:
	adrp	x1, _nodemgr_dev_template_host@GOTPAGE
Lloh26:
	ldr	x1, [x1, _nodemgr_dev_template_host@GOTPAGEOFF]
	mov	x0, x21
	mov	w2, #16
	bl	_memcpy
	str	x20, [x19, #16]
	mov	x0, x20
	bl	_dev_to_node
	mov	x1, x0
	mov	x0, x21
	bl	_set_dev_node
	ldr	w2, [x19, #4]
Lloh27:
	adrp	x22, l_.str@PAGE
Lloh28:
	add	x22, x22, l_.str@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	bl	_dev_set_name
Lloh29:
	adrp	x8, _hpsb_host_class@GOTPAGE
Lloh30:
	ldr	x8, [x8, _hpsb_host_class@GOTPAGEOFF]
	mov	x20, x19
	stp	x8, x21, [x20, #24]!
	ldr	w2, [x19, #4]
	mov	x0, x20
	mov	x1, x22
	bl	_dev_set_name
	mov	x0, x21
	bl	_device_register
	cbnz	x0, LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_device_register
	cbz	x0, LBB0_10
; %bb.7:
	mov	x0, x21
	bl	_device_unregister
LBB0_8:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_9:
	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_10:
	mov	x0, x21
	bl	_get_device
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_csr_bus_ops,4,2                ; @csr_bus_ops
	.comm	_CSR_BUS_INFO_SIZE,4,2          ; @CSR_BUS_INFO_SIZE
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.comm	_delayed_reset_bus,4,2          ; @delayed_reset_bus
	.comm	_abort_timedouts,4,2            ; @abort_timedouts
	.comm	_host_num_alloc,4,2             ; @host_num_alloc
	.comm	_alloc_hostnum_cb,4,2           ; @alloc_hostnum_cb
	.comm	_nodemgr_dev_template_host,4,2  ; @nodemgr_dev_template_host
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fw-host%d"

	.comm	_hpsb_host_class,4,2            ; @hpsb_host_class
.subsections_via_symbols
