	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl92c_bt_state_change
_rtl92c_bt_state_change:                ## @rtl92c_bt_state_change
	.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
	callq	_rtl_priv
	movq	%rax, %r13
	movq	24(%rax), %rax
	movq	_MAC80211_LINKED@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	jl	LBB0_34
## %bb.1:
	movq	%r13, %rdi
	movl	$1277, %esi                     ## imm = 0x4FD
	callq	_rtl_read_byte
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	$1160, %esi                     ## imm = 0x488
	callq	_rtl_read_dword
	movl	%eax, %ebx
	movq	_BT_MASK@GOTPCREL(%rip), %r12
	andl	(%r12), %ebx
	movq	%r13, %rdi
	movl	$1164, %esi                     ## imm = 0x48C
	callq	_rtl_read_dword
	movl	%eax, %r14d
	andl	(%r12), %r14d
	movq	%r13, %rdi
	movl	$1168, %esi                     ## imm = 0x490
	callq	_rtl_read_dword
	xorl	%edx, %edx
	movl	%eax, %r15d
	cmpl	(%r12), %ebx
	jne	LBB0_5
## %bb.2:
	cmpl	%ebx, %r14d
	jne	LBB0_5
## %bb.3:
	cmpl	$-1, %r15d
	jne	LBB0_5
## %bb.4:
	cmpl	$255, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_34
LBB0_5:
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_BIT_OFFSET_LEN_MASK_32
	movl	%eax, %r12d
	andl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	cmpl	(%r13), %r12d
	jne	LBB0_11
## %bb.6:
	imull	$1000, %ebx, %eax               ## imm = 0x3E8
	cltd
	idivl	%r15d
	movl	%eax, %ecx
	imull	$1000, %r14d, %eax              ## imm = 0x3E8
	cltd
	idivl	%r15d
                                        ## kill: def $eax killed $eax def $rax
	movl	%ecx, 16(%r13)
	movl	%eax, 20(%r13)
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.7:
	cmpl	$3, 4(%r13)
	jne	LBB0_16
## %bb.8:
	cmpl	$29, %ecx
	jg	LBB0_17
## %bb.9:
	cmpl	$29, %eax
	jg	LBB0_17
## %bb.10:
	movq	_BT_IDLE@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_11:
	movl	%r12d, (%r13)
	cmpl	$3, 4(%r13)
	jne	LBB0_33
## %bb.12:
	movq	_BT_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	xorl	%ebx, %ebx
	cmpl	$1, 12(%r13)
	je	LBB0_14
## %bb.13:
	movl	$1, %edi
	movl	$1, %esi
	callq	_BIT_OFFSET_LEN_MASK_32
	movl	%eax, %ebx
LBB0_14:
	orl	%r12d, %ebx
	movl	$2, %edi
	movl	$1, %esi
	callq	_BIT_OFFSET_LEN_MASK_32
	movl	%eax, %r15d
	orl	%ebx, %r15d
	jmp	LBB0_32
LBB0_16:
	xorl	%edx, %edx
	jmp	LBB0_34
LBB0_17:
	leal	-111(%rax), %edx
	cmpl	$138, %edx
	ja	LBB0_19
## %bb.18:
	movq	_BT_SCO@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_19:
	cmpl	$200, %ecx
	jl	LBB0_22
## %bb.20:
	cmpl	$200, %eax
	jl	LBB0_22
## %bb.21:
	movq	_BT_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_22:
	leal	-350(%rcx), %eax
	cmpl	$149, %eax
	ja	LBB0_35
## %bb.23:
	movq	_BT_OTHERBUSY@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
	xorl	%edx, %edx
	cmpl	8(%r13), %eax
	je	LBB0_34
LBB0_25:
	movl	%r12d, %r14d
	movl	%eax, 8(%r13)
	xorl	%r12d, %r12d
	cmpl	$1, 12(%r13)
	movl	$0, %r15d
	je	LBB0_27
## %bb.26:
	movl	$1, %edi
	movl	$1, %esi
	callq	_BIT_OFFSET_LEN_MASK_32
	movl	%eax, %r15d
	movl	8(%r13), %eax
LBB0_27:
	cltq
	movq	_BT_IDLE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	cmpq	%rax, %rcx
	jne	LBB0_29
## %bb.28:
	movl	$2, %edi
	movl	$1, %esi
	callq	_BIT_OFFSET_LEN_MASK_32
	movl	%eax, %r12d
	movslq	8(%r13), %rax
	movq	(%rbx), %rcx
LBB0_29:
	orl	%r14d, %r15d
	xorl	%ebx, %ebx
	cmpq	%rax, %rcx
	je	LBB0_31
## %bb.30:
	movq	%r13, %rdi
	movl	$1284, %esi                     ## imm = 0x504
	movl	$3276, %edx                     ## imm = 0xCCC
	callq	_rtl_write_word
	movl	$84, %ebx
LBB0_31:
	orl	%r12d, %r15d
	movq	%r13, %rdi
	movl	$1286, %esi                     ## imm = 0x506
	movl	%ebx, %edx
	callq	_rtl_write_byte
	movq	%r13, %rdi
	movl	$1287, %esi                     ## imm = 0x507
	movl	%ebx, %edx
	callq	_rtl_write_byte
LBB0_32:
	movq	%r13, %rdi
	movl	$1277, %esi                     ## imm = 0x4FD
	movl	%r15d, %edx
	callq	_rtl_write_byte
LBB0_33:
	movl	$1, %edx
LBB0_34:
	movl	%edx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	cmpl	$500, %ecx                      ## imm = 0x1F4
	movl	$0, %edx
	jl	LBB0_37
## %bb.36:
	movq	_BT_PAN@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_37:
	movq	_BT_OTHER_ACTION@GOTPCREL(%rip), %rax
LBB0_38:
	movl	(%rax), %eax
	cmpl	8(%r13), %eax
	jne	LBB0_25
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC80211_LINKED,8,3            ## @MAC80211_LINKED
	.comm	_BT_MASK,4,2                    ## @BT_MASK
	.comm	_BT_IDLE,8,3                    ## @BT_IDLE
	.comm	_BT_SCO,4,2                     ## @BT_SCO
	.comm	_BT_BUSY,4,2                    ## @BT_BUSY
	.comm	_BT_OTHERBUSY,4,2               ## @BT_OTHERBUSY
	.comm	_BT_PAN,4,2                     ## @BT_PAN
	.comm	_BT_OTHER_ACTION,4,2            ## @BT_OTHER_ACTION
	.no_dead_strip	_rtl92c_bt_state_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl92c_bt_state_change
_rtl92c_bt_state_change:                ; @rtl92c_bt_state_change
	.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
	bl	_rtl_priv
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _MAC80211_LINKED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAC80211_LINKED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_32
LBB0_2:
	mov	x19, x0
	mov	w1, #1277
	bl	_rtl_read_byte
	mov	x20, x0
	mov	x0, x19
	mov	w1, #1160
	bl	_rtl_read_dword
Lloh3:
	adrp	x24, _BT_MASK@GOTPAGE
Lloh4:
	ldr	x24, [x24, _BT_MASK@GOTPAGEOFF]
	ldr	w8, [x24]
	and	w22, w8, w0
	mov	x0, x19
	mov	w1, #1164
	bl	_rtl_read_dword
	ldr	w8, [x24]
	and	w23, w8, w0
	mov	x0, x19
	mov	w1, #1168
	bl	_rtl_read_dword
	mov	x21, x0
	ldr	w8, [x24]
	cmp	w22, w8
	ccmp	w23, w22, #0, eq
	ccmn	w0, #1, #0, eq
	b.eq	LBB0_9
LBB0_3:
	mov	w0, #0
	mov	w1, #1
	bl	_BIT_OFFSET_LEN_MASK_32
	and	w20, w0, w20
	ldr	w8, [x19]
	cmp	w20, w8
	b.ne	LBB0_10
; %bb.4:
	mov	w9, #1000
	mul	w8, w22, w9
	sdiv	w8, w8, w21
	mul	w9, w23, w9
	sdiv	w9, w9, w21
	stp	w8, w9, [x19, #16]
	cbz	w20, LBB0_1
; %bb.5:
	ldr	w10, [x19, #4]
	cmp	w10, #3
	b.ne	LBB0_1
; %bb.6:
	cmp	w8, #29
	ccmp	w9, #29, #0, le
	b.le	LBB0_15
; %bb.7:
	sub	w10, w9, #111
	cmp	w10, #138
	b.hi	LBB0_19
; %bb.8:
Lloh5:
	adrp	x8, _BT_SCO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT_SCO@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
	cmp	w20, #255
	b.eq	LBB0_1
	b	LBB0_3
LBB0_10:
	str	w20, [x19]
	ldr	w8, [x19, #4]
	cmp	w8, #3
	b.ne	LBB0_31
; %bb.11:
Lloh7:
	adrp	x8, _BT_IDLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BT_IDLE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	w8, [x19, #8]
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.12:
	mov	w0, #0
	b	LBB0_14
LBB0_13:
	mov	w0, #1
	mov	w1, #1
	bl	_BIT_OFFSET_LEN_MASK_32
LBB0_14:
	orr	w20, w0, w20
	mov	w0, #2
	mov	w1, #1
	bl	_BIT_OFFSET_LEN_MASK_32
	orr	w20, w20, w0
	b	LBB0_30
LBB0_15:
Lloh10:
	adrp	x8, _BT_IDLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BT_IDLE@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	cmp	w8, w9
	b.eq	LBB0_1
; %bb.17:
	str	w8, [x19, #8]
	ldr	w9, [x19, #12]
	cmp	w9, #1
	b.ne	LBB0_22
; %bb.18:
	mov	w0, #0
	b	LBB0_23
LBB0_19:
	cmp	w8, #200
	b.lt	LBB0_33
; %bb.20:
	cmp	w9, #200
	b.lt	LBB0_33
; %bb.21:
Lloh12:
	adrp	x8, _BT_BUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BT_BUSY@GOTPAGEOFF]
	b	LBB0_16
LBB0_22:
	mov	w0, #1
	mov	w1, #1
	bl	_BIT_OFFSET_LEN_MASK_32
	ldr	w8, [x19, #8]
LBB0_23:
	orr	w20, w0, w20
	sxtw	x8, w8
Lloh14:
	adrp	x21, _BT_IDLE@GOTPAGE
Lloh15:
	ldr	x21, [x21, _BT_IDLE@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	mov	w0, #2
	mov	w1, #1
	bl	_BIT_OFFSET_LEN_MASK_32
	ldrsw	x8, [x19, #8]
	ldr	x9, [x21]
	b	LBB0_26
LBB0_25:
	mov	w0, #0
LBB0_26:
	orr	w20, w20, w0
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	mov	w21, #0
	b	LBB0_29
LBB0_28:
	mov	x0, x19
	mov	w1, #1284
	mov	w2, #3276
	bl	_rtl_write_word
	mov	w21, #84
LBB0_29:
	mov	x0, x19
	mov	w1, #1286
	mov	x2, x21
	bl	_rtl_write_byte
	mov	x0, x19
	mov	w1, #1287
	mov	x2, x21
	bl	_rtl_write_byte
LBB0_30:
	mov	x0, x19
	mov	w1, #1277
	mov	x2, x20
	bl	_rtl_write_byte
LBB0_31:
	mov	w0, #1
LBB0_32:
	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
LBB0_33:
	sub	w9, w8, #350
	cmp	w9, #149
	b.hi	LBB0_35
; %bb.34:
Lloh16:
	adrp	x8, _BT_OTHERBUSY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BT_OTHERBUSY@GOTPAGEOFF]
	b	LBB0_16
LBB0_35:
	cmp	w8, #500
	b.lt	LBB0_37
; %bb.36:
Lloh18:
	adrp	x8, _BT_PAN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BT_PAN@GOTPAGEOFF]
	b	LBB0_16
LBB0_37:
Lloh20:
	adrp	x8, _BT_OTHER_ACTION@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BT_OTHER_ACTION@GOTPAGEOFF]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC80211_LINKED,8,3            ; @MAC80211_LINKED
	.comm	_BT_MASK,4,2                    ; @BT_MASK
	.comm	_BT_IDLE,8,3                    ; @BT_IDLE
	.comm	_BT_SCO,4,2                     ; @BT_SCO
	.comm	_BT_BUSY,4,2                    ; @BT_BUSY
	.comm	_BT_OTHERBUSY,4,2               ; @BT_OTHERBUSY
	.comm	_BT_PAN,4,2                     ; @BT_PAN
	.comm	_BT_OTHER_ACTION,4,2            ; @BT_OTHER_ACTION
	.no_dead_strip	_rtl92c_bt_state_change
.subsections_via_symbols
