	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ems_pcmcia_probe
_ems_pcmcia_probe:                      ## @ems_pcmcia_probe
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_CONF_ENABLE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 28(%rdi)
	movl	$1, (%rdi)
	movq	_PRESENT_OPTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movq	8(%rdi), %rax
	movq	(%rax), %rcx
	movl	$16, (%rcx)
	movq	_IO_DATA_PATH_WIDTH_8@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, 4(%rcx)
	movq	8(%rax), %rcx
	movl	$16, (%rcx)
	movq	_IO_DATA_PATH_WIDTH_16@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, 4(%rcx)
	movl	$5, 4(%rdi)
	movq	_WIN_DATA_WIDTH_8@GOTPCREL(%rip), %rcx
	movq	_WIN_MEMORY_TYPE_CM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_WIN_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	16(%rax), %rsi
	movl	%edx, 4(%rsi)
	movl	$0, (%rsi)
	movl	$0, 8(%rsi)
	xorl	%edx, %edx
	callq	_pcmcia_request_window
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	addq	$16, %rbx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	8(%rbx), %rax
	movq	16(%rax), %rsi
	movl	20(%rbx), %edx
	movq	%rbx, %rdi
	callq	_pcmcia_map_mem_page
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	addq	$16, %rbx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movq	%rbx, %rdi
	callq	_pcmcia_enable_device
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	addq	$16, %rbx
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_err
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	movq	8(%rbx), %rax
	movq	16(%rax), %rax
	movl	8(%rax), %esi
	movq	%rbx, %rdi
	callq	_ems_pcmcia_add_card
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_CONF_ENABLE_IRQ,4,2            ## @CONF_ENABLE_IRQ
	.comm	_PRESENT_OPTION,4,2             ## @PRESENT_OPTION
	.comm	_IO_DATA_PATH_WIDTH_8,4,2       ## @IO_DATA_PATH_WIDTH_8
	.comm	_IO_DATA_PATH_WIDTH_16,4,2      ## @IO_DATA_PATH_WIDTH_16
	.comm	_WIN_DATA_WIDTH_8,4,2           ## @WIN_DATA_WIDTH_8
	.comm	_WIN_MEMORY_TYPE_CM,4,2         ## @WIN_MEMORY_TYPE_CM
	.comm	_WIN_ENABLE,4,2                 ## @WIN_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcmcia_request_window failed (err=%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"pcmcia_map_mem_page failed (err=%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"pcmcia_enable_device failed (err=%d)\n"

	.no_dead_strip	_ems_pcmcia_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ems_pcmcia_probe
lCPI0_0:
	.long	1                               ; 0x1
	.long	5                               ; 0x5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ems_pcmcia_probe:                      ; @ems_pcmcia_probe
	.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, x0
Lloh0:
	adrp	x8, _CONF_ENABLE_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONF_ENABLE_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x0, #28]
	orr	w8, w9, w8
	ldr	x9, [x0, #8]
	ldp	x10, x11, [x9]
	ldr	w12, [x10, #4]
Lloh3:
	adrp	x13, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x13, lCPI0_0@PAGEOFF]
	str	d0, [x0]
Lloh5:
	adrp	x13, _PRESENT_OPTION@GOTPAGE
Lloh6:
	ldr	x13, [x13, _PRESENT_OPTION@GOTPAGEOFF]
Lloh7:
	ldr	w13, [x13]
	stp	w13, w8, [x0, #24]
	mov	w8, #16
	str	w8, [x10]
Lloh8:
	adrp	x13, _IO_DATA_PATH_WIDTH_8@GOTPAGE
Lloh9:
	ldr	x13, [x13, _IO_DATA_PATH_WIDTH_8@GOTPAGEOFF]
Lloh10:
	ldr	w13, [x13]
	orr	w12, w12, w13
	str	w12, [x10, #4]
	str	w8, [x11]
Lloh11:
	adrp	x8, _IO_DATA_PATH_WIDTH_16@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IO_DATA_PATH_WIDTH_16@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w10, [x11, #4]
	orr	w8, w10, w8
	str	w8, [x11, #4]
Lloh14:
	adrp	x8, _WIN_DATA_WIDTH_8@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WIN_DATA_WIDTH_8@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x10, _WIN_MEMORY_TYPE_CM@GOTPAGE
Lloh18:
	ldr	x10, [x10, _WIN_MEMORY_TYPE_CM@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w8, w10, w8
Lloh20:
	adrp	x10, _WIN_ENABLE@GOTPAGE
Lloh21:
	ldr	x10, [x10, _WIN_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	orr	w8, w8, w10
	ldr	x1, [x9, #16]
	stp	wzr, w8, [x1]
	str	wzr, [x1, #8]
	mov	w2, #0
	bl	_pcmcia_request_window
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	add	x0, x19, #16
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	x1, [x8, #16]
	ldr	w2, [x19, #20]
	mov	x0, x19
	bl	_pcmcia_map_mem_page
	cbz	w0, LBB0_4
; %bb.3:
	mov	x2, x0
	add	x0, x19, #16
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_pcmcia_enable_device
	cbz	w0, LBB0_6
; %bb.5:
	mov	x2, x0
	add	x0, x19, #16
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_ems_pcmcia_add_card
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_CONF_ENABLE_IRQ,4,2            ; @CONF_ENABLE_IRQ
	.comm	_PRESENT_OPTION,4,2             ; @PRESENT_OPTION
	.comm	_IO_DATA_PATH_WIDTH_8,4,2       ; @IO_DATA_PATH_WIDTH_8
	.comm	_IO_DATA_PATH_WIDTH_16,4,2      ; @IO_DATA_PATH_WIDTH_16
	.comm	_WIN_DATA_WIDTH_8,4,2           ; @WIN_DATA_WIDTH_8
	.comm	_WIN_MEMORY_TYPE_CM,4,2         ; @WIN_MEMORY_TYPE_CM
	.comm	_WIN_ENABLE,4,2                 ; @WIN_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcmcia_request_window failed (err=%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"pcmcia_map_mem_page failed (err=%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"pcmcia_enable_device failed (err=%d)\n"

	.no_dead_strip	_ems_pcmcia_probe
.subsections_via_symbols
