	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu_v11_0_i2c_eeprom_i2c_xfer
_smu_v11_0_i2c_eeprom_i2c_xfer:         ## @smu_v11_0_i2c_eeprom_i2c_xfer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_to_eeprom_control
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_smu_v11_0_i2c_init
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.3:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %r12
	xorl	%ebx, %ebx
	movq	_I2C_OK@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	16(%r13,%rbx), %esi
	movl	4(%r13,%rbx), %ecx
	movl	8(%r13,%rbx), %edx
	testl	%eax, (%r13,%rbx)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_smu_v11_0_i2c_eeprom_read_data
	cmpl	(%r14), %eax
	je	LBB0_6
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_smu_v11_0_i2c_eeprom_write_data
	cmpl	(%r14), %eax
	jne	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$24, %rbx
	cmpq	%rbx, %r12
	jne	LBB0_4
## %bb.7:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_smu_v11_0_i2c_fini
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C bus unlocked, stopping transaction!"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_OK,4,2                     ## @I2C_OK
	.no_dead_strip	_smu_v11_0_i2c_eeprom_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu_v11_0_i2c_eeprom_i2c_xfer
_smu_v11_0_i2c_eeprom_i2c_xfer:         ; @smu_v11_0_i2c_eeprom_i2c_xfer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_to_eeprom_control
	ldr	w8, [x0]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x0, x20
	bl	_smu_v11_0_i2c_init
	cmp	w19, #1
	b.lt	LBB0_10
; %bb.2:
	add	x21, x21, #8
Lloh0:
	adrp	x22, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	adrp	x23, _I2C_OK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _I2C_OK@GOTPAGEOFF]
	mov	w24, w19
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	ldr	w1, [x21, #8]
	ldp	w3, w2, [x21, #-4]
	ldur	w9, [x21, #-8]
	mov	x0, x20
	tst	w8, w9
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_smu_v11_0_i2c_eeprom_read_data
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_smu_v11_0_i2c_eeprom_write_data
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #24
	subs	x24, x24, #1
	b.ne	LBB0_3
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_11
LBB0_9:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_10:
	mov	x0, x20
	bl	_smu_v11_0_i2c_fini
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C bus unlocked, stopping transaction!"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_OK,4,2                     ; @I2C_OK
	.no_dead_strip	_smu_v11_0_i2c_eeprom_i2c_xfer
.subsections_via_symbols
