	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_pcie_send_hcmd_sync
_iwl_pcie_send_hcmd_sync:               ## @iwl_pcie_send_hcmd_sync
	.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, %r14
	movq	%rdi, %r12
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r13
	movq	(%rax), %rax
	movq	16(%r13), %rcx
	movq	(%rcx,%rax,8), %r15
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_iwl_get_cmd_string
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_IWL_DEBUG_INFO
	movq	_STATUS_SYNC_HCMD_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_and_set_bit
	movl	%eax, %ebx
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_iwl_get_cmd_string
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_WARN
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_iwl_get_cmd_string
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_IWL_DEBUG_INFO
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_iwl_pcie_enqueue_hcmd
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	8(%r13), %ebx
	movq	_STATUS_SYNC_HCMD_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	xorl	%esi, %esi
	testq	%rax, %rax
	sete	%sil
	movq	_HOST_COMPLETE_TIMEOUT@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	%ebx, %edi
	callq	_wait_event_timeout
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	_STATUS_FW_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_iwl_trans_pcie_dump_regs
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_iwl_get_cmd_string
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_IWL_ERR
	xorl	%eax, %eax
	callq	_dump_stack
LBB0_14:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_3:
	movq	_STATUS_SYNC_HCMD_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_iwl_get_cmd_string
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_IWL_ERR
	movl	%r15d, %ebx
	jmp	LBB0_19
LBB0_5:
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_iwl_get_cmd_string
	movl	%eax, %ebx
	movl	(%r13), %edi
	callq	_jiffies_to_msecs
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_IWL_ERR
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	8(%r13), %ecx
	movl	12(%r13), %edx
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_IWL_ERR
	movq	_STATUS_SYNC_HCMD_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_iwl_get_cmd_string
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_IWL_DEBUG_INFO
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_iwl_trans_pcie_sync_nmi
LBB0_15:
	movq	_CMD_WANT_SKB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_17
## %bb.16:
	notl	%eax
	movq	(%r13), %rcx
	movl	%r15d, %edx
	andl	%eax, (%rcx,%rdx,4)
LBB0_17:
	negl	%ebx
	cmpq	$0, 8(%r14)
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_iwl_free_resp
	movq	$0, 8(%r14)
	jmp	LBB0_19
LBB0_8:
	movl	(%r14), %eax
	movq	_CMD_SEND_IN_RFKILL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
LBB0_11:
	movq	_CMD_WANT_SKB@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.12:
	cmpq	$0, 8(%r14)
	jne	LBB0_19
## %bb.13:
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_iwl_get_cmd_string
	leaq	L_.str.9(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_IWL_ERR
	jmp	LBB0_14
LBB0_9:
	movq	_STATUS_RFKILL_OPMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_10
## %bb.20:
	leaq	L_.str.8(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_DEBUG_RF_KILL
	movq	_ERFKILL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_10:
	movl	(%r14), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempting to send sync command %s\n"

	.comm	_STATUS_SYNC_HCMD_ACTIVE,4,2    ## @STATUS_SYNC_HCMD_ACTIVE
L_.str.1:                               ## @.str.1
	.asciz	"Command %s: a command is already active!\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Setting HCMD_ACTIVE for command %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"Error sending %s: enqueue_hcmd failed: %d\n"

	.comm	_HOST_COMPLETE_TIMEOUT,4,2      ## @HOST_COMPLETE_TIMEOUT
L_.str.4:                               ## @.str.4
	.asciz	"Error sending %s: time out after %dms.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Current CMD queue read_ptr %d write_ptr %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"Clearing HCMD_ACTIVE for command %s\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_STATUS_FW_ERROR,4,2            ## @STATUS_FW_ERROR
L_.str.7:                               ## @.str.7
	.asciz	"FW error in SYNC CMD %s\n"

	.comm	_CMD_SEND_IN_RFKILL,4,2         ## @CMD_SEND_IN_RFKILL
	.comm	_STATUS_RFKILL_OPMODE,4,2       ## @STATUS_RFKILL_OPMODE
L_.str.8:                               ## @.str.8
	.asciz	"RFKILL in SYNC CMD... no rsp\n"

	.comm	_ERFKILL,4,2                    ## @ERFKILL
	.comm	_CMD_WANT_SKB,4,2               ## @CMD_WANT_SKB
L_.str.9:                               ## @.str.9
	.asciz	"Error: Response NULL in '%s'\n"

	.no_dead_strip	_iwl_pcie_send_hcmd_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_pcie_send_hcmd_sync
_iwl_pcie_send_hcmd_sync:               ; @iwl_pcie_send_hcmd_sync
	.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	x19, x1
	mov	x20, x0
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x22, x0
	ldr	x8, [x0, #16]
	ldr	x9, [x0]
	ldr	x23, [x8, x9, lsl #3]
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_iwl_get_cmd_string
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_IWL_DEBUG_INFO
Lloh2:
	adrp	x25, _STATUS_SYNC_HCMD_ACTIVE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _STATUS_SYNC_HCMD_ACTIVE@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	x1, x20
	bl	_test_and_set_bit
	mov	x21, x0
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_iwl_get_cmd_string
	mov	x2, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_WARN
	cbz	x0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_2:
	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
	ret
LBB0_3:
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_iwl_get_cmd_string
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_IWL_DEBUG_INFO
	mov	x0, x20
	mov	x1, x19
	bl	_iwl_pcie_enqueue_hcmd
	mov	x21, x0
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	w22, [x22, #8]
	ldr	w0, [x25]
	mov	x1, x20
	bl	_test_bit
	cmp	x0, #0
	cset	w1, eq
Lloh11:
	adrp	x26, _HOST_COMPLETE_TIMEOUT@GOTPAGE
Lloh12:
	ldr	x26, [x26, _HOST_COMPLETE_TIMEOUT@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x22
	bl	_wait_event_timeout
Lloh13:
	adrp	x24, _CMD_WANT_SKB@GOTPAGE
Lloh14:
	ldr	x24, [x24, _CMD_WANT_SKB@GOTPAGEOFF]
	cbz	w0, LBB0_10
; %bb.5:
Lloh15:
	adrp	x8, _STATUS_FW_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STATUS_FW_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_15
; %bb.6:
	mov	x0, x20
	bl	_iwl_trans_pcie_dump_regs
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_iwl_get_cmd_string
	mov	x2, x0
Lloh18:
	adrp	x1, l_.str.7@PAGE
Lloh19:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_IWL_ERR
	bl	_dump_stack
LBB0_7:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w22, [x8]
	b	LBB0_11
LBB0_9:
	ldr	w0, [x25]
	mov	x1, x20
	bl	_clear_bit
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_iwl_get_cmd_string
	mov	x2, x0
	str	x21, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_IWL_ERR
	mov	x20, x21
	b	LBB0_2
LBB0_10:
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_iwl_get_cmd_string
	mov	x22, x0
	ldr	w0, [x26]
	bl	_jiffies_to_msecs
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_IWL_ERR
	ldp	w8, w2, [x23, #8]
	str	x8, [sp]
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_IWL_ERR
	ldr	w0, [x25]
	mov	x1, x20
	bl	_clear_bit
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_iwl_get_cmd_string
	mov	x2, x0
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_IWL_DEBUG_INFO
Lloh30:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh32:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_iwl_trans_pcie_sync_nmi
LBB0_11:
	neg	w20, w22
	ldr	w9, [x19]
	ldr	w8, [x24]
	tst	w8, w9
	b.eq	LBB0_13
; %bb.12:
	ldr	x9, [x23]
	mov	w10, w21
	lsl	x10, x10, #2
	ldr	w11, [x9, x10]
	bic	w8, w11, w8
	str	w8, [x9, x10]
LBB0_13:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.14:
	mov	x0, x19
	bl	_iwl_free_resp
	str	xzr, [x19, #8]
	b	LBB0_2
LBB0_15:
	ldr	w8, [x19]
Lloh33:
	adrp	x9, _CMD_SEND_IN_RFKILL@GOTPAGE
Lloh34:
	ldr	x9, [x9, _CMD_SEND_IN_RFKILL@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
LBB0_16:
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.17:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_21
LBB0_18:
	mov	w20, #0
	b	LBB0_2
LBB0_19:
Lloh36:
	adrp	x8, _STATUS_RFKILL_OPMODE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _STATUS_RFKILL_OPMODE@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_22
; %bb.20:
Lloh39:
	adrp	x1, l_.str.8@PAGE
Lloh40:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_IWL_DEBUG_RF_KILL
Lloh41:
	adrp	x8, _ERFKILL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ERFKILL@GOTPAGEOFF]
	b	LBB0_8
LBB0_21:
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_iwl_get_cmd_string
	mov	x2, x0
Lloh43:
	adrp	x1, l_.str.9@PAGE
Lloh44:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x20
	bl	_IWL_ERR
	b	LBB0_7
LBB0_22:
	ldr	w8, [x19]
	b	LBB0_16
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempting to send sync command %s\n"

	.comm	_STATUS_SYNC_HCMD_ACTIVE,4,2    ; @STATUS_SYNC_HCMD_ACTIVE
l_.str.1:                               ; @.str.1
	.asciz	"Command %s: a command is already active!\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Setting HCMD_ACTIVE for command %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"Error sending %s: enqueue_hcmd failed: %d\n"

	.comm	_HOST_COMPLETE_TIMEOUT,4,2      ; @HOST_COMPLETE_TIMEOUT
l_.str.4:                               ; @.str.4
	.asciz	"Error sending %s: time out after %dms.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Current CMD queue read_ptr %d write_ptr %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"Clearing HCMD_ACTIVE for command %s\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_STATUS_FW_ERROR,4,2            ; @STATUS_FW_ERROR
l_.str.7:                               ; @.str.7
	.asciz	"FW error in SYNC CMD %s\n"

	.comm	_CMD_SEND_IN_RFKILL,4,2         ; @CMD_SEND_IN_RFKILL
	.comm	_STATUS_RFKILL_OPMODE,4,2       ; @STATUS_RFKILL_OPMODE
l_.str.8:                               ; @.str.8
	.asciz	"RFKILL in SYNC CMD... no rsp\n"

	.comm	_ERFKILL,4,2                    ; @ERFKILL
	.comm	_CMD_WANT_SKB,4,2               ; @CMD_WANT_SKB
l_.str.9:                               ; @.str.9
	.asciz	"Error: Response NULL in '%s'\n"

	.no_dead_strip	_iwl_pcie_send_hcmd_sync
.subsections_via_symbols
