	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p8_i2c_occ_send_cmd
_p8_i2c_occ_send_cmd:                   ## @p8_i2c_occ_send_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	%rsi, %r12
	movq	%rdi, %r14
	movq	_OCC_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	movq	_OCC_CMD_IN_PRG_WAIT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_to_p8_i2c_occ
	movq	(%rax), %r13
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_OCB_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OCC_SRAM_ADDR_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	callq	_p8_i2c_occ_putscom_u32
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.1:
	movq	_OCB_DATA3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_p8_i2c_occ_putscom_be
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.2:
	movq	_OCB_DATA1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OCC_DATA_ATTN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	callq	_p8_i2c_occ_putscom_u32
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.3:
	addq	%r15, -48(%rbp)                 ## 8-byte Folded Spill
	movq	_OCC_SRAM_ADDR_RESP@GOTPCREL(%rip), %r15
	movq	_EALREADY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_OCB_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	callq	_p8_i2c_occ_putscom_u32
	testl	%eax, %eax
	jne	LBB0_23
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_OCB_DATA3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_p8_i2c_occ_getscom
	testl	%eax, %eax
	jne	LBB0_23
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %ecx
	cmpl	$137, %ecx
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %ebx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_schedule_timeout
	testl	%ebx, %ebx
	jne	LBB0_4
LBB0_9:
	movl	(%r14), %ecx
LBB0_10:
	addl	$-128, %ecx
	cmpl	$12, %ecx
	ja	LBB0_14
## %bb.11:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_13:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_EPROTO@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_17
## %bb.16:
	negl	%ebx
	jmp	LBB0_24
LBB0_17:
	leaq	4(%r14), %rdi
	callq	_get_unaligned_be16
	movq	_OCC_RESP_DATA_BYTES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_18
## %bb.20:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_18:
	xorl	%ebx, %ebx
	cmpl	$2, %eax
	jl	LBB0_24
## %bb.19:
	movl	%eax, %r15d
	addq	$32, %r14
	movl	$1, %r12d
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	_OCB_DATA3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_p8_i2c_occ_getscom
	testl	%eax, %eax
	jne	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_22 Depth=1
	addq	$8, %r12
	addq	$32, %r14
	cmpq	%r15, %r12
	jl	LBB0_22
	jmp	LBB0_24
LBB0_23:
	movl	%eax, %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_17
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_15
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_13
	.end_data_region
                                        ## -- 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	_jiffies,8,3                    ## @jiffies
	.comm	_OCB_ADDR,4,2                   ## @OCB_ADDR
	.comm	_OCC_SRAM_ADDR_CMD,4,2          ## @OCC_SRAM_ADDR_CMD
	.comm	_OCB_DATA3,4,2                  ## @OCB_DATA3
	.comm	_OCB_DATA1,4,2                  ## @OCB_DATA1
	.comm	_OCC_DATA_ATTN,4,2              ## @OCC_DATA_ATTN
	.comm	_OCC_SRAM_ADDR_RESP,4,2         ## @OCC_SRAM_ADDR_RESP
	.comm	_EALREADY,4,2                   ## @EALREADY
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_EPROTO,4,2                     ## @EPROTO
	.comm	_OCC_RESP_DATA_BYTES,4,2        ## @OCC_RESP_DATA_BYTES
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.no_dead_strip	_p8_i2c_occ_send_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p8_i2c_occ_send_cmd
_p8_i2c_occ_send_cmd:                   ; @p8_i2c_occ_send_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	x23, x1
	mov	x20, 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	x22, 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	x21, x0
	mov	x0, x20
	bl	_to_p8_i2c_occ
	ldr	x19, [x0]
Lloh6:
	adrp	x25, _jiffies@GOTPAGE
Lloh7:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	ldr	x27, [x25]
Lloh8:
	adrp	x26, _OCB_ADDR@GOTPAGE
Lloh9:
	ldr	x26, [x26, _OCB_ADDR@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh10:
	adrp	x8, _OCC_SRAM_ADDR_CMD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OCC_SRAM_ADDR_CMD@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_p8_i2c_occ_putscom_u32
	cbnz	w0, LBB0_3
; %bb.1:
Lloh13:
	adrp	x24, _OCB_DATA3@GOTPAGE
Lloh14:
	ldr	x24, [x24, _OCB_DATA3@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x23
	bl	_p8_i2c_occ_putscom_be
	cbnz	w0, LBB0_3
; %bb.2:
Lloh15:
	adrp	x8, _OCB_DATA1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OCB_DATA1@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _OCC_DATA_ATTN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OCC_DATA_ATTN@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_p8_i2c_occ_putscom_u32
	cbz	w0, LBB0_4
LBB0_3:
	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
LBB0_4:
	add	x22, x27, x22
Lloh21:
	adrp	x23, _OCC_SRAM_ADDR_RESP@GOTPAGE
Lloh22:
	ldr	x23, [x23, _OCC_SRAM_ADDR_RESP@GOTPAGEOFF]
Lloh23:
	adrp	x27, _EALREADY@GOTPAGE
Lloh24:
	ldr	x27, [x27, _EALREADY@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	ldr	w2, [x23]
	mov	x0, x19
	mov	w3, #0
	bl	_p8_i2c_occ_putscom_u32
	cbnz	w0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x20
	bl	_p8_i2c_occ_getscom
	cbnz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20]
	cmp	w8, #137
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w28, [x27]
	ldr	x0, [x25]
	mov	x1, x22
	bl	_time_after
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh25:
	adrp	x8, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_set_current_state
	mov	x0, x21
	bl	_schedule_timeout
	cbnz	w28, LBB0_5
LBB0_10:
	ldr	w8, [x20]
LBB0_11:
	sub	w9, w8, #128
	cmp	w9, #12
	b.hi	LBB0_15
; %bb.12:
Lloh28:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh30:
	adrp	x10, lJTI0_0@PAGE
Lloh31:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_13
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_13:
Lloh32:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh34:
	adrp	x8, _EINVAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh36:
	adrp	x8, _EPROTO@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	cmp	w8, #0
	b.le	LBB0_18
; %bb.17:
	neg	w0, w8
	b	LBB0_3
LBB0_18:
	add	x0, x20, #4
	bl	_get_unaligned_be16
Lloh38:
	adrp	x8, _OCC_RESP_DATA_BYTES@GOTPAGE
Lloh39:
	ldr	x8, [x8, _OCC_RESP_DATA_BYTES@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cmp	w0, w8
	b.le	LBB0_20
; %bb.19:
Lloh41:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_20:
	cmp	w0, #2
	b.lt	LBB0_24
; %bb.21:
	mov	w21, w0
	add	x20, x20, #32
	mov	w22, #1
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x20
	bl	_p8_i2c_occ_getscom
	cbnz	w0, LBB0_3
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x22, x22, #8
	add	x20, x20, #32
	cmp	x22, x21
	b.lt	LBB0_22
	b	LBB0_3
LBB0_24:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_18-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_14-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_14-LBB0_13)>>2
	.byte	(LBB0_16-LBB0_13)>>2
	.byte	(LBB0_14-LBB0_13)>>2
	.byte	(LBB0_14-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
                                        ; -- 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	_jiffies,8,3                    ; @jiffies
	.comm	_OCB_ADDR,4,2                   ; @OCB_ADDR
	.comm	_OCC_SRAM_ADDR_CMD,4,2          ; @OCC_SRAM_ADDR_CMD
	.comm	_OCB_DATA3,4,2                  ; @OCB_DATA3
	.comm	_OCB_DATA1,4,2                  ; @OCB_DATA1
	.comm	_OCC_DATA_ATTN,4,2              ; @OCC_DATA_ATTN
	.comm	_OCC_SRAM_ADDR_RESP,4,2         ; @OCC_SRAM_ADDR_RESP
	.comm	_EALREADY,4,2                   ; @EALREADY
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_EPROTO,4,2                     ; @EPROTO
	.comm	_OCC_RESP_DATA_BYTES,4,2        ; @OCC_RESP_DATA_BYTES
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.no_dead_strip	_p8_i2c_occ_send_cmd
.subsections_via_symbols
