	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_amd_xfer_msg
_i2c_amd_xfer_msg:                      ## @i2c_amd_xfer_msg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_i2c_amd_start_cmd
	movq	%rbx, (%r14)
	cmpl	$33, (%rbx)
	jl	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_i2c_amd_dma_map
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%rbx), %eax
	jne	LBB0_3
## %bb.4:
	movq	_i2c_write@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_i2c_read@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_amd_mp2_rw
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_i2c_amd_check_cmd_completion   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_i2c_read,4,2                   ## @i2c_read
	.comm	_i2c_write,4,2                  ## @i2c_write
	.no_dead_strip	_i2c_amd_xfer_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_amd_xfer_msg
_i2c_amd_xfer_msg:                      ; @i2c_amd_xfer_msg
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_i2c_amd_start_cmd
	str	x20, [x19]
	ldr	w8, [x20]
	cmp	w8, #33
	b.lt	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_i2c_amd_dma_map
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w8, [x20, #4]
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	adrp	x10, _i2c_write@GOTPAGE
Lloh6:
	ldr	x10, [x10, _i2c_write@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x11, _i2c_read@GOTPAGE
Lloh9:
	ldr	x11, [x11, _i2c_read@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amd_mp2_rw
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_i2c_amd_check_cmd_completion
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_i2c_read,4,2                   ; @i2c_read
	.comm	_i2c_write,4,2                  ; @i2c_write
	.no_dead_strip	_i2c_amd_xfer_msg
.subsections_via_symbols
