	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sa1111_pcmcia_configure_socket ## -- Begin function sa1111_pcmcia_configure_socket
	.p2align	4, 0x90
_sa1111_pcmcia_configure_socket:        ## @sa1111_pcmcia_configure_socket
	.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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_to_skt
	movq	%rax, %r14
	movl	(%rbx), %eax
	cmpl	$1, %eax
	je	LBB0_3
## %bb.1:
	movl	$-1, %r12d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	_PCCR_S0_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_PCCR_S0_FLT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r8d, %eax
	orl	%r9d, %eax
	movq	_PCCR_S0_PWAITEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_PCCR_S0_PSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movl	%edx, %r13d
	orl	%r10d, %r13d
	orl	%eax, %r13d
	movq	_PCCR_S1_PWAITEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PCCR_S1_PSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCCR_S1_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PCCR_S1_FLT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	jmp	LBB0_4
LBB0_3:
	movq	_PCCR_S1_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PCCR_S1_FLT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %ecx
	orl	%eax, %ecx
	movq	_PCCR_S1_PWAITEN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movq	_PCCR_S1_PSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%edi, %r13d
	orl	%esi, %r13d
	orl	%ecx, %r13d
	movq	_PCCR_S0_PWAITEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_PCCR_S0_PSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	_PCCR_S0_RST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_PCCR_S0_FLT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
LBB0_4:
	orl	%edx, %edi
	movl	(%r15), %ecx
	movl	4(%r15), %edx
	testl	%ecx, %ecx
	cmovel	%ecx, %edi
	orl	%r10d, %esi
	xorl	%r12d, %r12d
	cmpl	$50, %ecx
	cmovnel	%r12d, %esi
	orl	%edi, %esi
	movq	_SS_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	orl	%r9d, %eax
	testl	%ecx, %ecx
	cmovel	%ecx, %eax
	orl	%esi, %eax
	movq	_SS_OUTPUT_ENA@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	orl	%r8d, %ebx
	testl	%edx, %edx
	cmovel	%edx, %ebx
	orl	%eax, %ebx
	callq	_local_irq_save
	movq	(%r14), %rax
	movq	_PCCR@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%rax), %rdi
	callq	_readl_relaxed
	xorl	%eax, %ebx
	andl	%r13d, %ebx
	xorl	%eax, %ebx
	movq	(%r14), %rax
	movq	(%r15), %rsi
	addq	(%rax), %rsi
	movl	%ebx, %edi
	callq	_writel_relaxed
	callq	_local_irq_restore
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCCR_S0_RST,4,2                ## @PCCR_S0_RST
	.comm	_PCCR_S0_FLT,4,2                ## @PCCR_S0_FLT
	.comm	_PCCR_S0_PWAITEN,4,2            ## @PCCR_S0_PWAITEN
	.comm	_PCCR_S0_PSE,4,2                ## @PCCR_S0_PSE
	.comm	_PCCR_S1_RST,4,2                ## @PCCR_S1_RST
	.comm	_PCCR_S1_FLT,4,2                ## @PCCR_S1_FLT
	.comm	_PCCR_S1_PWAITEN,4,2            ## @PCCR_S1_PWAITEN
	.comm	_PCCR_S1_PSE,4,2                ## @PCCR_S1_PSE
	.comm	_SS_RESET,4,2                   ## @SS_RESET
	.comm	_SS_OUTPUT_ENA,4,2              ## @SS_OUTPUT_ENA
	.comm	_PCCR,8,3                       ## @PCCR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sa1111_pcmcia_configure_socket ; -- Begin function sa1111_pcmcia_configure_socket
	.p2align	2
_sa1111_pcmcia_configure_socket:        ; @sa1111_pcmcia_configure_socket
	.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
	mov	x20, x1
	mov	x21, x0
	bl	_to_skt
	mov	x19, x0
	ldr	w8, [x21]
	cmp	w8, #1
	b.eq	LBB0_3
; %bb.1:
	cbnz	w8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _PCCR_S0_RST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCCR_S0_RST@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _PCCR_S0_FLT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCCR_S0_FLT@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x8]
	orr	w8, w11, w9
Lloh6:
	adrp	x10, _PCCR_S0_PWAITEN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PCCR_S0_PWAITEN@GOTPAGEOFF]
Lloh8:
	ldr	w15, [x10]
	orr	w8, w8, w15
Lloh9:
	adrp	x10, _PCCR_S0_PSE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PCCR_S0_PSE@GOTPAGEOFF]
Lloh11:
	ldr	w13, [x10]
	orr	w21, w8, w13
Lloh12:
	adrp	x8, _PCCR_S1_PWAITEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCCR_S1_PWAITEN@GOTPAGEOFF]
Lloh14:
	ldr	w14, [x8]
Lloh15:
	adrp	x8, _PCCR_S1_PSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCCR_S1_PSE@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x8]
Lloh18:
	adrp	x8, _PCCR_S1_RST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCCR_S1_RST@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x10, _PCCR_S1_FLT@GOTPAGE
Lloh22:
	ldr	x10, [x10, _PCCR_S1_FLT@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	b	LBB0_4
LBB0_3:
Lloh24:
	adrp	x8, _PCCR_S1_RST@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PCCR_S1_RST@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _PCCR_S1_FLT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PCCR_S1_FLT@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x9]
	orr	w9, w10, w8
Lloh30:
	adrp	x11, _PCCR_S1_PWAITEN@GOTPAGE
Lloh31:
	ldr	x11, [x11, _PCCR_S1_PWAITEN@GOTPAGEOFF]
Lloh32:
	ldr	w14, [x11]
	orr	w9, w9, w14
Lloh33:
	adrp	x11, _PCCR_S1_PSE@GOTPAGE
Lloh34:
	ldr	x11, [x11, _PCCR_S1_PSE@GOTPAGEOFF]
Lloh35:
	ldr	w12, [x11]
	orr	w21, w9, w12
Lloh36:
	adrp	x9, _PCCR_S0_PWAITEN@GOTPAGE
Lloh37:
	ldr	x9, [x9, _PCCR_S0_PWAITEN@GOTPAGEOFF]
Lloh38:
	ldr	w15, [x9]
Lloh39:
	adrp	x9, _PCCR_S0_PSE@GOTPAGE
Lloh40:
	ldr	x9, [x9, _PCCR_S0_PSE@GOTPAGEOFF]
Lloh41:
	ldr	w13, [x9]
Lloh42:
	adrp	x9, _PCCR_S0_RST@GOTPAGE
Lloh43:
	ldr	x9, [x9, _PCCR_S0_RST@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
Lloh45:
	adrp	x11, _PCCR_S0_FLT@GOTPAGE
Lloh46:
	ldr	x11, [x11, _PCCR_S0_FLT@GOTPAGEOFF]
Lloh47:
	ldr	w11, [x11]
LBB0_4:
	orr	w14, w14, w15
	ldp	w15, w16, [x20]
	cmp	w15, #0
	csel	w14, wzr, w14, eq
	orr	w12, w12, w13
	cmp	w15, #50
	csel	w12, w12, wzr, eq
	orr	w12, w12, w14
Lloh48:
	adrp	x13, _SS_RESET@GOTPAGE
Lloh49:
	ldr	x13, [x13, _SS_RESET@GOTPAGEOFF]
Lloh50:
	ldr	w13, [x13]
	orr	w8, w8, w9
	tst	w13, w16
	csel	w8, wzr, w8, eq
Lloh51:
	adrp	x9, _SS_OUTPUT_ENA@GOTPAGE
Lloh52:
	ldr	x9, [x9, _SS_OUTPUT_ENA@GOTPAGEOFF]
	orr	w8, w12, w8
Lloh53:
	ldr	w9, [x9]
	orr	w10, w10, w11
	tst	w9, w16
	csel	w9, wzr, w10, eq
	orr	w20, w8, w9
	bl	_local_irq_save
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh54:
	adrp	x22, _PCCR@GOTPAGE
Lloh55:
	ldr	x22, [x22, _PCCR@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl_relaxed
	bic	w8, w0, w21
	and	w9, w20, w21
	orr	w0, w8, w9
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel_relaxed
	bl	_local_irq_restore
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	w0, #-1
LBB0_6:
	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	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_PCCR_S0_RST,4,2                ; @PCCR_S0_RST
	.comm	_PCCR_S0_FLT,4,2                ; @PCCR_S0_FLT
	.comm	_PCCR_S0_PWAITEN,4,2            ; @PCCR_S0_PWAITEN
	.comm	_PCCR_S0_PSE,4,2                ; @PCCR_S0_PSE
	.comm	_PCCR_S1_RST,4,2                ; @PCCR_S1_RST
	.comm	_PCCR_S1_FLT,4,2                ; @PCCR_S1_FLT
	.comm	_PCCR_S1_PWAITEN,4,2            ; @PCCR_S1_PWAITEN
	.comm	_PCCR_S1_PSE,4,2                ; @PCCR_S1_PSE
	.comm	_SS_RESET,4,2                   ; @SS_RESET
	.comm	_SS_OUTPUT_ENA,4,2              ; @SS_OUTPUT_ENA
	.comm	_PCCR,8,3                       ; @PCCR
.subsections_via_symbols
