	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw_fw_send_h2c_command
_rtw_fw_send_h2c_command:               ## @rtw_fw_send_h2c_command
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_RTW_DBG_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %ecx
	movl	8(%rbx), %r8d
	movl	(%rbx), %r10d
	movl	4(%rbx), %r9d
	movl	28(%rbx), %r11d
	movl	24(%rbx), %r14d
	movl	20(%rbx), %r12d
	movl	16(%rbx), %eax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	pushq	%rax
	pushq	%r12
	pushq	%r14
	pushq	%r11
	pushq	%r10
	callq	_rtw_dbg
	addq	$48, %rsp
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movslq	(%r15), %rcx
	cmpq	$4, %rcx
	jae	LBB0_1
## %bb.2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	l_switch.table.rtw_fw_send_h2c_command(%rip), %rax
	movq	(%rax,%rcx,8), %rax
	leaq	l_switch.table.rtw_fw_send_h2c_command.3(%rip), %rdx
	movq	(%rdx,%rcx,8), %rdx
	movl	$1, %r12d
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %r12d
	movl	(%rdx), %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$21, %r14d
	movq	_REG_HMETFR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_rtw_read8
	testl	%r12d, %eax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%r14d
	cmpl	$1, %r14d
	ja	LBB0_3
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_rtw_err
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	jmp	LBB0_7
LBB0_8:
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_rtw_write8
	leal	1(%r14), %esi
	movl	4(%rbx), %edx
	movq	%r15, %rdi
	callq	_rtw_write8
	leal	2(%r14), %esi
	movl	8(%rbx), %edx
	movq	%r15, %rdi
	callq	_rtw_write8
	addl	$3, %r14d
	movl	12(%rbx), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rtw_write8
	movl	16(%rbx), %edx
	movq	%r15, %rdi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_rtw_write8
	leal	1(%r14), %esi
	movl	20(%rbx), %edx
	movq	%r15, %rdi
	callq	_rtw_write8
	leal	2(%r14), %esi
	movl	24(%rbx), %edx
	movq	%r15, %rdi
	callq	_rtw_write8
	addl	$3, %r14d
	movl	28(%rbx), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rtw_write8
	movl	(%r15), %eax
	leal	1(%rax), %ecx
	xorl	%edx, %edx
	cmpl	$3, %eax
	cmovll	%ecx, %edx
	movl	%edx, (%r15)
LBB0_6:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_7:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RTW_DBG_FW,4,2                 ## @RTW_DBG_FW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"send H2C content %02x%02x%02x%02x %02x%02x%02x%02x\n"

	.comm	_REG_HMEBOX0,4,2                ## @REG_HMEBOX0
	.comm	_REG_HMEBOX0_EX,4,2             ## @REG_HMEBOX0_EX
	.comm	_REG_HMEBOX1,4,2                ## @REG_HMEBOX1
	.comm	_REG_HMEBOX1_EX,4,2             ## @REG_HMEBOX1_EX
	.comm	_REG_HMEBOX2,4,2                ## @REG_HMEBOX2
	.comm	_REG_HMEBOX2_EX,4,2             ## @REG_HMEBOX2_EX
	.comm	_REG_HMEBOX3,4,2                ## @REG_HMEBOX3
	.comm	_REG_HMEBOX3_EX,4,2             ## @REG_HMEBOX3_EX
L_.str.1:                               ## @.str.1
	.asciz	"invalid h2c mail box number\n"

	.comm	_REG_HMETFR,4,2                 ## @REG_HMETFR
L_.str.2:                               ## @.str.2
	.asciz	"failed to send h2c command\n"

	.no_dead_strip	_rtw_fw_send_h2c_command
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.rtw_fw_send_h2c_command
l_switch.table.rtw_fw_send_h2c_command:
	.quad	_REG_HMEBOX0
	.quad	_REG_HMEBOX1
	.quad	_REG_HMEBOX2
	.quad	_REG_HMEBOX3

	.p2align	3                               ## @switch.table.rtw_fw_send_h2c_command.3
l_switch.table.rtw_fw_send_h2c_command.3:
	.quad	_REG_HMEBOX0_EX
	.quad	_REG_HMEBOX1_EX
	.quad	_REG_HMEBOX2_EX
	.quad	_REG_HMEBOX3_EX

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw_fw_send_h2c_command
_rtw_fw_send_h2c_command:               ; @rtw_fw_send_h2c_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _RTW_DBG_FW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTW_DBG_FW@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	w4, w3, [x21, #8]
	ldp	w6, w5, [x21]
	ldp	w8, w7, [x21, #24]
	ldp	w10, w9, [x21, #16]
	stp	w9, w10, [sp, #4]
	str	w8, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_rtw_dbg
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock
	ldrsw	x8, [x19]
	cmp	w8, #4
	b.hs	LBB0_5
; %bb.1:
	lsl	x9, x8, #3
Lloh5:
	adrp	x10, l_switch.table.rtw_fw_send_h2c_command@PAGE
Lloh6:
	add	x10, x10, l_switch.table.rtw_fw_send_h2c_command@PAGEOFF
	ldr	x10, [x10, x9]
Lloh7:
	adrp	x11, l_switch.table.rtw_fw_send_h2c_command.3@PAGE
Lloh8:
	add	x11, x11, l_switch.table.rtw_fw_send_h2c_command.3@PAGEOFF
	ldr	x9, [x11, x9]
	ldr	w22, [x9]
	ldr	w23, [x10]
	mov	w9, #1
	lsl	w24, w9, w8
	mov	w25, #21
Lloh9:
	adrp	x26, _REG_HMETFR@GOTPAGE
Lloh10:
	ldr	x26, [x26, _REG_HMETFR@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_rtw_read8
	tst	w0, w24
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w25, w25, #1
	cmp	w25, #1
	b.hi	LBB0_2
; %bb.4:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_rtw_err
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_WARN
	b	LBB0_7
LBB0_6:
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x23
	bl	_rtw_write8
	add	w1, w23, #1
	ldr	w2, [x21, #4]
	mov	x0, x19
	bl	_rtw_write8
	add	w1, w23, #2
	ldr	w2, [x21, #8]
	mov	x0, x19
	bl	_rtw_write8
	add	w1, w23, #3
	ldr	w2, [x21, #12]
	mov	x0, x19
	bl	_rtw_write8
	ldr	w2, [x21, #16]
	mov	x0, x19
	mov	x1, x22
	bl	_rtw_write8
	add	w1, w22, #1
	ldr	w2, [x21, #20]
	mov	x0, x19
	bl	_rtw_write8
	add	w1, w22, #2
	ldr	w2, [x21, #24]
	mov	x0, x19
	bl	_rtw_write8
	add	w1, w22, #3
	ldr	w2, [x21, #28]
	mov	x0, x19
	bl	_rtw_write8
	ldr	w8, [x19]
	cmp	w8, #2
	csinc	w8, wzr, w8, gt
	str	w8, [x19]
LBB0_7:
	mov	x0, 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
	add	sp, sp, #96
	b	_spin_unlock
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RTW_DBG_FW,4,2                 ; @RTW_DBG_FW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"send H2C content %02x%02x%02x%02x %02x%02x%02x%02x\n"

	.comm	_REG_HMEBOX0,4,2                ; @REG_HMEBOX0
	.comm	_REG_HMEBOX0_EX,4,2             ; @REG_HMEBOX0_EX
	.comm	_REG_HMEBOX1,4,2                ; @REG_HMEBOX1
	.comm	_REG_HMEBOX1_EX,4,2             ; @REG_HMEBOX1_EX
	.comm	_REG_HMEBOX2,4,2                ; @REG_HMEBOX2
	.comm	_REG_HMEBOX2_EX,4,2             ; @REG_HMEBOX2_EX
	.comm	_REG_HMEBOX3,4,2                ; @REG_HMEBOX3
	.comm	_REG_HMEBOX3_EX,4,2             ; @REG_HMEBOX3_EX
l_.str.1:                               ; @.str.1
	.asciz	"invalid h2c mail box number\n"

	.comm	_REG_HMETFR,4,2                 ; @REG_HMETFR
l_.str.2:                               ; @.str.2
	.asciz	"failed to send h2c command\n"

	.no_dead_strip	_rtw_fw_send_h2c_command
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.rtw_fw_send_h2c_command
l_switch.table.rtw_fw_send_h2c_command:
	.quad	_REG_HMEBOX0
	.quad	_REG_HMEBOX1
	.quad	_REG_HMEBOX2
	.quad	_REG_HMEBOX3

	.p2align	3                               ; @switch.table.rtw_fw_send_h2c_command.3
l_switch.table.rtw_fw_send_h2c_command.3:
	.quad	_REG_HMEBOX0_EX
	.quad	_REG_HMEBOX1_EX
	.quad	_REG_HMEBOX2_EX
	.quad	_REG_HMEBOX3_EX

.subsections_via_symbols
