	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_connect_controllers            ## -- Begin function connect_controllers
	.p2align	4, 0x90
_connect_controllers:                   ## @connect_controllers
	.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
	movl	$0, -44(%rbp)
	movq	_BS@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_ByProtocol@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	-44(%rbp), %rcx
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	*(%rax)
	movq	%rax, %r14
	movq	_EFI_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_6
## %bb.1:
	movl	-44(%rbp), %edi
	callq	_malloc
	movq	%rax, %r13
	movq	%r12, %rax
	movl	-44(%rbp), %r12d
	movq	(%rax), %rax
	movl	(%rbx), %edi
	leaq	-44(%rbp), %rcx
	movq	%r15, %rsi
	xorl	%edx, %edx
	movq	%r13, %r8
	callq	*(%rax)
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_EFI_ERROR
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	cmpl	$4, %r12d
	movq	_BS@GOTPCREL(%rip), %r15
	jl	LBB0_5
## %bb.3:
	sarl	$2, %r12d
	cmpl	$2, %r12d
	movl	$1, %eax
	cmovll	%eax, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%r13,%rbx,4), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	*8(%rax)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_4
LBB0_5:
	movq	%r13, %rdi
	callq	_free
LBB0_6:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BS,8,3                         ## @BS
	.comm	_ByProtocol,4,2                 ## @ByProtocol
	.comm	_EFI_BUFFER_TOO_SMALL,8,3       ## @EFI_BUFFER_TOO_SMALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_connect_controllers            ; -- Begin function connect_controllers
	.p2align	2
_connect_controllers:                   ; @connect_controllers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x0
Lloh0:
	adrp	x22, _BS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BS@GOTPAGEOFF]
	str	wzr, [sp, #12]
	ldr	x8, [x22]
	ldr	x8, [x8]
Lloh2:
	adrp	x23, _ByProtocol@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ByProtocol@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x3, sp, #12
	mov	x1, x21
	mov	x2, #0
	mov	x4, #0
	blr	x8
	mov	x19, x0
Lloh4:
	adrp	x8, _EFI_BUFFER_TOO_SMALL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFI_BUFFER_TOO_SMALL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.1:
	ldr	w0, [sp, #12]
	bl	_malloc
	mov	x20, x0
	ldr	w24, [sp, #12]
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	w0, [x23]
	add	x3, sp, #12
	mov	x1, x21
	mov	x2, #0
	mov	x4, x20
	blr	x8
	mov	x19, x0
	bl	_EFI_ERROR
	cbnz	x0, LBB0_6
; %bb.2:
	cmp	w24, #4
	b.lt	LBB0_5
; %bb.3:
	asr	w8, w24, #2
	cmp	w8, #1
	csinc	w21, w8, wzr, gt
	mov	x23, x20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	ldr	w0, [x23], #4
	mov	x1, #0
	mov	x2, #0
	mov	w3, #1
	blr	x8
	subs	x21, x21, #1
	b.ne	LBB0_4
LBB0_5:
	mov	x0, x20
	bl	_free
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BS,8,3                         ; @BS
	.comm	_ByProtocol,4,2                 ; @ByProtocol
	.comm	_EFI_BUFFER_TOO_SMALL,8,3       ; @EFI_BUFFER_TOO_SMALL
.subsections_via_symbols
