	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcmcia_do_loop_config
_pcmcia_do_loop_config:                 ## @pcmcia_do_loop_config
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	96(%rdx), %r14
	movl	(%r14), %r13d
	movq	40(%r14), %rax
	movl	(%rax), %r15d
	leaq	28(%r14), %rdi
	movl	72(%rsi), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	72(%rbx), %eax
	movq	96(%r12), %rcx
	movl	%eax, 24(%rcx)
	movq	_CISTPL_CFTABLE_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.1:
	movups	64(%rbx), %xmm0
	movups	%xmm0, 80(%r12)
	movups	(%rbx), %xmm0
	movups	16(%rbx), %xmm1
	movups	32(%rbx), %xmm2
	movups	48(%rbx), %xmm3
	movups	%xmm3, 64(%r12)
	movups	%xmm2, 48(%r12)
	movups	%xmm1, 32(%r12)
	movups	%xmm0, 16(%r12)
LBB0_2:
	movq	_CONF_AUTO_CHECK_VCC@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_9
## %bb.3:
	movl	56(%rbx), %edx
	movq	_CISTPL_POWER_VNOM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movl	$1, %eax
	shll	%cl, %eax
	btl	%ecx, %edx
	jae	LBB0_7
## %bb.4:
	movq	64(%rbx), %rax
	jmp	LBB0_5
LBB0_7:
	testl	%eax, 72(%r12)
	je	LBB0_9
## %bb.8:
	movq	80(%r12), %rax
LBB0_5:
	movslq	(%rax,%rcx,4), %rax
	imulq	$1759218605, %rax, %rax         ## imm = 0x68DB8BAD
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$44, %rax
	addl	%ecx, %eax
	cmpl	%eax, %r15d
	jne	LBB0_6
LBB0_9:
	movq	_CONF_AUTO_SET_VPP@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_15
## %bb.10:
	movl	40(%rbx), %edx
	movq	_CISTPL_POWER_VNOM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movl	$1, %eax
	shll	%cl, %eax
	btl	%ecx, %edx
	jae	LBB0_12
## %bb.11:
	leaq	48(%rbx), %rax
	jmp	LBB0_14
LBB0_12:
	testl	%eax, 56(%r12)
	je	LBB0_15
## %bb.13:
	leaq	64(%r12), %rax
LBB0_14:
	movq	(%rax), %rax
	movslq	(%rax,%rcx,4), %rax
	imulq	$1759218605, %rax, %rax         ## imm = 0x68DB8BAD
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$44, %rax
	addl	%ecx, %eax
	movl	%eax, 4(%r14)
LBB0_15:
	movq	_CONF_AUTO_AUDIO@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_18
## %bb.16:
	movq	_CISTPL_CFTABLE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_18
## %bb.17:
	movq	_CONF_ENABLE_SPKR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_18:
	movq	_CONF_AUTO_SET_IO@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_24
## %bb.19:
	leaq	24(%rbx), %r15
	leaq	40(%r12), %rax
	cmpl	$0, 24(%rbx)
	cmoveq	%rax, %r15
	movq	16(%r14), %rcx
	movq	(%rcx), %rax
	movq	$0, (%rax)
	movq	8(%rcx), %rcx
	movq	$0, (%rcx)
	cmpl	$0, (%r15)
	je	LBB0_6
## %bb.20:
	movq	_IO_DATA_PATH_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, 8(%rax)
	movl	4(%r15), %edi
	callq	_pcmcia_io_cfg_data_width
	movq	16(%r14), %r9
	movq	(%r9), %rcx
	orl	8(%rcx), %eax
	movl	%eax, 8(%rcx)
	cmpl	$2, (%r15)
	movq	8(%r15), %rdx
	jl	LBB0_21
## %bb.22:
	movq	16(%rdx), %r8
	xorl	%esi, %esi
	xorl	%edi, %edi
	cmpq	(%rdx), %r8
	setg	%sil
	setle	%dil
	movq	8(%r9), %r8
	movl	%eax, 8(%r8)
	shlq	$4, %rdi
	movl	8(%rdx,%rdi), %eax
	movl	%eax, (%r8)
	movl	(%rdx,%rdi), %eax
	movl	%eax, 4(%r8)
	jmp	LBB0_23
LBB0_21:
	xorl	%esi, %esi
LBB0_23:
	shlq	$4, %rsi
	movl	8(%rdx,%rsi), %eax
	movl	%eax, (%rcx)
	movl	(%rdx,%rsi), %eax
	movl	%eax, 4(%rcx)
	movq	_CISTPL_IO_LINES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r15), %eax
	movl	%eax, 8(%r14)
LBB0_24:
	movq	_CONF_AUTO_SET_IOMEM@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_27
## %bb.25:
	leaq	8(%rbx), %rcx
	cmpq	$0, 8(%rbx)
	leaq	24(%r12), %rax
	cmoveq	%rax, %rcx
	movq	16(%r14), %rax
	movq	16(%rax), %rax
	movq	$0, (%rax)
	cmpq	$0, (%rcx)
	je	LBB0_6
## %bb.26:
	movq	8(%rcx), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rax)
	movl	8(%rcx), %edx
	cmpl	$4097, %edx                     ## imm = 0x1001
	movl	$4096, %esi                     ## imm = 0x1000
	cmovgel	%edx, %esi
	movl	%esi, 4(%rax)
	movl	16(%rcx), %eax
	movl	%eax, 32(%r14)
LBB0_27:
	movl	24(%r14), %edx
	movq	16(%r14), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %r8
	movq	16(%rax), %r9
	movl	8(%r14), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r12), %rax
	movl	8(%r12), %esi
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %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	"testing configuration %x, autoconf %x\n"

	.comm	_CISTPL_CFTABLE_DEFAULT,4,2     ## @CISTPL_CFTABLE_DEFAULT
	.comm	_CONF_AUTO_CHECK_VCC,4,2        ## @CONF_AUTO_CHECK_VCC
	.comm	_CISTPL_POWER_VNOM,4,2          ## @CISTPL_POWER_VNOM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CONF_AUTO_SET_VPP,4,2          ## @CONF_AUTO_SET_VPP
	.comm	_CONF_AUTO_AUDIO,4,2            ## @CONF_AUTO_AUDIO
	.comm	_CISTPL_CFTABLE_AUDIO,4,2       ## @CISTPL_CFTABLE_AUDIO
	.comm	_CONF_ENABLE_SPKR,4,2           ## @CONF_ENABLE_SPKR
	.comm	_CONF_AUTO_SET_IO,4,2           ## @CONF_AUTO_SET_IO
	.comm	_IO_DATA_PATH_WIDTH,4,2         ## @IO_DATA_PATH_WIDTH
	.comm	_CISTPL_IO_LINES_MASK,4,2       ## @CISTPL_IO_LINES_MASK
	.comm	_CONF_AUTO_SET_IOMEM,4,2        ## @CONF_AUTO_SET_IOMEM
L_.str.1:                               ## @.str.1
	.asciz	"checking configuration %x: %pr %pr %pr (%d lines)\n"

	.no_dead_strip	_pcmcia_do_loop_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcmcia_do_loop_config
_pcmcia_do_loop_config:                 ; @pcmcia_do_loop_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x22, x1
	ldr	x20, [x2, #96]
	ldr	w23, [x20]
	ldr	x8, [x20, #40]
	ldr	w24, [x8]
	add	x21, x20, #28
	ldr	w2, [x1, #72]
	str	x23, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	w8, [x22, #72]
	ldr	x9, [x19, #96]
	str	w8, [x9, #24]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _CISTPL_CFTABLE_DEFAULT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CISTPL_CFTABLE_DEFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	q0, [x22]
	str	q0, [x19, #16]
	ldp	q0, q1, [x22, #16]
	ldp	q2, q3, [x22, #48]
	stp	q2, q3, [x19, #64]
	stp	q0, q1, [x19, #32]
LBB0_2:
Lloh5:
	adrp	x8, _CONF_AUTO_CHECK_VCC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CONF_AUTO_CHECK_VCC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x8]
Lloh8:
	adrp	x8, _CISTPL_POWER_VNOM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CISTPL_POWER_VNOM@GOTPAGEOFF]
	tst	w9, w23
	b.eq	LBB0_8
; %bb.3:
	ldr	w11, [x22, #56]
	ldr	w9, [x8]
	sxtw	x9, w9
	mov	w10, #1
	lsl	w10, w10, w9
	tst	w10, w11
	b.eq	LBB0_5
; %bb.4:
	ldr	x10, [x22, #64]
	b	LBB0_7
LBB0_5:
	ldr	w11, [x19, #72]
	tst	w11, w10
	b.eq	LBB0_8
; %bb.6:
	ldr	x10, [x19, #80]
LBB0_7:
	ldrsw	x9, [x10, x9, lsl #2]
	mov	w10, #35757
	movk	w10, #26843, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #44
	add	w9, w9, w10
	cmp	w24, w9
	b.ne	LBB0_27
LBB0_8:
Lloh10:
	adrp	x9, _CONF_AUTO_SET_VPP@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CONF_AUTO_SET_VPP@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w23
	b.eq	LBB0_14
; %bb.9:
	ldr	w10, [x22, #40]
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w9, w9, w8
	tst	w9, w10
	b.eq	LBB0_11
; %bb.10:
	add	x9, x22, #48
	b	LBB0_13
LBB0_11:
	ldr	w10, [x19, #56]
	tst	w10, w9
	b.eq	LBB0_14
; %bb.12:
	add	x9, x19, #64
LBB0_13:
	sxtw	x8, w8
	ldr	x9, [x9]
	ldrsw	x8, [x9, x8, lsl #2]
	mov	w9, #35757
	movk	w9, #26843, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #44
	add	w8, w8, w9
	str	w8, [x20, #4]
LBB0_14:
Lloh13:
	adrp	x8, _CONF_AUTO_AUDIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CONF_AUTO_AUDIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_17
; %bb.15:
	ldr	w8, [x22]
Lloh16:
	adrp	x9, _CISTPL_CFTABLE_AUDIO@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CISTPL_CFTABLE_AUDIO@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
Lloh19:
	adrp	x8, _CONF_ENABLE_SPKR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CONF_ENABLE_SPKR@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_17:
Lloh22:
	adrp	x8, _CONF_AUTO_SET_IO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CONF_AUTO_SET_IO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_23
; %bb.18:
	mov	x8, x22
	ldr	w9, [x8, #24]!
	add	x10, x19, #40
	cmp	w9, #0
	csel	x24, x10, x8, eq
	ldr	x9, [x20, #16]
	movi.2d	v0, #0000000000000000
	ldp	x8, x9, [x9]
	str	d0, [x8]
	str	d0, [x9]
	ldr	w9, [x24]
	cbz	w9, LBB0_27
; %bb.19:
Lloh25:
	adrp	x9, _IO_DATA_PATH_WIDTH@GOTPAGE
Lloh26:
	ldr	x9, [x9, _IO_DATA_PATH_WIDTH@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	ldr	w10, [x8, #8]
	bic	w9, w10, w9
	str	w9, [x8, #8]
	ldr	w0, [x24, #4]
	bl	_pcmcia_io_cfg_data_width
	ldr	x10, [x20, #16]
	ldr	x8, [x10]
	ldr	w9, [x8, #8]
	orr	w11, w9, w0
	str	w11, [x8, #8]
	ldr	w12, [x24]
	ldr	x9, [x24, #8]
	cmp	w12, #2
	b.lt	LBB0_21
; %bb.20:
	ldr	x12, [x9, #16]
	ldr	x13, [x9]
	cmp	x12, x13
	cset	w12, gt
	cset	w13, le
	ldr	x10, [x10, #8]
	str	w11, [x10, #8]
	ldr	q0, [x9, w13, uxtw #4]
	xtn.2s	v0, v0
	rev64.2s	v0, v0
	str	d0, [x10]
	b	LBB0_22
LBB0_21:
	mov	x12, #0
LBB0_22:
	ldr	q0, [x9, x12, lsl #4]
	xtn.2s	v0, v0
	rev64.2s	v0, v0
	str	d0, [x8]
	ldr	w8, [x24, #4]
Lloh28:
	adrp	x9, _CISTPL_IO_LINES_MASK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CISTPL_IO_LINES_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x20, #8]
LBB0_23:
Lloh31:
	adrp	x8, _CONF_AUTO_SET_IOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CONF_AUTO_SET_IOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_26
; %bb.24:
	ldr	x8, [x22, #8]!
	add	x9, x19, #24
	cmp	x8, #0
	csel	x9, x9, x22, eq
	ldr	x8, [x20, #16]
	ldr	x8, [x8, #16]
	str	xzr, [x8]
	ldr	x10, [x9]
	cbz	x10, LBB0_27
; %bb.25:
	ldr	x9, [x9, #8]
	ldr	x10, [x9]
	ldr	w11, [x9, #8]
	mov	w12, #4096
	cmp	w11, #1, lsl #12                ; =4096
	csel	w11, w11, w12, gt
	stp	w10, w11, [x8]
	ldr	w8, [x9, #16]
	str	w8, [x20, #32]
LBB0_26:
	ldr	w2, [x20, #24]
	ldr	x8, [x20, #16]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	ldr	w9, [x20, #8]
	stp	x8, x9, [sp, #16]
	str	q0, [sp]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	x2, [x19]
	ldr	w1, [x19, #8]
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	br	x2
LBB0_27:
Lloh36:
	adrp	x8, _ENODEV@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"testing configuration %x, autoconf %x\n"

	.comm	_CISTPL_CFTABLE_DEFAULT,4,2     ; @CISTPL_CFTABLE_DEFAULT
	.comm	_CONF_AUTO_CHECK_VCC,4,2        ; @CONF_AUTO_CHECK_VCC
	.comm	_CISTPL_POWER_VNOM,4,2          ; @CISTPL_POWER_VNOM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CONF_AUTO_SET_VPP,4,2          ; @CONF_AUTO_SET_VPP
	.comm	_CONF_AUTO_AUDIO,4,2            ; @CONF_AUTO_AUDIO
	.comm	_CISTPL_CFTABLE_AUDIO,4,2       ; @CISTPL_CFTABLE_AUDIO
	.comm	_CONF_ENABLE_SPKR,4,2           ; @CONF_ENABLE_SPKR
	.comm	_CONF_AUTO_SET_IO,4,2           ; @CONF_AUTO_SET_IO
	.comm	_IO_DATA_PATH_WIDTH,4,2         ; @IO_DATA_PATH_WIDTH
	.comm	_CISTPL_IO_LINES_MASK,4,2       ; @CISTPL_IO_LINES_MASK
	.comm	_CONF_AUTO_SET_IOMEM,4,2        ; @CONF_AUTO_SET_IOMEM
l_.str.1:                               ; @.str.1
	.asciz	"checking configuration %x: %pr %pr %pr (%d lines)\n"

	.no_dead_strip	_pcmcia_do_loop_config
.subsections_via_symbols
