	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcmcia_card_add
_pcmcia_card_add:                       ## @pcmcia_card_add
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, 12(%r15)
	je	LBB0_1
## %bb.3:
	movq	%r15, %rdi
	callq	_pcmcia_validate_mem
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	addq	$4, %r15
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	addq	$4, %r15
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_pccard_validate_cis
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	cmpl	$0, -44(%rbp)
	je	LBB0_7
## %bb.9:
	movq	_BIND_FN_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CISTPL_LONGLINK_MFC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rcx
	movq	%r15, %rdi
	callq	_pccard_read_tuple
	movl	$1, %r12d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movl	-40(%rbp), %r12d
LBB0_11:
	movl	%r12d, (%r15)
	xorl	%r14d, %r14d
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.12:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_pcmcia_device_add
	incl	%ebx
	cmpl	%ebx, %r12d
	jne	LBB0_13
	jmp	LBB0_14
LBB0_7:
	addq	$4, %r15
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no resources available, delaying card_add\n"

L_.str.1:                               ## @.str.1
	.asciz	"validating mem resources failed, delaying card_add\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid CIS or invalid resources\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_BIND_FN_ALL,4,2                ## @BIND_FN_ALL
	.comm	_CISTPL_LONGLINK_MFC,4,2        ## @CISTPL_LONGLINK_MFC
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_pcmcia_card_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcmcia_card_add
_pcmcia_card_add:                       ; @pcmcia_card_add
	.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	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_pcmcia_validate_mem
	cbz	x0, LBB0_7
; %bb.2:
	add	x0, x19, #4
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	add	x0, x19, #4
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_dbg
	mov	x0, x20
	bl	_mutex_unlock
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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_7:
	mov	x0, x20
	bl	_mutex_unlock
	add	x1, sp, #4
	mov	x0, x19
	bl	_pccard_validate_cis
	cbnz	w0, LBB0_13
; %bb.8:
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_13
; %bb.9:
Lloh6:
	adrp	x8, _BIND_FN_ALL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BIND_FN_ALL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _CISTPL_LONGLINK_MFC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CISTPL_LONGLINK_MFC@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	bl	_pccard_read_tuple
	ldr	w8, [sp, #8]
	cmp	w0, #0
	csinc	w21, w8, wzr, eq
	str	w21, [x19]
	cbz	w21, LBB0_12
; %bb.10:
	mov	w20, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_pcmcia_device_add
	add	w20, w20, #1
	cmp	w21, w20
	b.ne	LBB0_11
LBB0_12:
	mov	w0, #0
	b	LBB0_6
LBB0_13:
	add	x0, x19, #4
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no resources available, delaying card_add\n"

l_.str.1:                               ; @.str.1
	.asciz	"validating mem resources failed, delaying card_add\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid CIS or invalid resources\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_BIND_FN_ALL,4,2                ; @BIND_FN_ALL
	.comm	_CISTPL_LONGLINK_MFC,4,2        ; @CISTPL_LONGLINK_MFC
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_pcmcia_card_add
.subsections_via_symbols
