	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function soc_common_pcmcia_set_mem_map
_soc_common_pcmcia_set_mem_map:         ## @soc_common_pcmcia_set_mem_map
	.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, %r13
	callq	_to_soc_pcmcia_socket
	movq	%rax, %r15
	movzwl	(%r13), %eax
	movq	8(%r13), %rcx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movzwl	%ax, %r8d
	movq	24(%r13), %r9
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	callq	_debug
	movl	16(%r13), %eax
	testl	%eax, %eax
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %rdx
	cmovneq	%rdx, %rcx
	movq	_MAP_ACTIVE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%eax, %esi
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rdx, %r8
	movq	_MAP_16BIT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%eax, %esi
	leaq	L_.str.5(%rip), %r9
	cmoveq	%rdx, %r9
	movq	_MAP_AUTOSZ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%eax, %esi
	leaq	L_.str.6(%rip), %r10
	cmoveq	%rdx, %r10
	movq	_MAP_0WS@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%eax, %esi
	leaq	L_.str.7(%rip), %r11
	cmoveq	%rdx, %r11
	movq	_MAP_WRPROT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%eax, %esi
	leaq	L_.str.8(%rip), %rbx
	cmoveq	%rdx, %rbx
	movq	_MAP_ATTRIB@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%eax, %esi
	leaq	L_.str.9(%rip), %r14
	cmoveq	%rdx, %r14
	movq	_MAP_USE_WAIT@GOTPCREL(%rip), %rsi
	andl	(%rsi), %eax
	leaq	L_.str.10(%rip), %r12
	cmoveq	%rdx, %r12
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	pushq	%r12
	pushq	%r14
	pushq	%rbx
	pushq	%r11
	pushq	%r10
	callq	_debug
	addq	$48, %rsp
	movq	8(%r13), %rax
	movq	_MAX_WIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_1
## %bb.2:
	movl	16(%r13), %ecx
	movq	_MAP_ACTIVE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ecx, %edx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	testw	%di, %di
	movl	$300, %esi                      ## imm = 0x12C
	cmovnel	%edi, %esi
	testl	%edx, %edx
	cmovel	%edx, %esi
	movq	_MAP_ATTRIB@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movq	%r15, %r14
	addq	$32, %r14
	testl	%ecx, %ecx
	cmovnel	%esi, %ecx
	movl	$0, %ebx
	cmovnel	%ebx, %esi
	leaq	24(%r15), %rdx
	cmoveq	%rdx, %r14
	movq	(%r15), %rdx
	movw	%cx, (%rdx,%rax,2)
	movq	8(%r15), %rcx
	movw	%si, (%rcx,%rax,2)
	movq	16(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movq	24(%r13), %rax
	addq	(%r14), %rax
	movq	%rax, 32(%r13)
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %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	"map %u speed %u card_start %08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"flags: %s%s%s%s%s%s%s%s\n"

L_.str.2:                               ## @.str.2
	.asciz	"<NONE>"

L_.str.3:                               ## @.str.3
	.space	1

	.comm	_MAP_ACTIVE,4,2                 ## @MAP_ACTIVE
L_.str.4:                               ## @.str.4
	.asciz	"ACTIVE "

	.comm	_MAP_16BIT,4,2                  ## @MAP_16BIT
L_.str.5:                               ## @.str.5
	.asciz	"16BIT "

	.comm	_MAP_AUTOSZ,4,2                 ## @MAP_AUTOSZ
L_.str.6:                               ## @.str.6
	.asciz	"AUTOSZ "

	.comm	_MAP_0WS,4,2                    ## @MAP_0WS
L_.str.7:                               ## @.str.7
	.asciz	"0WS "

	.comm	_MAP_WRPROT,4,2                 ## @MAP_WRPROT
L_.str.8:                               ## @.str.8
	.asciz	"WRPROT "

	.comm	_MAP_ATTRIB,4,2                 ## @MAP_ATTRIB
L_.str.9:                               ## @.str.9
	.asciz	"ATTRIB "

	.comm	_MAP_USE_WAIT,4,2               ## @MAP_USE_WAIT
L_.str.10:                              ## @.str.10
	.asciz	"USE_WAIT "

	.comm	_MAX_WIN,8,3                    ## @MAX_WIN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_soc_common_pcmcia_set_mem_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function soc_common_pcmcia_set_mem_map
_soc_common_pcmcia_set_mem_map:         ; @soc_common_pcmcia_set_mem_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	bl	_to_soc_pcmcia_socket
	mov	x20, x0
	ldrh	w21, [x19]
	ldr	x8, [x19, #8]
	ldr	x9, [x19, #24]
	stp	x21, x9, [sp, #8]
	str	x8, [sp]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #2
	bl	_debug
Lloh2:
	adrp	x8, l_.str.3@PAGE
Lloh3:
	add	x8, x8, l_.str.3@PAGEOFF
	ldr	w9, [x19, #16]
Lloh4:
	adrp	x10, l_.str.2@PAGE
Lloh5:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w9, #0
Lloh6:
	adrp	x22, _MAP_ACTIVE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MAP_ACTIVE@GOTPAGEOFF]
	csel	x10, x10, x8, eq
	ldr	w11, [x22]
Lloh8:
	adrp	x12, l_.str.4@PAGE
Lloh9:
	add	x12, x12, l_.str.4@PAGEOFF
	tst	w11, w9
	csel	x11, x8, x12, eq
Lloh10:
	adrp	x12, _MAP_16BIT@GOTPAGE
Lloh11:
	ldr	x12, [x12, _MAP_16BIT@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
Lloh13:
	adrp	x13, l_.str.5@PAGE
Lloh14:
	add	x13, x13, l_.str.5@PAGEOFF
	tst	w12, w9
	csel	x12, x8, x13, eq
Lloh15:
	adrp	x13, _MAP_AUTOSZ@GOTPAGE
Lloh16:
	ldr	x13, [x13, _MAP_AUTOSZ@GOTPAGEOFF]
Lloh17:
	ldr	w13, [x13]
Lloh18:
	adrp	x14, l_.str.6@PAGE
Lloh19:
	add	x14, x14, l_.str.6@PAGEOFF
	tst	w13, w9
	csel	x13, x8, x14, eq
Lloh20:
	adrp	x14, _MAP_0WS@GOTPAGE
Lloh21:
	ldr	x14, [x14, _MAP_0WS@GOTPAGEOFF]
Lloh22:
	adrp	x15, l_.str.7@PAGE
Lloh23:
	add	x15, x15, l_.str.7@PAGEOFF
Lloh24:
	ldr	w14, [x14]
	tst	w14, w9
	csel	x14, x8, x15, eq
Lloh25:
	adrp	x15, _MAP_WRPROT@GOTPAGE
Lloh26:
	ldr	x15, [x15, _MAP_WRPROT@GOTPAGEOFF]
Lloh27:
	ldr	w15, [x15]
Lloh28:
	adrp	x16, l_.str.8@PAGE
Lloh29:
	add	x16, x16, l_.str.8@PAGEOFF
	tst	w15, w9
	csel	x15, x8, x16, eq
Lloh30:
	adrp	x23, _MAP_ATTRIB@GOTPAGE
Lloh31:
	ldr	x23, [x23, _MAP_ATTRIB@GOTPAGEOFF]
	ldr	w16, [x23]
Lloh32:
	adrp	x17, l_.str.9@PAGE
Lloh33:
	add	x17, x17, l_.str.9@PAGEOFF
	tst	w16, w9
Lloh34:
	adrp	x16, _MAP_USE_WAIT@GOTPAGE
Lloh35:
	ldr	x16, [x16, _MAP_USE_WAIT@GOTPAGEOFF]
	csel	x17, x8, x17, eq
Lloh36:
	ldr	w16, [x16]
Lloh37:
	adrp	x0, l_.str.10@PAGE
Lloh38:
	add	x0, x0, l_.str.10@PAGEOFF
	tst	w16, w9
	csel	x8, x8, x0, eq
	stp	x17, x8, [sp, #48]
	stp	x14, x15, [sp, #32]
Lloh39:
	adrp	x2, l_.str.1@PAGE
Lloh40:
	add	x2, x2, l_.str.1@PAGEOFF
	stp	x12, x13, [sp, #16]
	stp	x10, x11, [sp]
	mov	x0, x20
	mov	w1, #2
	bl	_debug
	ldr	x8, [x19, #8]
Lloh41:
	adrp	x9, _MAX_WIN@GOTPAGE
Lloh42:
	ldr	x9, [x9, _MAX_WIN@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_2
; %bb.1:
	ldr	w9, [x19, #16]
	ldr	w10, [x22]
	mov	w11, #300
	cmp	w21, #0
	csel	w11, w11, w21, eq
	tst	w10, w9
	csel	w10, wzr, w11, eq
	ldr	w11, [x23]
	add	x12, x20, #24
	add	x13, x20, #32
	tst	w11, w9
	csel	w9, wzr, w10, eq
	csel	w10, w10, wzr, eq
	csel	x21, x12, x13, eq
	lsl	x8, x8, #1
	ldp	x11, x12, [x20]
	strh	w9, [x11, x8]
	strh	w10, [x12, x8]
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	mov	w0, #0
	ldr	x8, [x21]
	ldr	x9, [x19, #24]
	add	x8, x9, x8
	str	x8, [x19, #32]
	b	LBB0_3
LBB0_2:
Lloh44:
	adrp	x8, _EINVAL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"map %u speed %u card_start %08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"flags: %s%s%s%s%s%s%s%s\n"

l_.str.2:                               ; @.str.2
	.asciz	"<NONE>"

l_.str.3:                               ; @.str.3
	.space	1

	.comm	_MAP_ACTIVE,4,2                 ; @MAP_ACTIVE
l_.str.4:                               ; @.str.4
	.asciz	"ACTIVE "

	.comm	_MAP_16BIT,4,2                  ; @MAP_16BIT
l_.str.5:                               ; @.str.5
	.asciz	"16BIT "

	.comm	_MAP_AUTOSZ,4,2                 ; @MAP_AUTOSZ
l_.str.6:                               ; @.str.6
	.asciz	"AUTOSZ "

	.comm	_MAP_0WS,4,2                    ; @MAP_0WS
l_.str.7:                               ; @.str.7
	.asciz	"0WS "

	.comm	_MAP_WRPROT,4,2                 ; @MAP_WRPROT
l_.str.8:                               ; @.str.8
	.asciz	"WRPROT "

	.comm	_MAP_ATTRIB,4,2                 ; @MAP_ATTRIB
l_.str.9:                               ; @.str.9
	.asciz	"ATTRIB "

	.comm	_MAP_USE_WAIT,4,2               ; @MAP_USE_WAIT
l_.str.10:                              ; @.str.10
	.asciz	"USE_WAIT "

	.comm	_MAX_WIN,8,3                    ; @MAX_WIN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_soc_common_pcmcia_set_mem_map
.subsections_via_symbols
