	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function h3600_pcmcia_hw_init
_h3600_pcmcia_hw_init:                  ## @h3600_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	%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	%rdi, %rbx
	cmpl	$0, (%rdi)
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	8(%rdi), %rax
	leaq	L_.str.3(%rip), %rdx
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rdx, %rsi
	movq	_SOC_STAT_CD@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	_SOC_STAT_RDY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rsi, (%rax,%rcx,8)
	callq	_soc_pcmcia_request_gpiods
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	xorl	%r14d, %r14d
	cmpl	$0, (%rbx)
	jne	LBB0_15
## %bb.2:
	movq	_H3XXX_EGPIO_OPT_NVRAM_ON@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_gpio_request
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_gpio_direction_output
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movq	_H3XXX_EGPIO_OPT_ON@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_gpio_request
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_gpio_direction_output
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movq	_H3XXX_EGPIO_OPT_RESET@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_gpio_request
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_gpio_direction_output
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	_H3XXX_EGPIO_CARD_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_gpio_request
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movl	(%r15), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_gpio_direction_output
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	movl	%eax, %r15d
	movq	_H3XXX_EGPIO_CARD_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gpio_free
	movl	%r15d, %r14d
LBB0_11:
	movl	(%r13), %edi
	callq	_gpio_free
LBB0_12:
	movl	(%r12), %edi
	callq	_gpio_free
LBB0_13:
	movl	(%rbx), %edi
	callq	_gpio_free
LBB0_14:
	movq	_H3XXX_GPIO_PCMCIA_IRQ0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gpio_free
LBB0_15:
	movl	%r14d, %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	"pcmcia1-detect"

L_.str.1:                               ## @.str.1
	.asciz	"pcmcia0-detect"

	.comm	_SOC_STAT_CD,8,3                ## @SOC_STAT_CD
L_.str.2:                               ## @.str.2
	.asciz	"pcmcia1-ready"

L_.str.3:                               ## @.str.3
	.asciz	"pcmcia0-ready"

	.comm	_SOC_STAT_RDY,8,3               ## @SOC_STAT_RDY
	.comm	_H3XXX_EGPIO_OPT_NVRAM_ON,4,2   ## @H3XXX_EGPIO_OPT_NVRAM_ON
L_.str.4:                               ## @.str.4
	.asciz	"OPT NVRAM ON"

	.comm	_H3XXX_EGPIO_OPT_ON,4,2         ## @H3XXX_EGPIO_OPT_ON
L_.str.5:                               ## @.str.5
	.asciz	"OPT ON"

	.comm	_H3XXX_EGPIO_OPT_RESET,4,2      ## @H3XXX_EGPIO_OPT_RESET
L_.str.6:                               ## @.str.6
	.asciz	"OPT RESET"

	.comm	_H3XXX_EGPIO_CARD_RESET,4,2     ## @H3XXX_EGPIO_CARD_RESET
L_.str.7:                               ## @.str.7
	.asciz	"PCMCIA CARD RESET"

	.comm	_H3XXX_GPIO_PCMCIA_IRQ0,4,2     ## @H3XXX_GPIO_PCMCIA_IRQ0
	.no_dead_strip	_h3600_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 h3600_pcmcia_hw_init
_h3600_pcmcia_hw_init:                  ; @h3600_pcmcia_hw_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, l_.str@PAGE
Lloh1:
	add	x9, x9, l_.str@PAGEOFF
Lloh2:
	adrp	x10, l_.str.1@PAGE
Lloh3:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	x9, [x0, #8]
Lloh4:
	adrp	x10, _SOC_STAT_CD@GOTPAGE
Lloh5:
	ldr	x10, [x10, _SOC_STAT_CD@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	str	x8, [x9, x10, lsl #3]
Lloh7:
	adrp	x8, l_.str.2@PAGE
Lloh8:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh9:
	adrp	x10, l_.str.3@PAGE
Lloh10:
	add	x10, x10, l_.str.3@PAGEOFF
	csel	x8, x10, x8, eq
Lloh11:
	adrp	x10, _SOC_STAT_RDY@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SOC_STAT_RDY@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	str	x8, [x9, x10, lsl #3]
	bl	_soc_pcmcia_request_gpiods
	mov	x19, x0
	cbnz	w0, LBB0_16
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.2:
	mov	w19, #0
	b	LBB0_16
LBB0_3:
Lloh14:
	adrp	x20, _H3XXX_EGPIO_OPT_NVRAM_ON@GOTPAGE
Lloh15:
	ldr	x20, [x20, _H3XXX_EGPIO_OPT_NVRAM_ON@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_gpio_request
	mov	x19, x0
	cbnz	w0, LBB0_15
; %bb.4:
	ldr	w0, [x20]
	mov	w1, #0
	bl	_gpio_direction_output
	mov	x19, x0
	cbnz	w0, LBB0_14
; %bb.5:
Lloh18:
	adrp	x21, _H3XXX_EGPIO_OPT_ON@GOTPAGE
Lloh19:
	ldr	x21, [x21, _H3XXX_EGPIO_OPT_ON@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_gpio_request
	mov	x19, x0
	cbnz	w0, LBB0_14
; %bb.6:
	ldr	w0, [x21]
	mov	w1, #0
	bl	_gpio_direction_output
	mov	x19, x0
	cbnz	w0, LBB0_13
; %bb.7:
Lloh22:
	adrp	x22, _H3XXX_EGPIO_OPT_RESET@GOTPAGE
Lloh23:
	ldr	x22, [x22, _H3XXX_EGPIO_OPT_RESET@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh24:
	adrp	x1, l_.str.6@PAGE
Lloh25:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_gpio_request
	mov	x19, x0
	cbnz	w0, LBB0_13
; %bb.8:
	ldr	w0, [x22]
	mov	w1, #0
	bl	_gpio_direction_output
	mov	x19, x0
	cbnz	w0, LBB0_12
; %bb.9:
Lloh26:
	adrp	x23, _H3XXX_EGPIO_CARD_RESET@GOTPAGE
Lloh27:
	ldr	x23, [x23, _H3XXX_EGPIO_CARD_RESET@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh28:
	adrp	x1, l_.str.7@PAGE
Lloh29:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_gpio_request
	mov	x19, x0
	cbnz	w0, LBB0_12
; %bb.10:
	ldr	w0, [x23]
	mov	w1, #0
	bl	_gpio_direction_output
	mov	x19, x0
	cbz	w0, LBB0_16
; %bb.11:
	ldr	w0, [x23]
	bl	_gpio_free
LBB0_12:
	ldr	w0, [x22]
	bl	_gpio_free
LBB0_13:
	ldr	w0, [x21]
	bl	_gpio_free
LBB0_14:
	ldr	w0, [x20]
	bl	_gpio_free
LBB0_15:
Lloh30:
	adrp	x8, _H3XXX_GPIO_PCMCIA_IRQ0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _H3XXX_GPIO_PCMCIA_IRQ0@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_gpio_free
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcmcia1-detect"

l_.str.1:                               ; @.str.1
	.asciz	"pcmcia0-detect"

	.comm	_SOC_STAT_CD,8,3                ; @SOC_STAT_CD
l_.str.2:                               ; @.str.2
	.asciz	"pcmcia1-ready"

l_.str.3:                               ; @.str.3
	.asciz	"pcmcia0-ready"

	.comm	_SOC_STAT_RDY,8,3               ; @SOC_STAT_RDY
	.comm	_H3XXX_EGPIO_OPT_NVRAM_ON,4,2   ; @H3XXX_EGPIO_OPT_NVRAM_ON
l_.str.4:                               ; @.str.4
	.asciz	"OPT NVRAM ON"

	.comm	_H3XXX_EGPIO_OPT_ON,4,2         ; @H3XXX_EGPIO_OPT_ON
l_.str.5:                               ; @.str.5
	.asciz	"OPT ON"

	.comm	_H3XXX_EGPIO_OPT_RESET,4,2      ; @H3XXX_EGPIO_OPT_RESET
l_.str.6:                               ; @.str.6
	.asciz	"OPT RESET"

	.comm	_H3XXX_EGPIO_CARD_RESET,4,2     ; @H3XXX_EGPIO_CARD_RESET
l_.str.7:                               ; @.str.7
	.asciz	"PCMCIA CARD RESET"

	.comm	_H3XXX_GPIO_PCMCIA_IRQ0,4,2     ; @H3XXX_GPIO_PCMCIA_IRQ0
	.no_dead_strip	_h3600_pcmcia_hw_init
.subsections_via_symbols
