	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_map_mem_page            ## -- Begin function pcmcia_map_mem_page
	.p2align	4, 0x90
_pcmcia_map_mem_page:                   ## @pcmcia_map_mem_page
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_IORESOURCE_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	(%rsi), %ebx
	movq	_WIN_FLAGS_REQ@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	sarl	$2, %ebx
	decl	%ebx
	movq	_MAX_WIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jae	LBB0_1
## %bb.2:
	movl	%edx, %r15d
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	8(%r12), %rax
	movl	%ebx, %ecx
	leaq	(%rax,%rcx,4), %rsi
	movl	%r15d, (%rax,%rcx,4)
	movq	16(%r12), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_4:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_BITS,4,2            ## @IORESOURCE_BITS
	.comm	_WIN_FLAGS_REQ,4,2              ## @WIN_FLAGS_REQ
	.comm	_MAX_WIN,4,2                    ## @MAX_WIN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set_mem_map\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_map_mem_page            ; -- Begin function pcmcia_map_mem_page
	.p2align	2
_pcmcia_map_mem_page:                   ; @pcmcia_map_mem_page
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _IORESOURCE_BITS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IORESOURCE_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _WIN_FLAGS_REQ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WIN_FLAGS_REQ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w8, w9
	asr	w8, w8, #2
	sub	w22, w8, #1
Lloh6:
	adrp	x8, _MAX_WIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_WIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w22, w8
	b.hs	LBB0_4
; %bb.1:
	mov	x21, x2
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	x0, x20
	bl	_mutex_lock
	ldp	x8, x9, [x20, #8]
	add	x1, x8, w22, uxtw #2
	str	w21, [x1]
	ldr	x8, [x9]
	mov	x0, x20
	blr	x8
	mov	x21, x0
	cbz	w0, LBB0_3
; %bb.2:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_3:
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_BITS,4,2            ; @IORESOURCE_BITS
	.comm	_WIN_FLAGS_REQ,4,2              ; @WIN_FLAGS_REQ
	.comm	_MAX_WIN,4,2                    ; @MAX_WIN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set_mem_map\n"

.subsections_via_symbols
