	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsi_i2c_handle_status
_fsi_i2c_handle_status:                 ## @fsi_i2c_handle_status
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rdi, %r14
	movq	_I2C_STAT_ERR@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_14
## %bb.1:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_fsi_i2c_abort
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jne	LBB0_19
## %bb.2:
	movq	_I2C_STAT_INV_CMD@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_14:
	movq	%rsi, %r15
	movq	_I2C_STAT_DAT_REQ@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_17
## %bb.15:
	movq	_I2C_STAT_FIFO_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, %edx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_16
## %bb.22:
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fsi_i2c_read_fifo              ## TAILCALL
LBB0_17:
	movq	_I2C_STAT_CMD_COMP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_18
## %bb.20:
	movq	8(%r15), %rax
	cmpq	%rax, (%r14)
	jge	LBB0_19
## %bb.21:
	movq	_ENODATA@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_5:
	movq	_I2C_STAT_PARITY@GOTPCREL(%rip), %rax
	movq	_I2C_STAT_BE_OVERRUN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_I2C_STAT_BE_ACCESS@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	testl	%ebx, %ecx
	je	LBB0_7
## %bb.6:
	movq	_EPROTO@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_16:
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fsi_i2c_write_fifo             ## TAILCALL
LBB0_18:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_7:
	movq	_I2C_STAT_NACK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_9:
	movq	_I2C_STAT_LOST_ARB@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_11:
	movq	_I2C_STAT_STOP_ERR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_13
## %bb.12:
	movq	_EBADMSG@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_13:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_STAT_ERR,4,2               ## @I2C_STAT_ERR
	.comm	_I2C_STAT_INV_CMD,4,2           ## @I2C_STAT_INV_CMD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_STAT_PARITY,4,2            ## @I2C_STAT_PARITY
	.comm	_I2C_STAT_BE_OVERRUN,4,2        ## @I2C_STAT_BE_OVERRUN
	.comm	_I2C_STAT_BE_ACCESS,4,2         ## @I2C_STAT_BE_ACCESS
	.comm	_EPROTO,4,2                     ## @EPROTO
	.comm	_I2C_STAT_NACK,4,2              ## @I2C_STAT_NACK
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_I2C_STAT_LOST_ARB,4,2          ## @I2C_STAT_LOST_ARB
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_I2C_STAT_STOP_ERR,4,2          ## @I2C_STAT_STOP_ERR
	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_EIO,4,2                        ## @EIO
	.comm	_I2C_STAT_DAT_REQ,4,2           ## @I2C_STAT_DAT_REQ
	.comm	_I2C_STAT_FIFO_COUNT,4,2        ## @I2C_STAT_FIFO_COUNT
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_STAT_CMD_COMP,4,2          ## @I2C_STAT_CMD_COMP
	.comm	_ENODATA,4,2                    ## @ENODATA
	.no_dead_strip	_fsi_i2c_handle_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsi_i2c_handle_status
_fsi_i2c_handle_status:                 ; @fsi_i2c_handle_status
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _I2C_STAT_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_STAT_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	bl	_fsi_i2c_abort
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_22
; %bb.2:
Lloh3:
	adrp	x8, _I2C_STAT_INV_CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_STAT_INV_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_10
; %bb.3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_21
LBB0_4:
	mov	x20, x1
Lloh8:
	adrp	x8, _I2C_STAT_DAT_REQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I2C_STAT_DAT_REQ@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_7
; %bb.5:
Lloh11:
	adrp	x8, _I2C_STAT_FIFO_COUNT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2C_STAT_FIFO_COUNT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_FIELD_GET
	mov	x2, x0
	ldr	w8, [x20]
Lloh14:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	mov	x0, x21
	mov	x1, x20
	tst	w9, w8
	b.eq	LBB0_12
; %bb.6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fsi_i2c_read_fifo
LBB0_7:
Lloh17:
	adrp	x8, _I2C_STAT_CMD_COMP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _I2C_STAT_CMD_COMP@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_13
; %bb.8:
	ldr	x8, [x21]
	ldr	x0, [x20, #8]
	cmp	x8, x0
	b.ge	LBB0_22
; %bb.9:
Lloh20:
	adrp	x8, _ENODATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_21
LBB0_10:
Lloh22:
	adrp	x8, _I2C_STAT_PARITY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _I2C_STAT_PARITY@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _I2C_STAT_BE_OVERRUN@GOTPAGE
Lloh26:
	ldr	x9, [x9, _I2C_STAT_BE_OVERRUN@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh28:
	adrp	x9, _I2C_STAT_BE_ACCESS@GOTPAGE
Lloh29:
	ldr	x9, [x9, _I2C_STAT_BE_ACCESS@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w19
	b.eq	LBB0_14
; %bb.11:
Lloh31:
	adrp	x8, _EPROTO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
	b	LBB0_21
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fsi_i2c_write_fifo
LBB0_13:
	mov	w0, #0
	b	LBB0_22
LBB0_14:
Lloh33:
	adrp	x8, _I2C_STAT_NACK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _I2C_STAT_NACK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_16
; %bb.15:
Lloh36:
	adrp	x8, _ENXIO@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_21
LBB0_16:
Lloh38:
	adrp	x8, _I2C_STAT_LOST_ARB@GOTPAGE
Lloh39:
	ldr	x8, [x8, _I2C_STAT_LOST_ARB@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_18
; %bb.17:
Lloh41:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_21
LBB0_18:
Lloh43:
	adrp	x8, _I2C_STAT_STOP_ERR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _I2C_STAT_STOP_ERR@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_20
; %bb.19:
Lloh46:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh48:
	adrp	x8, _EIO@GOTPAGE
Lloh49:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_22:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_STAT_ERR,4,2               ; @I2C_STAT_ERR
	.comm	_I2C_STAT_INV_CMD,4,2           ; @I2C_STAT_INV_CMD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_STAT_PARITY,4,2            ; @I2C_STAT_PARITY
	.comm	_I2C_STAT_BE_OVERRUN,4,2        ; @I2C_STAT_BE_OVERRUN
	.comm	_I2C_STAT_BE_ACCESS,4,2         ; @I2C_STAT_BE_ACCESS
	.comm	_EPROTO,4,2                     ; @EPROTO
	.comm	_I2C_STAT_NACK,4,2              ; @I2C_STAT_NACK
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_I2C_STAT_LOST_ARB,4,2          ; @I2C_STAT_LOST_ARB
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_I2C_STAT_STOP_ERR,4,2          ; @I2C_STAT_STOP_ERR
	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_EIO,4,2                        ; @EIO
	.comm	_I2C_STAT_DAT_REQ,4,2           ; @I2C_STAT_DAT_REQ
	.comm	_I2C_STAT_FIFO_COUNT,4,2        ; @I2C_STAT_FIFO_COUNT
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_STAT_CMD_COMP,4,2          ; @I2C_STAT_CMD_COMP
	.comm	_ENODATA,4,2                    ; @ENODATA
	.no_dead_strip	_fsi_i2c_handle_status
.subsections_via_symbols
