	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xxs1500_pcmcia_configure
_xxs1500_pcmcia_configure:              ## @xxs1500_pcmcia_configure
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	callq	_to_xxs_socket
	movq	%rax, %r14
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$33, %eax
	jne	LBB0_10
## %bb.3:
	xorl	%esi, %esi
	jmp	LBB0_4
LBB0_1:
	movl	$1, %esi
LBB0_4:
	movq	_GPIO_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gpio_set_value
	movl	4(%rbx), %eax
	movl	(%r14), %edx
	xorl	%eax, %edx
	movq	_SS_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %edx
	je	LBB0_8
## %bb.5:
	movq	_GPIO_RESET@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	testl	%eax, %ecx
	je	LBB0_7
## %bb.6:
	movl	$1, %esi
	callq	_gpio_set_value
	movq	_GPIO_OUTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_gpio_set_value
	jmp	LBB0_8
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	xorl	%esi, %esi
	callq	_gpio_set_value
	movq	_GPIO_OUTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_gpio_set_value
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
LBB0_8:
	movl	4(%rbx), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_POWER,4,2                 ## @GPIO_POWER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SS_RESET,4,2                   ## @SS_RESET
	.comm	_GPIO_RESET,4,2                 ## @GPIO_RESET
	.comm	_GPIO_OUTEN,4,2                 ## @GPIO_OUTEN
	.no_dead_strip	_xxs1500_pcmcia_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xxs1500_pcmcia_configure
_xxs1500_pcmcia_configure:              ; @xxs1500_pcmcia_configure
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_to_xxs_socket
	mov	x20, x0
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.1:
	cmp	w8, #33
	b.ne	LBB0_7
; %bb.2:
	mov	w1, #0
	b	LBB0_4
LBB0_3:
	mov	w1, #1
LBB0_4:
Lloh0:
	adrp	x8, _GPIO_POWER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_POWER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_gpio_set_value
	ldr	w8, [x19, #4]
	ldr	w9, [x20]
	eor	w10, w9, w8
Lloh3:
	adrp	x9, _SS_RESET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SS_RESET@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.5:
Lloh6:
	adrp	x10, _GPIO_RESET@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GPIO_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x10]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	mov	w1, #1
	bl	_gpio_set_value
Lloh9:
	adrp	x8, _GPIO_OUTEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPIO_OUTEN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_gpio_set_value
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	mov	w1, #0
	bl	_gpio_set_value
Lloh15:
	adrp	x8, _GPIO_OUTEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GPIO_OUTEN@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_gpio_set_value
	mov	w0, #500
	bl	_msleep
LBB0_9:
	mov	w0, #0
	ldr	w8, [x19, #4]
	str	w8, [x20]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_POWER,4,2                 ; @GPIO_POWER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SS_RESET,4,2                   ; @SS_RESET
	.comm	_GPIO_RESET,4,2                 ; @GPIO_RESET
	.comm	_GPIO_OUTEN,4,2                 ; @GPIO_OUTEN
	.no_dead_strip	_xxs1500_pcmcia_configure
.subsections_via_symbols
