	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddb_mci_attach                 ## -- Begin function ddb_mci_attach
	.p2align	4, 0x90
_ddb_mci_attach:                        ## @ddb_mci_attach
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %r15
	movq	(%r15), %r13
	movq	8(%r15), %r12
	shlq	$2, %r13
	addq	8(%r12), %r13
	cmpq	$0, 40(%rsi)
	cmoveq	%r13, %r15
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	36(%rsi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_match_base
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	incl	(%rax)
	movq	%rax, 40(%rbx)
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_10:
	leaq	16(%rbx), %r15
	movq	%rbx, %rdi
	addq	$24, %rdi
	movl	16(%r14), %esi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, 16(%rbx)
	movl	%r12d, 4(%rbx)
	movq	(%r14), %rax
	movq	%rax, (%r13)
	movl	%r12d, 8(%rbx)
	movl	%r12d, 12(%rbx)
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	*%rcx
	jmp	LBB0_12
LBB0_3:
	movl	32(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %rcx
	movq	%r15, 72(%rax)
	movq	%rax, %r15
	movl	$1, (%rcx)
	movq	%r13, 64(%rcx)
	movl	(%r12), %eax
	movl	%eax, 60(%rcx)
	leaq	56(%rcx), %rdi
	callq	_mutex_init
	leaq	52(%r15), %rdi
	callq	_mutex_init
	movl	(%r13), %esi
	movq	_mci_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_ddb_irq_set
	leaq	48(%r15), %rdi
	callq	_init_completion
	movq	%r15, 40(%rbx)
	movq	%rbx, %rdi
	callq	_probe
	testq	%rax, %rax
	js	LBB0_5
## %bb.8:
	movq	%r15, %rdi
	addq	$32, %rdi
	movq	_mci_list@GOTPCREL(%rip), %rsi
	callq	_list_add
	movq	24(%r14), %rax
	testq	%rax, %rax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	*%rax
	jmp	LBB0_10
LBB0_5:
	movq	%r15, %rdi
	callq	_kfree
LBB0_6:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_7:
	xorl	%r15d, %r15d
LBB0_12:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_mci_handler,4,2                ## @mci_handler
	.comm	_mci_list,4,2                   ## @mci_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddb_mci_attach                 ; -- Begin function ddb_mci_attach
	.p2align	2
_ddb_mci_attach:                        ; @ddb_mci_attach
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	ldr	x8, [x0]
	ldp	x9, x24, [x8]
	ldr	x10, [x24, #8]
	add	x26, x10, x9, lsl #2
	ldr	x9, [x1, #40]
	cmp	x9, #0
	csel	x25, x26, x8, eq
	ldr	w0, [x1, #36]
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x22, x0
	mov	x0, x25
	bl	_match_base
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w8, [x0]
	add	w8, w8, #1
	str	w8, [x0]
	str	x0, [x22, #40]
LBB0_3:
	add	x23, x22, #16
	add	x0, x22, #24
	ldr	w1, [x19, #16]
	mov	w2, #4
	bl	_memcpy
	str	x22, [x22, #16]
	ldr	x8, [x19]
	str	x8, [x21]
	stp	w20, w20, [x22, #4]
	str	w20, [x22, #12]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_12
; %bb.4:
	mov	x0, x22
	blr	x8
	b	LBB0_12
LBB0_5:
	ldr	w0, [x19, #32]
	ldr	w1, [x23]
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.6:
	mov	x23, x0
	mov	w8, #1
	str	w8, [x0]
	stp	x26, x25, [x0, #64]
	ldr	w8, [x24]
	str	w8, [x0, #60]
	add	x0, x0, #56
	bl	_mutex_init
	add	x0, x23, #52
	bl	_mutex_init
	ldr	w1, [x26]
Lloh2:
	adrp	x8, _mci_handler@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mci_handler@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x24
	mov	w2, #0
	mov	x4, x23
	bl	_ddb_irq_set
	add	x0, x23, #48
	bl	_init_completion
	str	x23, [x22, #40]
	mov	x0, x22
	bl	_probe
	tbnz	x0, #63, LBB0_9
; %bb.7:
	add	x0, x23, #32
Lloh5:
	adrp	x1, _mci_list@GOTPAGE
Lloh6:
	ldr	x1, [x1, _mci_list@GOTPAGEOFF]
	bl	_list_add
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_3
; %bb.8:
	mov	x0, x23
	blr	x8
	b	LBB0_3
LBB0_9:
	mov	x0, x23
	bl	_kfree
LBB0_10:
	mov	x0, x22
	bl	_kfree
LBB0_11:
	mov	x23, #0
LBB0_12:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_mci_handler,4,2                ; @mci_handler
	.comm	_mci_list,4,2                   ; @mci_list
.subsections_via_symbols
