	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_insert_cmd_to_pending_q ## -- Begin function mwifiex_insert_cmd_to_pending_q
	.p2align	4, 0x90
_mwifiex_insert_cmd_to_pending_q:       ## @mwifiex_insert_cmd_to_pending_q
	.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, %r12
	movq	8(%rsi), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r15
	movl	4(%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, %r14
	movq	_HostCmd_CMD_802_11_PS_MODE_ENH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_5
## %bb.2:
	movl	(%rbx), %edi
	callq	_le16_to_cpu
	movq	_DIS_PS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	callq	_le16_to_cpu
	movq	_DIS_AUTO_PS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_4:
	movq	(%r12), %rax
	movq	_PS_STATE_AWAKE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_5:
	leaq	12(%r12), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	leaq	16(%r12), %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	jmp	LBB0_7
LBB0_8:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mwifiex_dbg                    ## TAILCALL
LBB0_6:
	leaq	12(%r12), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	leaq	16(%r12), %rsi
	movq	%r15, %rdi
	callq	_list_add
LBB0_7:
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	leaq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_atomic_inc
	movq	_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_atomic_read
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r14, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mwifiex_dbg                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QUEUE_CMD: host_cmd is NULL\n"

	.comm	_HostCmd_CMD_802_11_PS_MODE_ENH,8,3 ## @HostCmd_CMD_802_11_PS_MODE_ENH
	.comm	_DIS_PS,8,3                     ## @DIS_PS
	.comm	_DIS_AUTO_PS,8,3                ## @DIS_AUTO_PS
	.comm	_PS_STATE_AWAKE,8,3             ## @PS_STATE_AWAKE
	.comm	_CMD,4,2                        ## @CMD
L_.str.1:                               ## @.str.1
	.asciz	"cmd: QUEUE_CMD: cmd=%#x, cmd_pending=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_insert_cmd_to_pending_q ; -- Begin function mwifiex_insert_cmd_to_pending_q
	.p2align	2
_mwifiex_insert_cmd_to_pending_q:       ; @mwifiex_insert_cmd_to_pending_q
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x1, #8]
	ldr	x22, [x8]
	cbz	x22, LBB0_6
; %bb.1:
	mov	x21, x1
	ldr	w0, [x22, #4]
	bl	_le16_to_cpu
	mov	x20, x0
Lloh0:
	adrp	x8, _HostCmd_CMD_802_11_PS_MODE_ENH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HostCmd_CMD_802_11_PS_MODE_ENH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x22]
	bl	_le16_to_cpu
Lloh3:
	adrp	x8, _DIS_PS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DIS_PS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x22]
	bl	_le16_to_cpu
Lloh6:
	adrp	x8, _DIS_AUTO_PS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DIS_AUTO_PS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
LBB0_4:
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _PS_STATE_AWAKE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PS_STATE_AWAKE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
LBB0_5:
	add	x22, x19, #12
	mov	x0, x22
	bl	_spin_lock_bh
	add	x1, x19, #16
	mov	x0, x21
	bl	_list_add_tail
	b	LBB0_8
LBB0_6:
Lloh12:
	adrp	x8, _ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_mwifiex_dbg
LBB0_7:
	add	x22, x19, #12
	mov	x0, x22
	bl	_spin_lock_bh
	add	x1, x19, #16
	mov	x0, x21
	bl	_list_add
LBB0_8:
	mov	x0, x22
	bl	_spin_unlock_bh
	add	x21, x19, #8
	mov	x0, x21
	bl	_atomic_inc
Lloh17:
	adrp	x8, _CMD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CMD@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_atomic_read
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	bl	_mwifiex_dbg
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QUEUE_CMD: host_cmd is NULL\n"

	.comm	_HostCmd_CMD_802_11_PS_MODE_ENH,8,3 ; @HostCmd_CMD_802_11_PS_MODE_ENH
	.comm	_DIS_PS,8,3                     ; @DIS_PS
	.comm	_DIS_AUTO_PS,8,3                ; @DIS_AUTO_PS
	.comm	_PS_STATE_AWAKE,8,3             ; @PS_STATE_AWAKE
	.comm	_CMD,4,2                        ; @CMD
l_.str.1:                               ; @.str.1
	.asciz	"cmd: QUEUE_CMD: cmd=%#x, cmd_pending=%d\n"

.subsections_via_symbols
