	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8723e_set_p2p_ps_offload_cmd ## -- Begin function rtl8723e_set_p2p_ps_offload_cmd
	.p2align	4, 0x90
_rtl8723e_set_p2p_ps_offload_cmd:       ## @rtl8723e_set_p2p_ps_offload_cmd
	.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
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_rtl_priv
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_psc
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, %r15
	addl	$-128, %r13d
	cmpl	$3, %r13d
	ja	LBB0_22
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r13,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_21:
	movq	_COMP_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	callq	_RT_TRACE
	movl	$0, 20(%r15)
	movl	$130, 44(%r14)
	jmp	LBB0_22
LBB0_20:
	movq	_COMP_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rcx
	movq	%r12, %rdi
	callq	_RT_TRACE
	movl	$1, 20(%r15)
	jmp	LBB0_22
LBB0_3:
	movq	_COMP_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	callq	_RT_TRACE
	movl	48(%r14), %esi
	testl	%esi, %esi
	jle	LBB0_5
## %bb.4:
	movl	$1, (%r15)
	movq	%rbx, %rdi
	callq	_rtl8723e_set_p2p_ctw_period_cmd
LBB0_5:
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.6:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_REG_TSFTR@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	movl	$1512, %esi                     ## imm = 0x5E8
	callq	_rtl_write_dword
	movq	32(%r14), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r12, %rdi
	movl	$1516, %esi                     ## imm = 0x5EC
	callq	_rtl_write_dword
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_14
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movl	%ebx, %edx
	shll	$4, %edx
	movq	%r12, %rdi
	movl	$1487, %esi                     ## imm = 0x5CF
	callq	_rtl_write_byte
	xorl	%eax, %eax
	testq	%rbx, %rbx
	setne	%al
	movl	$1, 4(%r15,%rax,4)
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r12, %rdi
	movl	$1504, %esi                     ## imm = 0x5E0
	callq	_rtl_write_dword
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r12, %rdi
	movl	$1508, %esi                     ## imm = 0x5E4
	callq	_rtl_write_dword
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_rtl_read_dword
	movq	24(%r14), %rcx
	movq	32(%r14), %r8
	movl	(%rcx,%rbx,4), %edx
	movl	(%r8,%rbx,4), %esi
	cmpl	$1, %esi
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	addl	$51200, %eax                    ## imm = 0xC800
	cmpl	%eax, %edx
	jg	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r14), %rdi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=2
	movl	%ecx, %esi
	cmpl	%eax, %edx
	jg	LBB0_13
LBB0_10:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	(%rdi,%rbx,4), %edx
	movl	$255, %ecx
	cmpl	$255, %esi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	decl	%esi
	movl	%esi, (%r8,%rbx,4)
	movl	%esi, %ecx
	jmp	LBB0_12
LBB0_2:
	movq	_COMP_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	callq	_RT_TRACE
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$28, %edx
	callq	_memset
	jmp	LBB0_22
LBB0_14:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_15:
	cmpl	$1, 40(%r14)
	je	LBB0_17
## %bb.16:
	testl	%eax, %eax
	jle	LBB0_22
LBB0_17:
	movq	%rbx, %r14
	movq	_REG_DUAL_TSF_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$4, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_rtl_write_byte
	movl	$1, 12(%r15)
	movq	_P2P_ROLE_GO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	cmpl	(%r12), %ecx
	jne	LBB0_19
## %bb.18:
	movl	$0, 24(%r15)
	movl	$1, %eax
LBB0_19:
	movl	%eax, 16(%r15)
	movl	$0, 20(%r15)
	movq	%r14, %rbx
LBB0_22:
	movq	_H2C_P2P_PS_OFFLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	movq	%r15, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl8723e_fill_h2c_cmd          ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_21
	.long	L0_0_set_20
	.long	L0_0_set_3
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_COMP_FW,4,2                    ## @COMP_FW
	.comm	_DBG_LOUD,4,2                   ## @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"P2P_PS_DISABLE\n"

L_.str.1:                               ## @.str.1
	.asciz	"P2P_PS_ENABLE\n"

	.comm	_REG_TSFTR,4,2                  ## @REG_TSFTR
	.comm	_REG_DUAL_TSF_RST,4,2           ## @REG_DUAL_TSF_RST
	.comm	_P2P_ROLE_GO,4,2                ## @P2P_ROLE_GO
L_.str.2:                               ## @.str.2
	.asciz	"P2P_PS_SCAN\n"

L_.str.3:                               ## @.str.3
	.asciz	"P2P_PS_SCAN_DONE\n"

	.comm	_H2C_P2P_PS_OFFLOAD,4,2         ## @H2C_P2P_PS_OFFLOAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8723e_set_p2p_ps_offload_cmd ; -- Begin function rtl8723e_set_p2p_ps_offload_cmd
	.p2align	2
_rtl8723e_set_p2p_ps_offload_cmd:       ; @rtl8723e_set_p2p_ps_offload_cmd
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x1
	mov	x19, x0
	bl	_rtl_priv
	mov	x21, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_psc
	mov	x22, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_hal
	mov	x20, x0
	sub	w8, w23, #128
	cmp	w8, #3
	b.hi	LBB0_21
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _COMP_FW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _COMP_FW@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x3, l_.str.3@PAGE
Lloh9:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_RT_TRACE
	str	wzr, [x20, #20]
	mov	w8, #130
	str	w8, [x22, #44]
	b	LBB0_21
LBB0_3:
Lloh10:
	adrp	x8, _COMP_FW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _COMP_FW@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x3, l_.str.2@PAGE
Lloh17:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_RT_TRACE
	mov	w8, #1
	str	w8, [x20, #20]
	b	LBB0_21
LBB0_4:
Lloh18:
	adrp	x8, _COMP_FW@GOTPAGE
Lloh19:
	ldr	x8, [x8, _COMP_FW@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
Lloh24:
	adrp	x3, l_.str.1@PAGE
Lloh25:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_RT_TRACE
	ldr	w1, [x22, #48]
	cmp	w1, #1
	b.lt	LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x19
	bl	_rtl8723e_set_p2p_ctw_period_cmd
LBB0_6:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.7:
	mov	x23, #0
	mov	w25, #4
	mov	w26, #1
Lloh26:
	adrp	x27, _REG_TSFTR@GOTPAGE
Lloh27:
	ldr	x27, [x27, _REG_TSFTR@GOTPAGEOFF]
	mov	w28, #51200
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	mov	w1, #1512
	bl	_rtl_write_dword
	ldr	x8, [x22, #32]
	ldr	w2, [x8, x23, lsl #2]
	mov	x0, x21
	mov	w1, #1516
	bl	_rtl_write_dword
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_15
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	lsl	w2, w23, #4
	mov	x0, x21
	mov	w1, #1487
	bl	_rtl_write_byte
	cmp	x23, #0
	mov	w8, #8
	csel	x8, x25, x8, eq
	str	w26, [x20, x8]
	ldr	x8, [x22, #8]
	lsl	x24, x23, #2
	ldr	w2, [x8, x24]
	mov	x0, x21
	mov	w1, #1504
	bl	_rtl_write_dword
	ldr	x8, [x22, #16]
	ldr	w2, [x8, x24]
	mov	x0, x21
	mov	w1, #1508
	bl	_rtl_write_dword
	ldr	w1, [x27]
	mov	x0, x21
	bl	_rtl_read_dword
	ldp	x9, x8, [x22, #24]
	ldr	w2, [x9, x24]
	ldr	w9, [x8, x24]
	cmp	w9, #1
	add	w10, w0, w28
	ccmp	w2, w10, #0, ne
	b.gt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x11, [x22, #16]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	add	w2, w12, w2
	cmp	w2, w10
	b.gt	LBB0_8
LBB0_12:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w12, [x11, x23, lsl #2]
	cmp	w9, #255
	b.eq	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	sub	w9, w9, #1
	str	w9, [x8, x23, lsl #2]
	b	LBB0_11
LBB0_14:
Lloh28:
	adrp	x8, _COMP_FW@GOTPAGE
Lloh29:
	ldr	x8, [x8, _COMP_FW@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
Lloh34:
	adrp	x3, l_.str@PAGE
Lloh35:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x21
	bl	_RT_TRACE
	mov	x0, x20
	mov	w1, #0
	mov	w2, #28
	bl	_memset
	b	LBB0_21
LBB0_15:
	ldr	w9, [x22, #40]
	cmp	w9, #1
	b.eq	LBB0_17
; %bb.16:
	cmp	w8, #1
	b.lt	LBB0_21
LBB0_17:
Lloh36:
	adrp	x8, _REG_DUAL_TSF_RST@GOTPAGE
Lloh37:
	ldr	x8, [x8, _REG_DUAL_TSF_RST@GOTPAGEOFF]
Lloh38:
	ldr	w22, [x8]
	mov	w0, #4
	bl	_BIT
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_rtl_write_byte
	mov	w8, #1
	str	w8, [x20, #12]
Lloh39:
	adrp	x8, _P2P_ROLE_GO@GOTPAGE
Lloh40:
	ldr	x8, [x8, _P2P_ROLE_GO@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.18:
	str	wzr, [x20, #24]
	mov	w8, #1
	b	LBB0_20
LBB0_19:
	mov	w8, #0
LBB0_20:
	stp	w8, wzr, [x20, #16]
LBB0_21:
Lloh42:
	adrp	x8, _H2C_P2P_PS_OFFLOAD@GOTPAGE
Lloh43:
	ldr	x8, [x8, _H2C_P2P_PS_OFFLOAD@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	mov	x3, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_rtl8723e_fill_h2c_cmd
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
                                        ; -- End function
	.comm	_COMP_FW,4,2                    ; @COMP_FW
	.comm	_DBG_LOUD,4,2                   ; @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P2P_PS_DISABLE\n"

l_.str.1:                               ; @.str.1
	.asciz	"P2P_PS_ENABLE\n"

	.comm	_REG_TSFTR,4,2                  ; @REG_TSFTR
	.comm	_REG_DUAL_TSF_RST,4,2           ; @REG_DUAL_TSF_RST
	.comm	_P2P_ROLE_GO,4,2                ; @P2P_ROLE_GO
l_.str.2:                               ; @.str.2
	.asciz	"P2P_PS_SCAN\n"

l_.str.3:                               ; @.str.3
	.asciz	"P2P_PS_SCAN_DONE\n"

	.comm	_H2C_P2P_PS_OFFLOAD,4,2         ; @H2C_P2P_PS_OFFLOAD
.subsections_via_symbols
