	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsi_occ_submit                 ## -- Begin function fsi_occ_submit
	.p2align	4, 0x90
_fsi_occ_submit:                        ## @fsi_occ_submit
	.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	%r8, %r13
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_OCC_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_OCC_CMD_IN_PRG_WAIT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_dev_get_drvdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%r13), %rdx
	cmpq	$6, %rdx
	ja	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_4:
	movq	%rax, %r15
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_OCC_SRAM_CMD_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_occ_putsram
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.5:
	movq	%r15, %rdi
	callq	_occ_trigger_attn
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.6:
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, %r13
	addq	(%rcx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_OCC_SRAM_RSP_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movl	$8, %ecx
	callq	_occ_getsram
	testl	%eax, %eax
	jne	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	16(%rbx), %eax
	movq	_OCC_RESP_CMD_IN_PRG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%rbx)
	je	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%r13), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_schedule_timeout
	testl	%r14d, %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_7
LBB0_13:
	leaq	20(%rbx), %rdi
	callq	_get_unaligned_be16
	movl	%eax, %r13d
	leal	7(%r13), %eax
	movslq	%eax, %rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	jae	LBB0_15
## %bb.14:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_11:
	negl	%r14d
	movl	4(%r15), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %edx
	movq	(%rax), %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	callq	_dev_err
	jmp	LBB0_19
LBB0_15:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movslq	16(%rbx), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$2, %r13d
	jl	LBB0_17
## %bb.16:
	movq	_OCC_SRAM_RSP_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$8, %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdx
	addq	$72, %rdx
	movl	%r13d, %ecx
	decl	%ecx
	movq	%r15, %rdi
	callq	_occ_getsram
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_19
LBB0_17:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_occ_verify_checksum
LBB0_18:
	movl	%eax, %r14d
LBB0_19:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_20:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCC_TIMEOUT_MS,4,2             ## @OCC_TIMEOUT_MS
	.comm	_OCC_CMD_IN_PRG_WAIT_MS,4,2     ## @OCC_CMD_IN_PRG_WAIT_MS
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad resplen %zd\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OCC_SRAM_CMD_ADDR,4,2          ## @OCC_SRAM_CMD_ADDR
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_OCC_SRAM_RSP_ADDR,8,3          ## @OCC_SRAM_RSP_ADDR
	.comm	_OCC_RESP_CMD_IN_PRG,4,2        ## @OCC_RESP_CMD_IN_PRG
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"resp timeout status=%02x resp seq_no=%d our seq_no=%d\n"

	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
L_.str.2:                               ## @.str.2
	.asciz	"resp_status=%02x resp_data_len=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsi_occ_submit                 ; -- Begin function fsi_occ_submit
	.p2align	2
_fsi_occ_submit:                        ; @fsi_occ_submit
	.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	x21, x4
	mov	x20, x3
	mov	x25, x2
	mov	x27, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _OCC_TIMEOUT_MS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OCC_TIMEOUT_MS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x26, x0
Lloh3:
	adrp	x8, _OCC_CMD_IN_PRG_WAIT_MS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OCC_CMD_IN_PRG_WAIT_MS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x23, x0
	mov	x0, x22
	bl	_dev_get_drvdata
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x2, [x21]
	cmp	x2, #6
	b.hi	LBB0_5
; %bb.2:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_21
LBB0_5:
	mov	x19, x0
	bl	_mutex_lock
	ldr	x24, [x27]
Lloh12:
	adrp	x8, _OCC_SRAM_CMD_ADDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OCC_SRAM_CMD_ADDR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x27
	mov	x3, x25
	bl	_occ_putsram
	mov	x25, x0
	cbnz	w0, LBB0_20
; %bb.6:
	mov	x0, x19
	bl	_occ_trigger_attn
	mov	x25, x0
	cbnz	w0, LBB0_20
; %bb.7:
Lloh15:
	adrp	x28, _jiffies@GOTPAGE
Lloh16:
	ldr	x28, [x28, _jiffies@GOTPAGEOFF]
	ldr	x8, [x28]
	add	x26, x8, x26
Lloh17:
	adrp	x27, _OCC_RESP_CMD_IN_PRG@GOTPAGE
Lloh18:
	ldr	x27, [x27, _OCC_RESP_CMD_IN_PRG@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
Lloh19:
	adrp	x8, _OCC_SRAM_RSP_ADDR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _OCC_SRAM_RSP_ADDR@GOTPAGEOFF]
Lloh21:
	ldr	x1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #8
	bl	_occ_getsram
	cbnz	w0, LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x20, #16]
	ldr	w9, [x27]
	cmp	w8, w9
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20]
	cmp	x8, x24
	b.eq	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh22:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh24:
	ldr	w25, [x8]
	ldr	x0, [x28]
	mov	x1, x26
	bl	_time_after
	cbnz	x0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh25:
	adrp	x8, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_set_current_state
	mov	x0, x23
	bl	_schedule_timeout
	cbnz	w25, LBB0_8
LBB0_13:
	add	x0, x20, #20
	bl	_get_unaligned_be16
	add	w8, w0, #7
	sxtw	x24, w8
	ldr	x8, [x21]
	cmp	x8, x24
	b.hs	LBB0_16
; %bb.14:
Lloh28:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_20
LBB0_15:
	neg	w25, w25
	ldr	w0, [x19, #4]
	ldr	w2, [x20, #16]
	ldr	x3, [x20]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x24
	bl	_dev_err
	b	LBB0_20
LBB0_16:
	mov	x23, x0
	ldrsw	x2, [x20, #16]
	str	x23, [sp]
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
	cmp	w23, #2
	b.lt	LBB0_18
; %bb.17:
Lloh35:
	adrp	x8, _OCC_SRAM_RSP_ADDR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _OCC_SRAM_RSP_ADDR@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	add	x1, x8, #8
	ldr	x8, [x20, #8]
	add	x2, x8, #72
	sub	w3, w23, #1
	mov	x0, x19
	bl	_occ_getsram
	mov	x25, x0
	cbnz	w0, LBB0_20
LBB0_18:
	str	x24, [x21]
	mov	x0, x20
	mov	x1, x23
	bl	_occ_verify_checksum
LBB0_19:
	mov	x25, x0
LBB0_20:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_21:
	mov	x0, x25
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_OCC_TIMEOUT_MS,4,2             ; @OCC_TIMEOUT_MS
	.comm	_OCC_CMD_IN_PRG_WAIT_MS,4,2     ; @OCC_CMD_IN_PRG_WAIT_MS
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad resplen %zd\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OCC_SRAM_CMD_ADDR,4,2          ; @OCC_SRAM_CMD_ADDR
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_OCC_SRAM_RSP_ADDR,8,3          ; @OCC_SRAM_RSP_ADDR
	.comm	_OCC_RESP_CMD_IN_PRG,4,2        ; @OCC_RESP_CMD_IN_PRG
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"resp timeout status=%02x resp seq_no=%d our seq_no=%d\n"

	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
l_.str.2:                               ; @.str.2
	.asciz	"resp_status=%02x resp_data_len=%d\n"

.subsections_via_symbols
