	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bluecard_hci_open
_bluecard_hci_open:                     ## @bluecard_hci_open
	.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, %rbx
	movq	8(%rdi), %r15
	movq	8(%r15), %rax
	movl	(%rax), %r14d
	movq	_CARD_HAS_PCCARD_ID@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_DEFAULT_BAUD_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bluecard_hci_set_baud_rate
LBB0_2:
	movq	_HCI_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movl	(%r12), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	addl	$48, %r14d
	movl	$40, %edi
	movl	%r14d, %esi
	callq	_outb
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CARD_HAS_PCCARD_ID,4,2         ## @CARD_HAS_PCCARD_ID
	.comm	_DEFAULT_BAUD_RATE,4,2          ## @DEFAULT_BAUD_RATE
	.comm	_HCI_RUNNING,4,2                ## @HCI_RUNNING
	.no_dead_strip	_bluecard_hci_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bluecard_hci_open
_bluecard_hci_open:                     ; @bluecard_hci_open
	.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
	ldr	x19, [x0, #8]
	ldr	x8, [x19, #8]
	ldr	w21, [x8]
Lloh0:
	adrp	x22, _CARD_HAS_PCCARD_ID@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CARD_HAS_PCCARD_ID@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _DEFAULT_BAUD_RATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DEFAULT_BAUD_RATE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_bluecard_hci_set_baud_rate
LBB0_2:
Lloh5:
	adrp	x8, _HCI_RUNNING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HCI_RUNNING@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_and_set_bit
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_5
; %bb.4:
	add	w1, w21, #48
	mov	w0, #40
	bl	_outb
LBB0_5:
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CARD_HAS_PCCARD_ID,4,2         ; @CARD_HAS_PCCARD_ID
	.comm	_DEFAULT_BAUD_RATE,4,2          ; @DEFAULT_BAUD_RATE
	.comm	_HCI_RUNNING,4,2                ; @HCI_RUNNING
	.no_dead_strip	_bluecard_hci_open
.subsections_via_symbols
