	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_request_io              ## -- Begin function pcmcia_request_io
	.p2align	4, 0x90
_pcmcia_request_io:                     ## @pcmcia_request_io
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	24(%rdi), %r13
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	leaq	4(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	leaq	4(%rbx), %r15
	movq	8(%r14), %rdx
	leaq	24(%rdx), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_SOCKET_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_1
## %bb.3:
	movl	(%r14), %eax
	movq	_CONFIG_LOCKED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movq	_CONFIG_IO_REQ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	8(%r14), %rsi
	movl	8(%rbx), %edx
	movq	%r13, %rdi
	callq	_alloc_io_space
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movq	8(%r14), %rdx
	leaq	24(%rdx), %rsi
	cmpq	$0, 40(%rdx)
	je	LBB0_12
## %bb.9:
	movl	8(%rbx), %edx
	movq	%r13, %rdi
	callq	_alloc_io_space
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %r12d
	movq	8(%r14), %rax
	movq	16(%rax), %rcx
	movq	%rcx, -64(%rbp)
	movups	(%rax), %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	8(%r14), %rsi
	movq	%r13, %rdi
	callq	_release_io_space
	leaq	-80(%rbp), %rdi
	callq	_resource_size
	movq	8(%r14), %rcx
	movq	%rax, 16(%rcx)
	movq	-80(%rbp), %rax
	movq	%rax, (%rcx)
	movl	-72(%rbp), %eax
	movl	%eax, 8(%rcx)
	jmp	LBB0_14
LBB0_12:
	movq	$0, (%rsi)
	jmp	LBB0_13
LBB0_10:
	movq	8(%r14), %rdx
LBB0_13:
	movq	_CONFIG_IO_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movl	$1, (%rbx)
	leaq	24(%rdx), %rcx
	leaq	L_.str.4(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcmcia_request_io: %pR , %pR"

	.comm	_SOCKET_PRESENT,4,2             ## @SOCKET_PRESENT
L_.str.1:                               ## @.str.1
	.asciz	"pcmcia_request_io: No card present\n"

	.comm	_CONFIG_LOCKED,4,2              ## @CONFIG_LOCKED
L_.str.2:                               ## @.str.2
	.asciz	"Configuration is locked\n"

	.comm	_CONFIG_IO_REQ,4,2              ## @CONFIG_IO_REQ
L_.str.3:                               ## @.str.3
	.asciz	"IO already configured\n"

L_.str.4:                               ## @.str.4
	.asciz	"pcmcia_request_io succeeded: %pR , %pR"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_request_io              ; -- Begin function pcmcia_request_io
	.p2align	2
_pcmcia_request_io:                     ; @pcmcia_request_io
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x0
	ldp	x24, x23, [x0, #16]
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	add	x19, x23, #4
	mov	x0, x19
	bl	_mutex_lock
	add	x21, x22, #4
	ldr	x8, [x24, #8]
	add	x9, x8, #24
	stp	x8, x9, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	w8, [x23]
Lloh5:
	adrp	x9, _SOCKET_PRESENT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SOCKET_PRESENT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x24]
Lloh8:
	adrp	x9, _CONFIG_LOCKED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CONFIG_LOCKED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh15:
	adrp	x25, _CONFIG_IO_REQ@GOTPAGE
Lloh16:
	ldr	x25, [x25, _CONFIG_IO_REQ@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.5:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_6:
	mov	x0, x21
	bl	_dev_dbg
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	ldr	x1, [x24, #8]
	ldr	w2, [x22, #8]
	mov	x0, x23
	bl	_alloc_io_space
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.9:
	ldr	x8, [x24, #8]
	add	x1, x8, #24
	ldr	x9, [x8, #40]
	cbz	x9, LBB0_12
; %bb.10:
	ldr	w2, [x22, #8]
	mov	x0, x23
	bl	_alloc_io_space
	cbz	w0, LBB0_13
; %bb.11:
	mov	x20, x0
	ldr	x8, [x24, #8]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [sp, #32]
	str	q0, [sp, #16]
	ldr	x1, [x24, #8]
	mov	x0, x23
	bl	_release_io_space
	add	x0, sp, #16
	bl	_resource_size
	ldr	x8, [x24, #8]
	str	x0, [x8, #16]
	ldr	x9, [sp, #16]
	str	x9, [x8]
	ldr	w9, [sp, #24]
	str	w9, [x8, #8]
	b	LBB0_7
LBB0_12:
	str	xzr, [x1]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x24, #8]
LBB0_14:
	ldr	w9, [x25]
	ldr	w10, [x24]
	orr	w9, w10, w9
	str	w9, [x24]
	mov	w9, #1
	str	w9, [x22]
	add	x9, x8, #24
	stp	x8, x9, [sp]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	w20, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcmcia_request_io: %pR , %pR"

	.comm	_SOCKET_PRESENT,4,2             ; @SOCKET_PRESENT
l_.str.1:                               ; @.str.1
	.asciz	"pcmcia_request_io: No card present\n"

	.comm	_CONFIG_LOCKED,4,2              ; @CONFIG_LOCKED
l_.str.2:                               ; @.str.2
	.asciz	"Configuration is locked\n"

	.comm	_CONFIG_IO_REQ,4,2              ; @CONFIG_IO_REQ
l_.str.3:                               ; @.str.3
	.asciz	"IO already configured\n"

l_.str.4:                               ; @.str.4
	.asciz	"pcmcia_request_io succeeded: %pR , %pR"

.subsections_via_symbols
