	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bt3c_config
_bt3c_config:                           ## @bt3c_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	_bt3c_check_config@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_pcmcia_loop_config
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	(%r15), %esi
	movl	$1, %edx
	movq	%rbx, %rdi
	callq	_pcmcia_loop_config
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movq	_bt3c_check_config_notpicky@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_pcmcia_loop_config
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_BT_ERR
	movq	_RequestIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %edx
	jmp	LBB0_4
LBB0_6:
	leaq	16(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_pcmcia_request_irq
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_RequestIRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_cs_error
	movq	$0, 16(%rbx)
LBB0_8:
	leaq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_pcmcia_request_configuration
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	_RequestConfiguration@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
LBB0_4:
	callq	_cs_error
	jmp	LBB0_5
LBB0_10:
	movq	%r14, %rdi
	callq	_bt3c_open
	testq	%rax, %rax
	je	LBB0_11
LBB0_5:
	movq	%rbx, %rdi
	callq	_bt3c_release
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r14), %edi
	movq	8(%r14), %rax
	movl	(%rax), %esi
	callq	_strcpy
	movq	%r14, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_bt3c_check_config,4,2          ## @bt3c_check_config
	.comm	_bt3c_check_config_notpicky,4,2 ## @bt3c_check_config_notpicky
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No usable port range found"

	.comm	_RequestIO,4,2                  ## @RequestIO
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_RequestIRQ,4,2                 ## @RequestIRQ
	.comm	_RequestConfiguration,4,2       ## @RequestConfiguration
	.no_dead_strip	_bt3c_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bt3c_config
_bt3c_config:                           ; @bt3c_config
	.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	x20, [x0, #24]
Lloh0:
	adrp	x22, _bt3c_check_config@GOTPAGE
Lloh1:
	ldr	x22, [x22, _bt3c_check_config@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, #0
	bl	_pcmcia_loop_config
Lloh2:
	adrp	x21, _ENODEV@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ENODEV@GOTPAGEOFF]
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #1
	bl	_pcmcia_loop_config
	cbz	w0, LBB0_4
; %bb.2:
Lloh4:
	adrp	x8, _bt3c_check_config_notpicky@GOTPAGE
Lloh5:
	ldr	x8, [x8, _bt3c_check_config_notpicky@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_pcmcia_loop_config
	cbz	w0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_ERR
Lloh9:
	adrp	x8, _RequestIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RequestIO@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w8, [x21]
	neg	w2, w8
	b	LBB0_8
LBB0_4:
	add	x1, x19, #16
	mov	x0, x19
	bl	_pcmcia_request_irq
	cbz	w0, LBB0_6
; %bb.5:
	mov	x2, x0
Lloh12:
	adrp	x8, _RequestIRQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RequestIRQ@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cs_error
	str	xzr, [x19, #16]
LBB0_6:
	add	x1, x19, #8
	mov	x0, x19
	bl	_pcmcia_request_configuration
	cbz	w0, LBB0_9
; %bb.7:
	mov	x2, x0
Lloh15:
	adrp	x8, _RequestConfiguration@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RequestConfiguration@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
LBB0_8:
	mov	x0, x19
	bl	_cs_error
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	bl	_bt3c_open
	cbz	x0, LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_bt3c_release
	ldr	w8, [x21]
	neg	w0, w8
LBB0_11:
	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_12:
	ldr	w0, [x20]
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
	bl	_strcpy
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_bt3c_check_config,4,2          ; @bt3c_check_config
	.comm	_bt3c_check_config_notpicky,4,2 ; @bt3c_check_config_notpicky
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No usable port range found"

	.comm	_RequestIO,4,2                  ; @RequestIO
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_RequestIRQ,4,2                 ; @RequestIRQ
	.comm	_RequestConfiguration,4,2       ; @RequestConfiguration
	.no_dead_strip	_bt3c_config
.subsections_via_symbols
