	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __ipw_send_cmd
___ipw_send_cmd:                        ## @__ipw_send_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
	movq	%rsi, %r15
	movq	%rdi, %r13
	leaq	32(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %eax
	movq	_STATUS_HCMD_ACTIVE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%eax, %ecx
	je	LBB0_2
## %bb.1:
	movq	(%r15), %rdi
	callq	_get_cmd_string
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_IPW_ERROR
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_25
LBB0_2:
	orl	%eax, %ecx
	movl	%ecx, (%r13)
	movq	24(%r13), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	8(%r13), %rsi
	shlq	$5, %rsi
	movq	%rcx, 24(%rax,%rsi)
	movq	(%r15), %rcx
	movq	%rcx, 8(%rax,%rsi)
	movl	8(%r15), %edx
	movl	%edx, 20(%rax,%rsi)
	movl	16(%rax,%rsi), %edi
	movq	16(%r15), %rsi
	callq	_memcpy
	movq	8(%r13), %rax
	movq	24(%r13), %rcx
	shlq	$5, %rax
	movl	$-1, (%rcx,%rax)
LBB0_4:
	movq	(%r15), %rdi
	callq	_get_cmd_string
	movq	(%r15), %rdx
	movl	8(%r15), %ecx
	movl	(%r13), %r8d
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_IPW_DEBUG_HC
	movq	(%r15), %rax
	movq	_IPW_CMD_WEP_KEY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_IPW_DEBUG_HC
	jmp	LBB0_7
LBB0_6:
	movq	_IPW_DL_HOST_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rsi
	movl	8(%r15), %edx
	callq	_printk_buf
LBB0_7:
	movq	(%r15), %rsi
	movq	16(%r15), %rdx
	movl	8(%r15), %ecx
	movq	%r13, %rdi
	xorl	%r8d, %r8d
	callq	_ipw_queue_tx_hcmd
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r12d
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, (%r13)
	movq	(%r15), %rdi
	callq	_get_cmd_string
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_IPW_ERROR
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_20
LBB0_9:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_jiffies@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	movq	_HOST_COMPLETE_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	addq	%rbx, %r12
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	36(%r13), %edi
	movq	_STATUS_HCMD_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	andl	(%r13), %eax
	sete	%sil
	movq	%r12, %rdx
	subq	%rbx, %rdx
	callq	_wait_event_interruptible_timeout
	testl	%eax, %eax
	jns	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r14), %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_13
LBB0_12:
	jne	LBB0_16
LBB0_13:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_STATUS_HCMD_ACTIVE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, (%r13)
	je	LBB0_15
## %bb.14:
	movq	(%r15), %rdi
	callq	_get_cmd_string
	leaq	L_.str.4(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_IPW_ERROR
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, (%r13)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_19
LBB0_15:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_16:
	movq	_STATUS_RF_KILL_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_17
## %bb.18:
	movq	(%r15), %rdi
	callq	_get_cmd_string
	leaq	L_.str.5(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_IPW_ERROR
LBB0_19:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_20
LBB0_17:
	xorl	%r12d, %r12d
LBB0_20:
	movq	24(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_25
## %bb.21:
	movq	8(%r13), %rdx
	leaq	1(%rdx), %rax
	shlq	$5, %rdx
	movl	%r12d, (%rcx,%rdx)
	movq	16(%r13), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_22
## %bb.23:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_24
LBB0_22:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_24:
	movq	%rdx, 8(%r13)
LBB0_25:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_HCMD_ACTIVE,4,2         ## @STATUS_HCMD_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to send %s: Already sending a command.\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_jiffies,8,3                    ## @jiffies
L_.str.1:                               ## @.str.1
	.asciz	"%s command (#%d) %d bytes: 0x%08X\n"

	.comm	_IPW_CMD_WEP_KEY,8,3            ## @IPW_CMD_WEP_KEY
L_.str.2:                               ## @.str.2
	.asciz	"WEP_KEY command masked out for secure.\n"

	.comm	_IPW_DL_HOST_COMMAND,4,2        ## @IPW_DL_HOST_COMMAND
L_.str.3:                               ## @.str.3
	.asciz	"Failed to send %s: Reason %d\n"

	.comm	_HOST_COMPLETE_TIMEOUT,8,3      ## @HOST_COMPLETE_TIMEOUT
L_.str.4:                               ## @.str.4
	.asciz	"Failed to send %s: Command timed out.\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_STATUS_RF_KILL_HW,4,2          ## @STATUS_RF_KILL_HW
L_.str.5:                               ## @.str.5
	.asciz	"Failed to send %s: Aborted due to RF kill switch.\n"

	.no_dead_strip	___ipw_send_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __ipw_send_cmd
___ipw_send_cmd:                        ; @__ipw_send_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	add	x20, x0, #32
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
Lloh0:
	adrp	x24, _STATUS_HCMD_ACTIVE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _STATUS_HCMD_ACTIVE@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x21]
	bl	_get_cmd_string
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_ERROR
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_20
LBB0_2:
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x8, [x19, #24]
Lloh7:
	adrp	x25, _jiffies@GOTPAGE
Lloh8:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x9, [x25]
	ldr	x10, [x19, #8]
	add	x8, x8, x10, lsl #5
	str	x9, [x8, #24]
	ldr	x9, [x21]
	str	x9, [x8, #8]
	ldr	w2, [x21, #8]
	str	w2, [x8, #20]
	ldr	w0, [x8, #16]
	ldr	x1, [x21, #16]
	bl	_memcpy
	ldr	x8, [x19, #24]
	ldr	x9, [x19, #8]
	lsl	x9, x9, #5
	mov	w10, #-1
	str	w10, [x8, x9]
LBB0_4:
	ldr	x0, [x21]
	bl	_get_cmd_string
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x21]
	ldr	w9, [x21, #8]
	ldr	w10, [x19]
	stp	x9, x10, [sp, #16]
	stp	x0, x8, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IPW_DEBUG_HC
	ldr	x8, [x21]
Lloh11:
	adrp	x9, _IPW_CMD_WEP_KEY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IPW_CMD_WEP_KEY@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IPW_DEBUG_HC
	b	LBB0_7
LBB0_6:
Lloh16:
	adrp	x8, _IPW_DL_HOST_COMMAND@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IPW_DL_HOST_COMMAND@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x1, [x21, #16]
	ldr	w2, [x21, #8]
	bl	_printk_buf
LBB0_7:
	ldr	x1, [x21]
	ldr	x2, [x21, #16]
	ldr	w3, [x21, #8]
	mov	x0, x19
	mov	w4, #0
	bl	_ipw_queue_tx_hcmd
	cbz	w0, LBB0_9
; %bb.8:
	mov	x22, x0
	ldr	w8, [x24]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	ldr	x0, [x21]
	bl	_get_cmd_string
	mov	x1, x0
	str	x22, [sp]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_IPW_ERROR
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_19
	b	LBB0_20
LBB0_9:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x23, [x25]
Lloh21:
	adrp	x8, _HOST_COMPLETE_TIMEOUT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HOST_COMPLETE_TIMEOUT@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	add	x22, x8, x23
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #36]
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	cset	w1, eq
	sub	x2, x22, x23
	bl	_wait_event_interruptible_timeout
	tbz	w0, #31, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x23, [x25]
	mov	x0, x23
	mov	x1, x22
	bl	_time_before
	cbnz	x0, LBB0_10
	b	LBB0_13
LBB0_12:
	cbnz	w0, LBB0_16
LBB0_13:
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	ldr	x0, [x21]
	bl	_get_cmd_string
	mov	x1, x0
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_IPW_ERROR
	ldr	w8, [x24]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	b	LBB0_18
LBB0_15:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_16:
	ldr	w8, [x19]
Lloh26:
	adrp	x9, _STATUS_RF_KILL_HW@GOTPAGE
Lloh27:
	ldr	x9, [x9, _STATUS_RF_KILL_HW@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.17:
	ldr	x0, [x21]
	bl	_get_cmd_string
	mov	x1, x0
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_IPW_ERROR
LBB0_18:
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w22, w8
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_20
LBB0_19:
	ldp	x9, x10, [x19, #8]
	add	x11, x9, #1
	lsl	x9, x9, #5
	str	w22, [x8, x9]
	udiv	x8, x11, x10
	msub	x8, x8, x10, x11
	str	x8, [x19, #8]
LBB0_20:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_21:
	mov	w22, #0
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_19
	b	LBB0_20
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_HCMD_ACTIVE,4,2         ; @STATUS_HCMD_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to send %s: Already sending a command.\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_jiffies,8,3                    ; @jiffies
l_.str.1:                               ; @.str.1
	.asciz	"%s command (#%d) %d bytes: 0x%08X\n"

	.comm	_IPW_CMD_WEP_KEY,8,3            ; @IPW_CMD_WEP_KEY
l_.str.2:                               ; @.str.2
	.asciz	"WEP_KEY command masked out for secure.\n"

	.comm	_IPW_DL_HOST_COMMAND,4,2        ; @IPW_DL_HOST_COMMAND
l_.str.3:                               ; @.str.3
	.asciz	"Failed to send %s: Reason %d\n"

	.comm	_HOST_COMPLETE_TIMEOUT,8,3      ; @HOST_COMPLETE_TIMEOUT
l_.str.4:                               ; @.str.4
	.asciz	"Failed to send %s: Command timed out.\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_STATUS_RF_KILL_HW,4,2          ; @STATUS_RF_KILL_HW
l_.str.5:                               ; @.str.5
	.asciz	"Failed to send %s: Aborted due to RF kill switch.\n"

	.no_dead_strip	___ipw_send_cmd
.subsections_via_symbols
