	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_fixup_iowidth           ## -- Begin function pcmcia_fixup_iowidth
	.p2align	4, 0x90
_pcmcia_fixup_iowidth:                  ## @pcmcia_fixup_iowidth
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -64(%rbp)
	movl	$1, -80(%rbp)
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	_SOCKET_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	8(%r15), %rax
	movq	_CONFIG_LOCKED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.3:
	movq	_io_speed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -116(%rbp)
	movq	_MAX_IO_WIN@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	leaq	-96(%rbp), %r15
	leaq	-136(%rbp), %r12
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, -92(%rbp)
	movl	%r14d, -132(%rbp)
	movq	_IO_DATA_PATH_WIDTH_8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MAP_ACTIVE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, -128(%rbp)
	movl	4(%rcx), %eax
	movl	%eax, -120(%rbp)
	movl	(%rcx), %eax
	movl	%eax, -124(%rbp)
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
	movl	$40, %edi
	callq	_msleep
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	*(%rax)
	movl	(%r13), %eax
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	_EACCES@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_9:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_4:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$104, %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 iowidth to 8bit\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
	.comm	_io_speed,4,2                   ## @io_speed
	.comm	_MAX_IO_WIN,4,2                 ## @MAX_IO_WIN
	.comm	_MAP_ACTIVE,4,2                 ## @MAP_ACTIVE
	.comm	_IO_DATA_PATH_WIDTH_8,4,2       ## @IO_DATA_PATH_WIDTH_8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcmcia_fixup_iowidth           ; -- Begin function pcmcia_fixup_iowidth
	.p2align	2
_pcmcia_fixup_iowidth:                  ; @pcmcia_fixup_iowidth
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x21, x0
	ldr	x20, [x0, #16]
	movi.2d	v0, #0000000000000000
	str	xzr, [sp, #80]
	stp	q0, q0, [sp, #48]
	mov	w8, #1
	str	w8, [sp, #64]
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _SOCKET_PRESENT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SOCKET_PRESENT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %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_7
; %bb.2:
Lloh8:
	adrp	x8, _io_speed@GOTPAGE
Lloh9:
	ldr	x8, [x8, _io_speed@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #28]
Lloh11:
	adrp	x21, _MAX_IO_WIN@GOTPAGE
Lloh12:
	ldr	x21, [x21, _MAX_IO_WIN@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x22, #0
Lloh13:
	adrp	x23, _MAP_ACTIVE@GOTPAGE
Lloh14:
	ldr	x23, [x23, _MAP_ACTIVE@GOTPAGEOFF]
Lloh15:
	adrp	x24, _IO_DATA_PATH_WIDTH_8@GOTPAGE
Lloh16:
	ldr	x24, [x24, _IO_DATA_PATH_WIDTH_8@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #16]
	ldr	x9, [x9, x22, lsl #3]
	cbz	x9, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w22, [sp, #52]
	ldr	w8, [x23]
	ldr	w10, [x24]
	orr	w8, w10, w8
	stp	w22, w8, [sp, #12]
	ldr	d0, [x9]
	stur	d0, [sp, #20]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	add	x1, sp, #48
	mov	x0, x20
	blr	x8
	mov	w0, #40
	bl	_msleep
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x20
	blr	x8
	ldr	w8, [x21]
	b	LBB0_4
LBB0_7:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
Lloh19:
	adrp	x8, _EACCES@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fixup iowidth to 8bit\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
	.comm	_io_speed,4,2                   ; @io_speed
	.comm	_MAX_IO_WIN,4,2                 ; @MAX_IO_WIN
	.comm	_MAP_ACTIVE,4,2                 ; @MAP_ACTIVE
	.comm	_IO_DATA_PATH_WIDTH_8,4,2       ; @IO_DATA_PATH_WIDTH_8
.subsections_via_symbols
