	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dm_helpers_submit_i2c          ## -- Begin function dm_helpers_submit_i2c
	.p2align	4, 0x90
_dm_helpers_submit_i2c:                 ## @dm_helpers_submit_i2c
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %r12
	testq	%r12, %r12
	je	LBB0_8
## %bb.1:
	movq	%rdx, %r15
	movl	(%rdx), %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$16, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	%rax, %rbx
	testl	%r14d, %r14d
	jle	LBB0_7
## %bb.3:
	movq	8(%r15), %rax
	addq	$16, %rax
	movq	%r14, %rcx
	shlq	$4, %rcx
	xorl	%edx, %edx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rsi
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%edi, 12(%rbx,%rdx)
	movl	-8(%rax), %edi
	movl	%edi, 8(%rbx,%rdx)
	movl	-12(%rax), %edi
	movl	%edi, 4(%rbx,%rdx)
	movl	-16(%rax), %edi
	movl	%edi, (%rbx,%rdx)
	addq	$24, %rax
	addq	$16, %rdx
	cmpq	%rdx, %rcx
	je	LBB0_7
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rax)
	movl	$0, %edi
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rsi), %edi
	jmp	LBB0_4
LBB0_7:
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_i2c_transfer
	xorl	%r15d, %r15d
	cmpl	%r14d, %eax
	sete	%r15b
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_9:
	xorl	%r15d, %r15d
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to found connector for link!"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dm_helpers_submit_i2c          ; -- Begin function dm_helpers_submit_i2c
	.p2align	2
_dm_helpers_submit_i2c:                 ; @dm_helpers_submit_i2c
	.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
	ldr	x22, [x1]
	cbz	x22, LBB0_5
; %bb.1:
	mov	x21, x2
	ldr	w19, [x2]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #16
	bl	_kcalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	cmp	w19, #1
	b.lt	LBB0_13
; %bb.3:
	ldr	x9, [x21, #8]
Lloh3:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
	cmp	w19, #3
	b.hs	LBB0_7
; %bb.4:
	mov	x10, #0
	b	LBB0_11
LBB0_5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_6:
	mov	w19, #0
	b	LBB0_14
LBB0_7:
	mov	x10, #0
	add	x12, x20, x19, lsl #4
	mov	w11, #24
	madd	x13, x19, x11, x9
	add	x11, x8, #4
	cmp	x20, x11
	ccmp	x12, x8, #0, lo
	cset	w11, hi
	cmp	x9, x12
	ccmp	x20, x13, #2, lo
	b.lo	LBB0_11
; %bb.8:
	tbnz	w11, #0, LBB0_11
; %bb.9:
	ands	x10, x19, #0x1
	mov	w11, #2
	csel	x10, x11, x10, eq
	sub	x10, x19, x10
	add	x14, x9, #16
	mov	x11, x10
	mov	x12, x20
	mov	x13, x14
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ld3.2d	{ v0, v1, v2 }, [x13], #48
	cmeq.2d	v0, v0, #0
	xtn.2s	v0, v0
	ld1r.2s	{ v1 }, [x8]
	and.8b	v3, v1, v0
	ldp	q4, q5, [x14]
	ldur	q6, [x14, #-16]
	uzp1.4s	v5, v6, v5
	zip2.4s	v2, v6, v5
	mov.16b	v0, v6
	mov.s	v0[1], v4[2]
	trn2.4s	v4, v4, v6
	ext.16b	v1, v4, v6, #4
	st4.2s	{ v0, v1, v2, v3 }, [x12], #32
	mov	x14, x13
	subs	x11, x11, #2
	b.ne	LBB0_10
LBB0_11:
	mov	w11, #24
	madd	x9, x10, x11, x9
	add	x9, x9, #16
	sub	x11, x19, x10
	add	x10, x20, x10, lsl #4
	add	x10, x10, #8
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	ldr	w13, [x8]
	cmp	x12, #0
	csel	w12, w13, wzr, eq
	ldur	w13, [x9, #-8]
	stp	w13, w12, [x10]
	ldur	d0, [x9, #-16]
	stur	d0, [x10, #-8]
	add	x9, x9, #24
	add	x10, x10, #16
	subs	x11, x11, #1
	b.ne	LBB0_12
LBB0_13:
	ldr	x0, [x22]
	mov	x1, x20
	mov	x2, x19
	bl	_i2c_transfer
	cmp	w0, w19
	cset	w19, eq
	mov	x0, x20
	bl	_kfree
LBB0_14:
	mov	x0, x19
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to found connector for link!"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
.subsections_via_symbols
