	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hx4700_pcmcia_hw_init
_hx4700_pcmcia_hw_init:                 ## @hx4700_pcmcia_hw_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_gpios@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_gpio_request_array
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_GPIOD4_CF_nCD@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_gpio_to_irq
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_irq_set_irq_type
	movl	(%r15), %eax
	movq	(%r14), %rcx
	movq	_SOC_STAT_CD@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rdx
	movl	%eax, 8(%rcx,%rdx)
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rcx,%rdx)
	movq	_GPIO60_HX4700_CF_RNB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SOC_STAT_RDY@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rdx
	movl	%eax, 8(%rcx,%rdx)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rcx,%rdx)
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gpios,4,2                      ## @gpios
	.comm	_GPIOD4_CF_nCD,4,2              ## @GPIOD4_CF_nCD
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_SOC_STAT_CD,8,3                ## @SOC_STAT_CD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCMCIA CD"

	.comm	_GPIO60_HX4700_CF_RNB,4,2       ## @GPIO60_HX4700_CF_RNB
	.comm	_SOC_STAT_RDY,8,3               ## @SOC_STAT_RDY
L_.str.1:                               ## @.str.1
	.asciz	"PCMCIA Ready"

	.no_dead_strip	_hx4700_pcmcia_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hx4700_pcmcia_hw_init
_hx4700_pcmcia_hw_init:                 ; @hx4700_pcmcia_hw_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _gpios@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gpios@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_ARRAY_SIZE
	mov	x1, x0
	mov	x0, x19
	bl	_gpio_request_array
	mov	x19, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x21, _GPIOD4_CF_nCD@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GPIOD4_CF_nCD@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_gpio_to_irq
Lloh5:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_irq_set_irq_type
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _SOC_STAT_CD@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SOC_STAT_CD@GOTPAGEOFF]
	ldr	x10, [x20]
Lloh10:
	ldr	x9, [x9]
	add	x9, x10, x9, lsl #4
	str	w8, [x9, #8]
Lloh11:
	adrp	x8, l_.str@PAGE
Lloh12:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x9]
Lloh13:
	adrp	x8, _GPIO60_HX4700_CF_RNB@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GPIO60_HX4700_CF_RNB@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _SOC_STAT_RDY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SOC_STAT_RDY@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x9, x10, x9, lsl #4
	str	w8, [x9, #8]
Lloh19:
	adrp	x8, l_.str.1@PAGE
Lloh20:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x9]
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_gpios,4,2                      ; @gpios
	.comm	_GPIOD4_CF_nCD,4,2              ; @GPIOD4_CF_nCD
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_SOC_STAT_CD,8,3                ; @SOC_STAT_CD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCMCIA CD"

	.comm	_GPIO60_HX4700_CF_RNB,4,2       ; @GPIO60_HX4700_CF_RNB
	.comm	_SOC_STAT_RDY,8,3               ; @SOC_STAT_RDY
l_.str.1:                               ; @.str.1
	.asciz	"PCMCIA Ready"

	.no_dead_strip	_hx4700_pcmcia_hw_init
.subsections_via_symbols
