	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_fixup_vpp               ## -- Begin function pcmcia_fixup_vpp
	.p2align	4, 0x90
_pcmcia_fixup_vpp:                      ## @pcmcia_fixup_vpp
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	16(%rdi), %r14
	leaq	4(%r14), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	leaq	4(%r12), %r13
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_SOCKET_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_2
## %bb.1:
	movq	8(%r12), %rax
	movq	_CONFIG_LOCKED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.3:
	leaq	8(%r14), %rsi
	movb	%r15b, 8(%r14)
	movq	16(%r14), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_warn
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EACCES@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	movb	%r15b, (%r12)
	xorl	%ebx, %ebx
LBB0_6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fixup Vpp to %d\n"

	.comm	_SOCKET_PRESENT,4,2             ## @SOCKET_PRESENT
	.comm	_CONFIG_LOCKED,4,2              ## @CONFIG_LOCKED
L_.str.1:                               ## @.str.1
	.asciz	"No card? Config not locked?\n"

	.comm	_EACCES,4,2                     ## @EACCES
L_.str.2:                               ## @.str.2
	.asciz	"Unable to set VPP\n"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_fixup_vpp               ; -- Begin function pcmcia_fixup_vpp
	.p2align	2
_pcmcia_fixup_vpp:                      ; @pcmcia_fixup_vpp
	.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	x20, x1
	mov	x21, x0
	ldr	x23, [x0, #16]
	add	x19, x23, #4
	mov	x0, x19
	bl	_mutex_lock
	add	x22, x21, #4
	mov	w8, w20
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
	ldr	w8, [x23]
Lloh2:
	adrp	x9, _SOCKET_PRESENT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SOCKET_PRESENT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CONFIG_LOCKED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CONFIG_LOCKED@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x1, x23
	strb	w20, [x1, #8]!
	ldr	x8, [x23, #16]
	ldr	x8, [x8]
	mov	x0, x23
	blr	x8
	cbz	x0, LBB0_7
; %bb.3:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_dev_warn
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
Lloh14:
	adrp	x8, _EACCES@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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
LBB0_7:
	mov	w22, #0
	strb	w20, [x21]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fixup Vpp to %d\n"

	.comm	_SOCKET_PRESENT,4,2             ; @SOCKET_PRESENT
	.comm	_CONFIG_LOCKED,4,2              ; @CONFIG_LOCKED
l_.str.1:                               ; @.str.1
	.asciz	"No card? Config not locked?\n"

	.comm	_EACCES,4,2                     ; @EACCES
l_.str.2:                               ; @.str.2
	.asciz	"Unable to set VPP\n"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
