	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_trans_send_fw_cmd
_nvme_trans_send_fw_cmd:                ## @nvme_trans_send_fw_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movl	%r8d, %r14d
	movl	%ecx, %r12d
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	-104(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r13, -96(%rbp)
	movq	_nvme_admin_download_fw@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	cmpq	$0, (%r15)
	jle	LBB0_9
## %bb.2:
	movq	_SAM_STAT_CHECK_CONDITION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ILLEGAL_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SCSI_ASC_INVALID_CDB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SCSI_ASCQ_CAUSE_NOT_REPORTABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	callq	_nvme_trans_completion
	jmp	LBB0_11
LBB0_3:
	movq	_nvme_admin_activate_fw@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	movq	%r13, %r12
	jne	LBB0_5
## %bb.4:
	movq	_NVME_FWACT_REPL_ACTV@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	-104(%rbp), %rcx
	movq	%rax, (%rcx)
LBB0_5:
	xorl	%r13d, %r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_6:
	leaq	-104(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_nvme_submit_admin_cmd
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_nvme_trans_status_code
	testl	%eax, %eax
	movl	%eax, %r15d
	cmovel	%ebx, %r15d
	testl	%ebx, %ebx
	cmovel	%eax, %r15d
LBB0_7:
	movq	_nvme_admin_download_fw@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_12
## %bb.8:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_nvme_unmap_user_pages
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_nvme_free_iod
	jmp	LBB0_12
LBB0_9:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rdx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%r12d, %r13d
	movl	%r12d, %ecx
	callq	_nvme_map_user_pages
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	callq	_PTR_ERR
LBB0_11:
	movl	%eax, %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-104(%rbp), %rsi
	movq	%r14, %rdi
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	movl	%r13d, %ecx
	callq	_nvme_setup_prps
	cmpl	%r13d, %eax
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_15
## %bb.14:
	movq	_BYTES_TO_DWORDS@GOTPCREL(%rip), %rbx
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	(%rbx)
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -80(%rbp)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	(%rbx)
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, -88(%rbp)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_SNTI_TRANSLATION_SUCCESS,4,2   ## @SNTI_TRANSLATION_SUCCESS
	.comm	_nvme_admin_download_fw,8,3     ## @nvme_admin_download_fw
	.comm	_SAM_STAT_CHECK_CONDITION,4,2   ## @SAM_STAT_CHECK_CONDITION
	.comm	_ILLEGAL_REQUEST,4,2            ## @ILLEGAL_REQUEST
	.comm	_SCSI_ASC_INVALID_CDB,4,2       ## @SCSI_ASC_INVALID_CDB
	.comm	_SCSI_ASCQ_CAUSE_NOT_REPORTABLE,4,2 ## @SCSI_ASCQ_CAUSE_NOT_REPORTABLE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BYTES_TO_DWORDS,4,2            ## @BYTES_TO_DWORDS
	.comm	_nvme_admin_activate_fw,8,3     ## @nvme_admin_activate_fw
	.comm	_NVME_FWACT_REPL_ACTV,8,3       ## @NVME_FWACT_REPL_ACTV
	.no_dead_strip	_nvme_trans_send_fw_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_trans_send_fw_cmd
_nvme_trans_send_fw_cmd:                ; @nvme_trans_send_fw_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	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x20, x2
	mov	x21, x1
	ldr	x19, [x0]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	x20, [sp, #8]
Lloh0:
	adrp	x25, _nvme_admin_download_fw@GOTPAGE
Lloh1:
	ldr	x25, [x25, _nvme_admin_download_fw@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, x20
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.2:
Lloh2:
	adrp	x8, _SAM_STAT_CHECK_CONDITION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SAM_STAT_CHECK_CONDITION@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _ILLEGAL_REQUEST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ILLEGAL_REQUEST@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _SCSI_ASC_INVALID_CDB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SCSI_ASC_INVALID_CDB@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x8, _SCSI_ASCQ_CAUSE_NOT_REPORTABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCSI_ASCQ_CAUSE_NOT_REPORTABLE@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
	mov	x0, x21
	bl	_nvme_trans_completion
	b	LBB0_11
LBB0_3:
Lloh14:
	adrp	x8, _nvme_admin_activate_fw@GOTPAGE
Lloh15:
	ldr	x8, [x8, _nvme_admin_activate_fw@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_5
; %bb.4:
Lloh17:
	adrp	x8, _NVME_FWACT_REPL_ACTV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NVME_FWACT_REPL_ACTV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w0, w8, w22
	bl	_cpu_to_le32
	mov	x22, #0
	ldr	x8, [sp]
	str	x0, [x8]
	b	LBB0_6
LBB0_5:
	mov	x22, #0
LBB0_6:
	mov	x1, sp
	mov	x0, x19
	mov	x2, #0
	bl	_nvme_submit_admin_cmd
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	bl	_nvme_trans_status_code
	cmp	w0, #0
	ccmp	w23, #0, #4, eq
	csel	w21, w23, w0, ne
LBB0_7:
	ldr	x8, [x25]
	cmp	x8, x20
	b.ne	LBB0_12
; %bb.8:
Lloh20:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_nvme_unmap_user_pages
	mov	x0, x19
	mov	x1, x22
	bl	_nvme_free_iod
	b	LBB0_12
LBB0_9:
Lloh23:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	x2, [x21, #8]
	mov	x0, x19
	mov	x3, x24
	bl	_nvme_map_user_pages
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.10:
	mov	x0, x22
	bl	_PTR_ERR
LBB0_11:
	mov	x21, x0
LBB0_12:
	mov	x0, x21
	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_13:
Lloh26:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh28:
	ldr	w4, [x8]
	mov	x1, sp
	mov	x0, x19
	mov	x2, x22
	mov	x3, x24
	bl	_nvme_setup_prps
	cmp	w0, w24
	b.ne	LBB0_15
; %bb.14:
Lloh29:
	adrp	x26, _BYTES_TO_DWORDS@GOTPAGE
Lloh30:
	ldr	x26, [x26, _BYTES_TO_DWORDS@GOTPAGEOFF]
	ldr	w8, [x26]
	udiv	w8, w24, w8
	sub	w0, w8, #1
	bl	_cpu_to_le32
	str	x0, [sp, #24]
	ldr	w8, [x26]
	udiv	w0, w23, w8
	bl	_cpu_to_le32
	str	x0, [sp, #16]
	b	LBB0_6
LBB0_15:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_SNTI_TRANSLATION_SUCCESS,4,2   ; @SNTI_TRANSLATION_SUCCESS
	.comm	_nvme_admin_download_fw,8,3     ; @nvme_admin_download_fw
	.comm	_SAM_STAT_CHECK_CONDITION,4,2   ; @SAM_STAT_CHECK_CONDITION
	.comm	_ILLEGAL_REQUEST,4,2            ; @ILLEGAL_REQUEST
	.comm	_SCSI_ASC_INVALID_CDB,4,2       ; @SCSI_ASC_INVALID_CDB
	.comm	_SCSI_ASCQ_CAUSE_NOT_REPORTABLE,4,2 ; @SCSI_ASCQ_CAUSE_NOT_REPORTABLE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BYTES_TO_DWORDS,4,2            ; @BYTES_TO_DWORDS
	.comm	_nvme_admin_activate_fw,8,3     ; @nvme_admin_activate_fw
	.comm	_NVME_FWACT_REPL_ACTV,8,3       ; @NVME_FWACT_REPL_ACTV
	.no_dead_strip	_nvme_trans_send_fw_cmd
.subsections_via_symbols
