	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_carl9170_exec_cmd              ## -- Begin function carl9170_exec_cmd
	.p2align	4, 0x90
_carl9170_exec_cmd:                     ## @carl9170_exec_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movl	%r8d, %r14d
	movq	%rcx, %r12
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_IS_ACCEPTING_CMD
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	_CARL9170_CMD_ASYNC_FLAG@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_might_sleep
LBB0_4:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %r14
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 24(%rbx)
	movl	%r15d, 28(%rbx)
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movq	(%r14), %rdi
	cmpq	%r12, %rdi
	je	LBB0_7
## %bb.6:
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
LBB0_7:
	leaq	4(%rbx), %r13
	movq	%r13, %rdi
	callq	_spin_lock_bh
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movq	%r13, %rdi
	callq	_spin_unlock_bh
	leaq	40(%rbx), %r12
	movq	%r12, %rdi
	callq	_reinit_completion
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	___carl9170_exec_cmd
	movq	_CARL9170_CMD_ASYNC_FLAG@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.8:
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_16
LBB0_9:
	movq	%r14, %r15
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, (%rbx)
	movl	$0, %r12d
	je	LBB0_16
## %bb.12:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_IS_STARTED
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	32(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_err
	movq	_DUMP_PREFIX_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	$4, %ecx
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rdx
	callq	_print_hex_dump_bytes
	movq	_CARL9170_RR_COMMAND_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_carl9170_restart
LBB0_15:
	movq	%r13, %rdi
	callq	_spin_lock_bh
	movq	$0, 8(%rbx)
	movl	$0, (%rbx)
	movq	%r13, %rdi
	callq	_spin_unlock_bh
LBB0_16:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CARL9170_CMD_ASYNC_FLAG,4,2    ## @CARL9170_CMD_ASYNC_FLAG
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no command feedback received (%d).\n"

L_.str.1:                               ## @.str.1
	.asciz	"carl9170 cmd: "

	.comm	_DUMP_PREFIX_NONE,4,2           ## @DUMP_PREFIX_NONE
	.comm	_CARL9170_RR_COMMAND_TIMEOUT,4,2 ## @CARL9170_RR_COMMAND_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_carl9170_exec_cmd              ; -- Begin function carl9170_exec_cmd
	.p2align	2
_carl9170_exec_cmd:                     ; @carl9170_exec_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	x25, x5
	mov	x23, x4
	mov	x21, x3
	mov	x20, x2
	mov	x24, x1
	mov	x19, x0
	bl	_IS_ACCEPTING_CMD
	cbz	w0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x27, _CARL9170_CMD_ASYNC_FLAG@GOTPAGE
Lloh1:
	ldr	x27, [x27, _CARL9170_CMD_ASYNC_FLAG@GOTPAGEOFF]
	ldr	w8, [x27]
	tst	w8, w24
	b.ne	LBB0_3
; %bb.2:
	bl	_might_sleep
LBB0_3:
	add	x22, x19, #16
	stp	w20, w24, [x19, #24]
	cbz	w20, LBB0_6
; %bb.4:
	ldr	x0, [x22]
	cmp	x0, x21
	b.eq	LBB0_6
; %bb.5:
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
LBB0_6:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_bh
	str	x25, [x19, #8]
	str	w23, [x19]
	mov	x0, x21
	bl	_spin_unlock_bh
	add	x26, x19, #40
	mov	x0, x26
	bl	_reinit_completion
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	___carl9170_exec_cmd
	mov	w25, #0
	ldr	w8, [x27]
	tst	w8, w24
	b.ne	LBB0_16
; %bb.7:
Lloh2:
	adrp	x8, _HZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x26
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_11
; %bb.8:
	ldr	w8, [x19]
	cmp	w8, w23
	b.ne	LBB0_12
; %bb.9:
	mov	w25, #0
	b	LBB0_16
LBB0_10:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_16
LBB0_11:
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh10:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w25, w8
	mov	x0, x19
	bl	_IS_STARTED
	cbz	x0, LBB0_15
; %bb.14:
	ldr	x0, [x19, #32]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	bl	_dev_err
Lloh14:
	adrp	x8, _DUMP_PREFIX_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DUMP_PREFIX_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	w3, w20, #4
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_print_hex_dump_bytes
Lloh19:
	adrp	x8, _CARL9170_RR_COMMAND_TIMEOUT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CARL9170_RR_COMMAND_TIMEOUT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_carl9170_restart
LBB0_15:
	mov	x0, x21
	bl	_spin_lock_bh
	str	xzr, [x19, #8]
	str	wzr, [x19]
	mov	x0, x21
	bl	_spin_unlock_bh
LBB0_16:
	mov	x0, x25
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CARL9170_CMD_ASYNC_FLAG,4,2    ; @CARL9170_CMD_ASYNC_FLAG
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no command feedback received (%d).\n"

l_.str.1:                               ; @.str.1
	.asciz	"carl9170 cmd: "

	.comm	_DUMP_PREFIX_NONE,4,2           ; @DUMP_PREFIX_NONE
	.comm	_CARL9170_RR_COMMAND_TIMEOUT,4,2 ; @CARL9170_RR_COMMAND_TIMEOUT
.subsections_via_symbols
