	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ionic_dev_cmd_wait             ## -- Begin function ionic_dev_cmd_wait
	.p2align	4, 0x90
_ionic_dev_cmd_wait:                    ## @ionic_dev_cmd_wait
	.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	$40, %rsp
	.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, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rdi), %r12
	xorl	%eax, %eax
	callq	_in_interrupt
	movl	%eax, %edi
	callq	_WARN_ON
	movq	_jiffies@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	imulq	%r15, %r14
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	addq	%rcx, %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_ionic_dev_cmd_done
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$20, %edi
	callq	_msleep
	movq	(%rbx), %rdi
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_1
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %r15
	subq	-48(%rbp), %r15                 ## 8-byte Folded Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movl	8(%rax), %ebx
	movl	(%rcx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_ionic_opcode_to_str
	movl	%eax, %ecx
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_6
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, (%rsp)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	movq	%rax, %r9
	callq	_dev_dbg
	testl	%r13d, %r13d
	movq	_jiffies@GOTPCREL(%rip), %rbx
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rdi
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_8
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_ionic_dev_cmd_status
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %r13d
	movq	_IONIC_RC_EAGAIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rdi
	movq	%r14, %rsi
	callq	_time_after
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_ionic_opcode_to_str
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_ionic_error_to_str
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	leaq	L_.str.2(%rip), %rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	%eax, %r8d
	movl	%r13d, %r9d
	callq	_dev_err
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep
	movq	8(%r15), %rsi
	addq	$4, %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	movq	8(%r15), %rsi
	movq	_jiffies@GOTPCREL(%rip), %rbx
	movl	$1, %edi
	callq	_iowrite32
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
LBB0_15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r14d
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_ionic_opcode_to_str
	movl	%eax, %r15d
	movl	%r13d, %edi
	callq	_ionic_error_to_str
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	movl	%r13d, %r9d
	callq	_dev_err
	movl	%r13d, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ionic_error_to_errno           ## TAILCALL
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r14d
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_ionic_opcode_to_str
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	movl	%ebx, %ecx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	callq	_dev_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DEVCMD %s (%d) done=%d took %ld secs (%ld jiffies)\n"

L_.str.1:                               ## @.str.1
	.asciz	"DEVCMD %s (%d) timeout after %ld secs\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_IONIC_RC_EAGAIN,4,2            ## @IONIC_RC_EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"DEV_CMD %s (%d) error, %s (%d) retrying...\n"

L_.str.3:                               ## @.str.3
	.asciz	"DEV_CMD %s (%d) error, %s (%d) failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ionic_dev_cmd_wait             ; -- Begin function ionic_dev_cmd_wait
	.p2align	2
_ionic_dev_cmd_wait:                    ; @ionic_dev_cmd_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x20, x0
	add	x21, x0, #8
	bl	_in_interrupt
	bl	_WARN_ON
Lloh0:
	adrp	x19, _jiffies@GOTPAGE
Lloh1:
	ldr	x19, [x19, _jiffies@GOTPAGEOFF]
	ldr	x25, [x19]
Lloh2:
	adrp	x24, _HZ@GOTPAGE
Lloh3:
	ldr	x24, [x24, _HZ@GOTPAGEOFF]
	ldr	x8, [x24]
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	madd	x22, x8, x22, x25
Lloh4:
	adrp	x23, l_.str@PAGE
Lloh5:
	add	x23, x23, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_ionic_dev_cmd_done
	mov	x26, x0
	cbnz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #20
	bl	_msleep
	ldr	x0, [x19]
	mov	x1, x22
	bl	_time_before
	cbnz	x0, LBB0_1
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19]
	sub	x27, x8, x25
	ldr	x8, [x20, #8]
	ldr	w25, [x8, #8]
	ldr	w28, [x20]
	mov	x0, x25
	bl	_ionic_opcode_to_str
	mov	x2, x0
	ldr	x8, [x24]
	udiv	x5, x27, x8
	mov	x0, x28
	mov	x1, x23
	mov	x3, x25
	mov	x4, x26
	mov	x6, x27
	bl	_dev_dbg
	cbnz	w26, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x19]
	mov	x1, x22
	bl	_time_before
	cbz	x0, LBB0_10
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	bl	_ionic_dev_cmd_status
	cbz	w0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x26, x0
Lloh6:
	adrp	x8, _IONIC_RC_EAGAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IONIC_RC_EAGAIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x19]
	mov	x1, x22
	bl	_time_after
	cbnz	w0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w27, [x20]
	mov	x0, x25
	bl	_ionic_opcode_to_str
	mov	x28, x0
	mov	x0, x26
	bl	_ionic_error_to_str
	mov	x4, x0
	mov	x0, x27
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x28
	mov	x3, x25
	mov	x5, x26
	bl	_dev_err
	mov	w0, #1000
	bl	_msleep
	ldr	x8, [x20, #8]
	add	x1, x8, #4
	mov	w0, #0
	bl	_iowrite32
	ldr	x1, [x20, #8]
	mov	w0, #1
	bl	_iowrite32
	ldr	x25, [x19]
	b	LBB0_1
LBB0_9:
	ldr	w19, [x20]
	mov	x0, x25
	bl	_ionic_opcode_to_str
	mov	x20, x0
	mov	x0, x26
	bl	_ionic_error_to_str
	mov	x4, x0
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x25
	mov	x5, x26
	bl	_dev_err
	mov	x0, x26
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ionic_error_to_errno
LBB0_10:
	ldr	w20, [x20]
	mov	x0, x25
	bl	_ionic_opcode_to_str
	mov	x2, x0
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x3, x25
	ldr	x4, [sp, #8]                    ; 8-byte Folded Reload
	bl	_dev_warn
Lloh15:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DEVCMD %s (%d) done=%d took %ld secs (%ld jiffies)\n"

l_.str.1:                               ; @.str.1
	.asciz	"DEVCMD %s (%d) timeout after %ld secs\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_IONIC_RC_EAGAIN,4,2            ; @IONIC_RC_EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"DEV_CMD %s (%d) error, %s (%d) retrying...\n"

l_.str.3:                               ; @.str.3
	.asciz	"DEV_CMD %s (%d) error, %s (%d) failed\n"

.subsections_via_symbols
