	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pccard_get_status
_pccard_get_status:                     ## @pccard_get_status
	.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
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movl	(%rdi), %r15d
	movq	_CARD_MAX_SLOTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jae	LBB0_3
## %bb.4:
	movq	_I365_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_exca_read_byte
	movl	%eax, %r12d
	movq	_I365_INTCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_exca_read_byte
	movq	_I365_PC_IOCARD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	movq	_I365_CS_STSCHG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	je	LBB0_12
## %bb.6:
	movq	_SS_STSCHG@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_28
LBB0_7:
	movq	_I365_CS_BVD1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%r12d, %ecx
	je	LBB0_8
## %bb.9:
	movq	_I365_CS_BVD2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%ecx, %edx
	andl	%r12d, %edx
	xorl	%eax, %eax
	cmpl	%ecx, %edx
	jne	LBB0_12
## %bb.10:
	movq	_SS_BATWARN@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movq	_SS_BATDEAD@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
LBB0_12:
	movq	_I365_CS_DETECT@GOTPCREL(%rip), %rcx
	movl	%r12d, %edx
	notl	%edx
	xorl	%ebx, %ebx
	andl	(%rcx), %edx
	jne	LBB0_14
## %bb.13:
	movq	_SS_DETECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_14:
	movq	_I365_CS_WRPROT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r12d, %ecx
	je	LBB0_16
## %bb.15:
	movq	_SS_WRPROT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_16:
	orl	%eax, %ebx
	movq	_I365_CS_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	je	LBB0_18
## %bb.17:
	movq	_SS_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	orl	%eax, %ecx
	orl	%ecx, %ebx
	movq	_I365_CS_POWERON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	je	LBB0_20
## %bb.19:
	movq	_SS_POWERON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_20:
	orl	%eax, %ebx
	movq	_CARD_VOLTAGE_SENSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_exca_read_byte
	cmpl	$128, %eax
	je	LBB0_24
## %bb.21:
	cmpl	$129, %eax
	je	LBB0_25
## %bb.22:
	cmpl	$130, %eax
	jne	LBB0_27
## %bb.23:
	movq	_SS_3VCARD@GOTPCREL(%rip), %rax
	movq	_SS_XVCARD@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	jmp	LBB0_27
LBB0_24:
	movq	_SS_XVCARD@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_25:
	movq	_SS_3VCARD@GOTPCREL(%rip), %rax
LBB0_26:
	orl	(%rax), %ebx
LBB0_27:
	movl	%ebx, (%r14)
	xorl	%eax, %eax
LBB0_28:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CARD_MAX_SLOTS,4,2             ## @CARD_MAX_SLOTS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I365_STATUS,4,2                ## @I365_STATUS
	.comm	_I365_INTCTL,4,2                ## @I365_INTCTL
	.comm	_I365_PC_IOCARD,4,2             ## @I365_PC_IOCARD
	.comm	_I365_CS_STSCHG,4,2             ## @I365_CS_STSCHG
	.comm	_SS_STSCHG,4,2                  ## @SS_STSCHG
	.comm	_I365_CS_BVD1,4,2               ## @I365_CS_BVD1
	.comm	_SS_BATDEAD,4,2                 ## @SS_BATDEAD
	.comm	_I365_CS_BVD2,4,2               ## @I365_CS_BVD2
	.comm	_SS_BATWARN,4,2                 ## @SS_BATWARN
	.comm	_I365_CS_DETECT,4,2             ## @I365_CS_DETECT
	.comm	_SS_DETECT,4,2                  ## @SS_DETECT
	.comm	_I365_CS_WRPROT,4,2             ## @I365_CS_WRPROT
	.comm	_SS_WRPROT,4,2                  ## @SS_WRPROT
	.comm	_I365_CS_READY,4,2              ## @I365_CS_READY
	.comm	_SS_READY,4,2                   ## @SS_READY
	.comm	_I365_CS_POWERON,4,2            ## @I365_CS_POWERON
	.comm	_SS_POWERON,4,2                 ## @SS_POWERON
	.comm	_CARD_VOLTAGE_SENSE,4,2         ## @CARD_VOLTAGE_SENSE
	.comm	_SS_3VCARD,4,2                  ## @SS_3VCARD
	.comm	_SS_XVCARD,4,2                  ## @SS_XVCARD
	.no_dead_strip	_pccard_get_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pccard_get_status
_pccard_get_status:                     ; @pccard_get_status
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_5
; %bb.2:
	ldr	w20, [x0]
Lloh0:
	adrp	x8, _CARD_MAX_SLOTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CARD_MAX_SLOTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.hs	LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _I365_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I365_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_exca_read_byte
	mov	x21, x0
Lloh6:
	adrp	x8, _I365_INTCTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I365_INTCTL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_exca_read_byte
Lloh9:
	adrp	x8, _I365_PC_IOCARD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I365_PC_IOCARD@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, _I365_CS_STSCHG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I365_CS_STSCHG@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _SS_STSCHG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SS_STSCHG@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w8, w21
	csel	w8, wzr, w9, eq
	b	LBB0_9
LBB0_5:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_6:
Lloh21:
	adrp	x8, _I365_CS_BVD1@GOTPAGE
Lloh22:
	ldr	x8, [x8, _I365_CS_BVD1@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.7:
Lloh24:
	adrp	x9, _I365_CS_BVD2@GOTPAGE
Lloh25:
	ldr	x9, [x9, _I365_CS_BVD2@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w9, w9, w8
	and	w9, w9, w21
Lloh27:
	adrp	x10, _SS_BATWARN@GOTPAGE
Lloh28:
	ldr	x10, [x10, _SS_BATWARN@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	cmp	w9, w8
	csel	w8, w10, wzr, eq
	b	LBB0_9
LBB0_8:
Lloh30:
	adrp	x8, _SS_BATDEAD@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SS_BATDEAD@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
LBB0_9:
Lloh33:
	adrp	x9, _I365_CS_DETECT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _I365_CS_DETECT@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
Lloh36:
	adrp	x10, _SS_DETECT@GOTPAGE
Lloh37:
	ldr	x10, [x10, _SS_DETECT@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	bics	wzr, w9, w21
	csel	w9, w10, wzr, eq
	orr	w8, w9, w8
Lloh39:
	adrp	x9, _I365_CS_WRPROT@GOTPAGE
Lloh40:
	ldr	x9, [x9, _I365_CS_WRPROT@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
Lloh42:
	adrp	x10, _SS_WRPROT@GOTPAGE
Lloh43:
	ldr	x10, [x10, _SS_WRPROT@GOTPAGEOFF]
Lloh44:
	ldr	w10, [x10]
	tst	w9, w21
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh45:
	adrp	x9, _I365_CS_READY@GOTPAGE
Lloh46:
	ldr	x9, [x9, _I365_CS_READY@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
Lloh48:
	adrp	x10, _SS_READY@GOTPAGE
Lloh49:
	ldr	x10, [x10, _SS_READY@GOTPAGEOFF]
Lloh50:
	ldr	w10, [x10]
	tst	w9, w21
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh51:
	adrp	x9, _I365_CS_POWERON@GOTPAGE
Lloh52:
	ldr	x9, [x9, _I365_CS_POWERON@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
Lloh54:
	adrp	x10, _SS_POWERON@GOTPAGE
Lloh55:
	ldr	x10, [x10, _SS_POWERON@GOTPAGEOFF]
Lloh56:
	ldr	w10, [x10]
	tst	w9, w21
	csel	w9, wzr, w10, eq
	orr	w21, w8, w9
Lloh57:
	adrp	x8, _CARD_VOLTAGE_SENSE@GOTPAGE
Lloh58:
	ldr	x8, [x8, _CARD_VOLTAGE_SENSE@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_exca_read_byte
	cmp	w0, #128
	b.eq	LBB0_13
; %bb.10:
	cmp	w0, #129
	b.eq	LBB0_14
; %bb.11:
	cmp	w0, #130
	b.ne	LBB0_16
; %bb.12:
Lloh60:
	adrp	x8, _SS_3VCARD@GOTPAGE
Lloh61:
	ldr	x8, [x8, _SS_3VCARD@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
Lloh63:
	adrp	x9, _SS_XVCARD@GOTPAGE
Lloh64:
	ldr	x9, [x9, _SS_XVCARD@GOTPAGEOFF]
Lloh65:
	ldr	w9, [x9]
	orr	w8, w8, w21
	orr	w21, w8, w9
	b	LBB0_16
LBB0_13:
Lloh66:
	adrp	x8, _SS_XVCARD@GOTPAGE
Lloh67:
	ldr	x8, [x8, _SS_XVCARD@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh68:
	adrp	x8, _SS_3VCARD@GOTPAGE
Lloh69:
	ldr	x8, [x8, _SS_3VCARD@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_16:
	mov	w0, #0
	str	w21, [x19]
LBB0_17:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh68, Lloh69
	.cfi_endproc
                                        ; -- End function
	.comm	_CARD_MAX_SLOTS,4,2             ; @CARD_MAX_SLOTS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I365_STATUS,4,2                ; @I365_STATUS
	.comm	_I365_INTCTL,4,2                ; @I365_INTCTL
	.comm	_I365_PC_IOCARD,4,2             ; @I365_PC_IOCARD
	.comm	_I365_CS_STSCHG,4,2             ; @I365_CS_STSCHG
	.comm	_SS_STSCHG,4,2                  ; @SS_STSCHG
	.comm	_I365_CS_BVD1,4,2               ; @I365_CS_BVD1
	.comm	_SS_BATDEAD,4,2                 ; @SS_BATDEAD
	.comm	_I365_CS_BVD2,4,2               ; @I365_CS_BVD2
	.comm	_SS_BATWARN,4,2                 ; @SS_BATWARN
	.comm	_I365_CS_DETECT,4,2             ; @I365_CS_DETECT
	.comm	_SS_DETECT,4,2                  ; @SS_DETECT
	.comm	_I365_CS_WRPROT,4,2             ; @I365_CS_WRPROT
	.comm	_SS_WRPROT,4,2                  ; @SS_WRPROT
	.comm	_I365_CS_READY,4,2              ; @I365_CS_READY
	.comm	_SS_READY,4,2                   ; @SS_READY
	.comm	_I365_CS_POWERON,4,2            ; @I365_CS_POWERON
	.comm	_SS_POWERON,4,2                 ; @SS_POWERON
	.comm	_CARD_VOLTAGE_SENSE,4,2         ; @CARD_VOLTAGE_SENSE
	.comm	_SS_3VCARD,4,2                  ; @SS_3VCARD
	.comm	_SS_XVCARD,4,2                  ; @SS_XVCARD
	.no_dead_strip	_pccard_get_status
.subsections_via_symbols
