	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsi_alloc_controller           ## -- Begin function hsi_alloc_controller
	.p2align	4, 0x90
_hsi_alloc_controller:                  ## @hsi_alloc_controller
	.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
	testl	%edi, %edi
	je	LBB0_8
## %bb.1:
	movl	%esi, %r14d
	movl	%edi, %ebx
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r15
	movl	%ebx, %edi
	movl	$8, %esi
	movl	%r14d, %edx
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movl	%ebx, (%r15)
	movq	%rax, 8(%r15)
	movq	_hsi_controller_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, %rdi
	addq	$16, %rdi
	movl	%eax, 16(%r15)
	callq	_device_initialize
	movl	%ebx, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$64, %edi
	movl	%r14d, %esi
	callq	_kzalloc
	movq	%rax, (%r12,%rbx,8)
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, (%rax)
	movq	_hsi_dummy_msg@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 56(%rax)
	movq	_hsi_dummy_cl@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 48(%rax)
	movq	(%r12,%rbx,8), %rax
	movq	%rcx, 40(%rax)
	movq	(%r12,%rbx,8), %rax
	movq	%rcx, 32(%rax)
	movq	(%r12,%rbx,8), %rax
	movq	%rcx, 24(%rax)
	movq	(%r12,%rbx,8), %rax
	movq	%rcx, 16(%rax)
	movq	(%r12,%rbx,8), %rdi
	addq	$12, %rdi
	callq	_mutex_init
	movq	(%r12,%rbx,8), %rdi
	addq	$8, %rdi
	callq	_BLOCKING_INIT_NOTIFIER_HEAD
	movq	(%r12,%rbx,8), %rdi
	addq	$4, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_set_name
	movq	_hsi_port_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	movl	%eax, 4(%rdi)
	addq	$4, %rdi
	callq	_device_initialize
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_5
	jmp	LBB0_9
LBB0_3:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	callq	_hsi_put_controller
LBB0_8:
	xorl	%r15d, %r15d
LBB0_9:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hsi_controller_release,4,2     ## @hsi_controller_release
	.comm	_hsi_dummy_msg,4,2              ## @hsi_dummy_msg
	.comm	_hsi_dummy_cl,8,3               ## @hsi_dummy_cl
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"port%d"

	.comm	_hsi_port_release,4,2           ## @hsi_port_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsi_alloc_controller           ; -- Begin function hsi_alloc_controller
	.p2align	2
_hsi_alloc_controller:                  ; @hsi_alloc_controller
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	w0, LBB0_8
; %bb.1:
	mov	x20, x1
	mov	x23, x0
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.2:
	mov	x0, x23
	mov	w1, #8
	mov	x2, x20
	bl	_kcalloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x21, x0
Lloh0:
	adrp	x8, _hsi_controller_release@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hsi_controller_release@GOTPAGEOFF]
	str	w23, [x19]
Lloh2:
	ldr	w8, [x8]
	mov	x0, x19
	str	w8, [x0, #16]!
	stur	x21, [x0, #-8]
	bl	_device_initialize
	mov	x22, #0
	mov	w24, w23
Lloh3:
	adrp	x25, _hsi_dummy_msg@GOTPAGE
Lloh4:
	ldr	x25, [x25, _hsi_dummy_msg@GOTPAGEOFF]
Lloh5:
	adrp	x26, _hsi_dummy_cl@GOTPAGE
Lloh6:
	ldr	x26, [x26, _hsi_dummy_cl@GOTPAGEOFF]
Lloh7:
	adrp	x27, _hsi_port_release@GOTPAGE
Lloh8:
	ldr	x27, [x27, _hsi_port_release@GOTPAGEOFF]
Lloh9:
	adrp	x23, l_.str@PAGE
Lloh10:
	add	x23, x23, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #64
	mov	x1, x20
	bl	_kzalloc
	str	x0, [x21, x22, lsl #3]
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w22, [x0]
	ldr	w8, [x25]
	str	w8, [x0, #56]
	ldr	x8, [x26]
	str	x8, [x0, #48]
	lsl	x28, x22, #3
	ldr	x9, [x21, x28]
	str	x8, [x9, #40]
	ldr	x9, [x21, x28]
	str	x8, [x9, #32]
	ldr	x9, [x21, x28]
	str	x8, [x9, #24]
	ldr	x9, [x21, x28]
	str	x8, [x9, #16]
	ldr	x8, [x21, x28]
	add	x0, x8, #12
	bl	_mutex_init
	ldr	x8, [x21, x28]
	add	x0, x8, #8
	bl	_BLOCKING_INIT_NOTIFIER_HEAD
	ldr	x8, [x21, x28]
	add	x0, x8, #4
	mov	x1, x23
	mov	x2, x22
	bl	_dev_set_name
	ldr	w8, [x27]
	ldr	x9, [x19, #8]
	ldr	x0, [x9, x28]
	str	w8, [x0, #4]!
	bl	_device_initialize
	add	x22, x22, #1
	cmp	x24, x22
	b.ne	LBB0_4
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_kfree
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_hsi_put_controller
LBB0_8:
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_hsi_controller_release,4,2     ; @hsi_controller_release
	.comm	_hsi_dummy_msg,4,2              ; @hsi_dummy_msg
	.comm	_hsi_dummy_cl,8,3               ; @hsi_dummy_cl
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"port%d"

	.comm	_hsi_port_release,4,2           ; @hsi_port_release
.subsections_via_symbols
