	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_dm_i2c_xfer
_amdgpu_dm_i2c_xfer:                    ## @amdgpu_dm_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	callq	_i2c_get_adapdata
	movq	(%rax), %r12
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movl	%r14d, -56(%rbp)
	movq	_I2C_COMMAND_ENGINE_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -40(%rbp)
	movl	$100, -52(%rbp)
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.2:
	movl	%r14d, %ecx
	shlq	$4, %rcx
	xorl	%edx, %edx
	movq	_I2C_M_RD@GOTPCREL(%rip), %r8
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r8), %edi
	xorl	%esi, %esi
	andl	(%rbx,%rdx), %edi
	sete	%sil
	movl	%esi, (%rax,%rdx)
	movl	12(%rbx,%rdx), %esi
	movl	%esi, 12(%rax,%rdx)
	movl	8(%rbx,%rdx), %esi
	movl	%esi, 8(%rax,%rdx)
	movl	4(%rbx,%rdx), %esi
	movl	%esi, 4(%rax,%rdx)
	addq	$16, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_3
LBB0_4:
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movl	(%rcx), %edi
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_dc_submit_i2c
	testq	%rax, %rax
	cmovnel	%r14d, %r15d
	movq	-48(%rbp), %rdi
	callq	_kfree
LBB0_5:
	movl	%r15d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_I2C_COMMAND_ENGINE_DEFAULT,4,2 ## @I2C_COMMAND_ENGINE_DEFAULT
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_amdgpu_dm_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_dm_i2c_xfer
_amdgpu_dm_i2c_xfer:                    ; @amdgpu_dm_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	ldr	x22, [x0]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #4
	bl	_kcalloc
	str	x0, [sp, #16]
	cbz	x0, LBB0_12
; %bb.1:
Lloh6:
	adrp	x8, _I2C_COMMAND_ENGINE_DEFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_COMMAND_ENGINE_DEFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	w8, #100
	stp	w20, w8, [sp, #8]
	cmp	w20, #1
	b.lt	LBB0_11
; %bb.2:
	mov	w9, w20
Lloh9:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
	cmp	w20, #4
	b.hs	LBB0_4
; %bb.3:
	mov	x10, #0
	b	LBB0_9
LBB0_4:
	mov	x10, #0
	lsl	x11, x9, #4
	add	x12, x21, x11
	add	x13, x8, #4
	cmp	x0, x13
	add	x13, x0, x11
	ccmp	x13, x8, #0, lo
	cset	w11, hi
	cmp	x13, x21
	ccmp	x0, x12, #2, hi
	b.lo	LBB0_9
; %bb.5:
	tbnz	w11, #0, LBB0_9
; %bb.6:
	and	x10, x9, #0xfffffffc
	movi.4s	v0, #1
	mov	x11, x10
	mov	x12, x0
	mov	x13, x21
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ld4.4s	{ v1, v2, v3, v4 }, [x13], #64
	ld1r.4s	{ v5 }, [x8]
	and.16b	v5, v5, v1
	cmeq.4s	v5, v5, #0
	and.16b	v1, v5, v0
	st4.4s	{ v1, v2, v3, v4 }, [x12], #64
	subs	x11, x11, #4
	b.ne	LBB0_7
; %bb.8:
	cmp	x10, x9
	b.eq	LBB0_11
LBB0_9:
	sub	x9, x9, x10
	lsl	x11, x10, #4
	add	x10, x21, x11
	add	x11, x0, x11
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10]
	ldr	w13, [x8]
	tst	w13, w12
	cset	w12, eq
	str	w12, [x11]
	ldr	w12, [x10, #12]
	str	w12, [x11, #12]
	ldur	d0, [x10, #4]
	stur	d0, [x11, #4]
	add	x10, x10, #16
	add	x11, x11, #16
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_11:
	ldp	x9, x8, [x22]
	ldr	w0, [x8]
	ldr	w1, [x9]
	add	x2, sp, #8
	bl	_dc_submit_i2c
	cmp	x0, #0
	csel	w19, w19, w20, eq
	ldr	x0, [sp, #16]
	bl	_kfree
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_I2C_COMMAND_ENGINE_DEFAULT,4,2 ; @I2C_COMMAND_ENGINE_DEFAULT
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_amdgpu_dm_i2c_xfer
.subsections_via_symbols
