	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function db1x_pcmcia_setup_irqs
_db1x_pcmcia_setup_irqs:                ## @db1x_pcmcia_setup_irqs
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %edi
	cmpl	$-1, %edi
	je	LBB0_2
## %bb.1:
	movq	_db1000_pcmcia_stschgirq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_request_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
LBB0_2:
	movq	8(%r15), %rax
	movq	_BOARD_TYPE_DB1200@GOTPCREL(%rip), %rcx
	movl	16(%r15), %edi
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_BOARD_TYPE_DB1300@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.11:
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_irq_set_irq_type
	movl	16(%r15), %edi
	movq	_db1000_pcmcia_cdirq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_request_irq
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_15
LBB0_4:
	movq	_db1200_pcmcia_cdirq@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_db1200_pcmcia_cdirq_fn@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %r8
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_request_threaded_irq
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movl	20(%r15), %edi
	movl	(%r12), %esi
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %r8
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r14d
	movl	16(%r15), %edi
	movq	%r15, %rsi
	callq	_free_irq
LBB0_12:
	movl	(%r15), %edi
	cmpl	$-1, %edi
	je	LBB0_14
## %bb.13:
	movq	%r15, %rsi
	callq	_free_irq
LBB0_14:
	movl	%r14d, %ebx
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r15, %rdi
	callq	_db1x_card_inserted
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	20(%r15), %edi
	jmp	LBB0_9
LBB0_10:
	movl	16(%r15), %edi
LBB0_9:
	callq	_enable_irq
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_db1000_pcmcia_stschgirq,4,2    ## @db1000_pcmcia_stschgirq
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcmcia_stschg"

	.comm	_BOARD_TYPE_DB1200,8,3          ## @BOARD_TYPE_DB1200
	.comm	_BOARD_TYPE_DB1300,8,3          ## @BOARD_TYPE_DB1300
	.comm	_db1200_pcmcia_cdirq,4,2        ## @db1200_pcmcia_cdirq
	.comm	_db1200_pcmcia_cdirq_fn,4,2     ## @db1200_pcmcia_cdirq_fn
L_.str.1:                               ## @.str.1
	.asciz	"pcmcia_insert"

L_.str.2:                               ## @.str.2
	.asciz	"pcmcia_eject"

	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_db1000_pcmcia_cdirq,4,2        ## @db1000_pcmcia_cdirq
L_.str.3:                               ## @.str.3
	.asciz	"pcmcia_carddetect"

	.no_dead_strip	_db1x_pcmcia_setup_irqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function db1x_pcmcia_setup_irqs
_db1x_pcmcia_setup_irqs:                ; @db1x_pcmcia_setup_irqs
	.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	x19, x0
	ldr	w0, [x0]
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _db1000_pcmcia_stschgirq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _db1000_pcmcia_stschgirq@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	mov	x20, x0
	cbnz	w0, LBB0_9
LBB0_2:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _BOARD_TYPE_DB1200@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BOARD_TYPE_DB1200@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _BOARD_TYPE_DB1300@GOTPAGE
Lloh9:
	ldr	x10, [x10, _BOARD_TYPE_DB1300@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	ldr	w0, [x19, #16]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.3:
Lloh11:
	adrp	x21, _db1200_pcmcia_cdirq@GOTPAGE
Lloh12:
	ldr	x21, [x21, _db1200_pcmcia_cdirq@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh13:
	adrp	x22, _db1200_pcmcia_cdirq_fn@GOTPAGE
Lloh14:
	ldr	x22, [x22, _db1200_pcmcia_cdirq_fn@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh15:
	adrp	x4, l_.str.1@PAGE
Lloh16:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	w3, #0
	mov	x5, x19
	bl	_request_threaded_irq
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	w0, [x19, #20]
	ldr	w1, [x21]
	ldr	w2, [x22]
Lloh17:
	adrp	x4, l_.str.2@PAGE
Lloh18:
	add	x4, x4, l_.str.2@PAGEOFF
	mov	w3, #0
	mov	x5, x19
	bl	_request_threaded_irq
	cbz	w0, LBB0_10
; %bb.5:
	mov	x20, x0
	ldr	w0, [x19, #16]
	mov	x1, x19
	bl	_free_irq
	b	LBB0_7
LBB0_6:
Lloh19:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_irq_set_irq_type
	ldr	w0, [x19, #16]
Lloh22:
	adrp	x8, _db1000_pcmcia_cdirq@GOTPAGE
Lloh23:
	ldr	x8, [x8, _db1000_pcmcia_cdirq@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x3, l_.str.3@PAGE
Lloh26:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	mov	x20, x0
	cbz	w0, LBB0_9
LBB0_7:
	ldr	w0, [x19]
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.8:
	mov	x1, x19
	bl	_free_irq
LBB0_9:
	mov	x0, x20
	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
LBB0_10:
	mov	x0, x19
	bl	_db1x_card_inserted
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w0, [x19, #20]
	b	LBB0_13
LBB0_12:
	ldr	w0, [x19, #16]
LBB0_13:
	bl	_enable_irq
	mov	w20, #0
	b	LBB0_9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_db1000_pcmcia_stschgirq,4,2    ; @db1000_pcmcia_stschgirq
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcmcia_stschg"

	.comm	_BOARD_TYPE_DB1200,8,3          ; @BOARD_TYPE_DB1200
	.comm	_BOARD_TYPE_DB1300,8,3          ; @BOARD_TYPE_DB1300
	.comm	_db1200_pcmcia_cdirq,4,2        ; @db1200_pcmcia_cdirq
	.comm	_db1200_pcmcia_cdirq_fn,4,2     ; @db1200_pcmcia_cdirq_fn
l_.str.1:                               ; @.str.1
	.asciz	"pcmcia_insert"

l_.str.2:                               ; @.str.2
	.asciz	"pcmcia_eject"

	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_db1000_pcmcia_cdirq,4,2        ; @db1000_pcmcia_cdirq
l_.str.3:                               ; @.str.3
	.asciz	"pcmcia_carddetect"

	.no_dead_strip	_db1x_pcmcia_setup_irqs
.subsections_via_symbols
