	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_hdmi_i2c_xfer
_dw_hdmi_i2c_xfer:                      ## @dw_hdmi_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
	subq	$40, %rsp
	.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
	callq	_i2c_get_adapdata
	movq	%rax, %r15
	movq	8(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r14d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.1:
	movl	%ebx, %eax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 4(%r13,%rcx)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%edx
	addq	$24, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_2
LBB0_5:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	leaq	8(%r12), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_HDMI_IH_MUTE_I2CM_STAT0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_hdmi_writeb
	movq	_HDMI_I2CM_SLAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_hdmi_writeb
	movq	$0, (%r12)
	testl	%ebx, %ebx
	movl	$0, %eax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	cmovgl	%ebx, %eax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	callq	_dw_hdmi_i2c_write
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %r12d
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$24, %r14
	incl	%ebx
	testl	%r12d, %r12d
	js	LBB0_15
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r15), %edi
	movl	4(%r13,%r14), %r8d
	movl	8(%r13,%r14), %r9d
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r13,%r14), %esi
	movq	_DDC_SEGMENT_ADDR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$1, 4(%r13,%r14)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, 4(%rax)
	movq	_HDMI_I2CM_SEGADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hdmi_writeb
	movq	16(%r13,%r14), %rax
	movl	(%rax), %esi
	movq	_HDMI_I2CM_SEGPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hdmi_writeb
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r13,%r14), %rsi
	movl	4(%r13,%r14), %edx
	testl	%eax, 8(%r13,%r14)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	callq	_dw_hdmi_i2c_read
	jmp	LBB0_13
LBB0_15:
	testl	%r12d, %r12d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmovnel	%r12d, %ebx
	movq	_HDMI_IH_I2CM_STAT0_ERROR@GOTPCREL(%rip), %rax
	movq	_HDMI_IH_I2CM_STAT0_DONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_HDMI_IH_MUTE_I2CM_STAT0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hdmi_writeb
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_16
LBB0_3:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$40, %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	"xfer: num: %d, addr: %#x\n"

L_.str.1:                               ## @.str.1
	.asciz	"unsupported transfer %d/%d, no data\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_HDMI_IH_MUTE_I2CM_STAT0,4,2    ## @HDMI_IH_MUTE_I2CM_STAT0
	.comm	_HDMI_I2CM_SLAVE,4,2            ## @HDMI_I2CM_SLAVE
L_.str.2:                               ## @.str.2
	.asciz	"xfer: num: %d/%d, len: %d, flags: %#x\n"

	.comm	_DDC_SEGMENT_ADDR,4,2           ## @DDC_SEGMENT_ADDR
	.comm	_HDMI_I2CM_SEGADDR,4,2          ## @HDMI_I2CM_SEGADDR
	.comm	_HDMI_I2CM_SEGPTR,4,2           ## @HDMI_I2CM_SEGPTR
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_HDMI_IH_I2CM_STAT0_ERROR,4,2   ## @HDMI_IH_I2CM_STAT0_ERROR
	.comm	_HDMI_IH_I2CM_STAT0_DONE,4,2    ## @HDMI_IH_I2CM_STAT0_DONE
	.no_dead_strip	_dw_hdmi_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_hdmi_i2c_xfer
_dw_hdmi_i2c_xfer:                      ; @dw_hdmi_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x22, x1
	bl	_i2c_get_adapdata
	mov	x19, x0
	ldr	x24, [x0, #8]
	ldr	w23, [x22]
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	bl	_dev_dbg
	cmp	w20, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x8, #0
	mov	w3, w20
	add	x9, x22, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	cbz	w10, LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #1
	add	x9, x9, #24
	cmp	x3, x8
	b.ne	LBB0_2
LBB0_4:
	add	x0, x24, #8
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	bl	_mutex_lock
Lloh2:
	adrp	x8, _HDMI_IH_MUTE_I2CM_STAT0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HDMI_IH_MUTE_I2CM_STAT0@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_hdmi_writeb
Lloh5:
	adrp	x8, _HDMI_I2CM_SLAVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDMI_I2CM_SLAVE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x23
	bl	_hdmi_writeb
	mov	x26, #0
	mov	w23, #0
	str	xzr, [x24]
	cmp	w20, #0
	csel	w27, w20, wzr, gt
	add	x28, x22, #8
Lloh8:
	adrp	x25, _DDC_SEGMENT_ADDR@GOTPAGE
Lloh9:
	ldr	x25, [x25, _DDC_SEGMENT_ADDR@GOTPAGEOFF]
Lloh10:
	adrp	x22, l_.str.2@PAGE
Lloh11:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh12:
	adrp	x21, _I2C_M_RD@GOTPAGE
Lloh13:
	ldr	x21, [x21, _I2C_M_RD@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_dw_hdmi_i2c_write
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x23, x0
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x28, x28, #24
	add	x26, x26, #1
	tbnz	w23, #31, LBB0_14
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x27, x26
	b.eq	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19]
	add	w2, w26, #1
	ldp	w8, w9, [x28, #-4]
	stp	x8, x9, [sp]
	mov	x1, x22
	mov	x3, x20
	bl	_dev_dbg
	ldur	w1, [x28, #-8]
	ldr	w8, [x25]
	cmp	w1, w8
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldur	w8, [x28, #-4]
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	str	w8, [x24, #4]
Lloh14:
	adrp	x8, _HDMI_I2CM_SEGADDR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HDMI_I2CM_SEGADDR@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hdmi_writeb
	ldr	x8, [x28, #8]
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _HDMI_I2CM_SEGPTR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HDMI_I2CM_SEGPTR@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hdmi_writeb
	b	LBB0_7
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	ldp	w2, w8, [x28, #-4]
	ldr	w9, [x21]
	ldr	x1, [x28, #8]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	bl	_dw_hdmi_i2c_read
	b	LBB0_6
LBB0_14:
	cmp	w23, #0
	csel	w20, w20, w23, eq
Lloh20:
	adrp	x8, _HDMI_IH_I2CM_STAT0_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HDMI_IH_I2CM_STAT0_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _HDMI_IH_I2CM_STAT0_DONE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _HDMI_IH_I2CM_STAT0_DONE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh26:
	adrp	x8, _HDMI_IH_MUTE_I2CM_STAT0@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HDMI_IH_MUTE_I2CM_STAT0@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hdmi_writeb
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_mutex_unlock
	b	LBB0_16
LBB0_15:
	ldr	w0, [x19]
	add	w2, w8, #1
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_dev_dbg
Lloh31:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"xfer: num: %d, addr: %#x\n"

l_.str.1:                               ; @.str.1
	.asciz	"unsupported transfer %d/%d, no data\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_HDMI_IH_MUTE_I2CM_STAT0,4,2    ; @HDMI_IH_MUTE_I2CM_STAT0
	.comm	_HDMI_I2CM_SLAVE,4,2            ; @HDMI_I2CM_SLAVE
l_.str.2:                               ; @.str.2
	.asciz	"xfer: num: %d/%d, len: %d, flags: %#x\n"

	.comm	_DDC_SEGMENT_ADDR,4,2           ; @DDC_SEGMENT_ADDR
	.comm	_HDMI_I2CM_SEGADDR,4,2          ; @HDMI_I2CM_SEGADDR
	.comm	_HDMI_I2CM_SEGPTR,4,2           ; @HDMI_I2CM_SEGPTR
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_HDMI_IH_I2CM_STAT0_ERROR,4,2   ; @HDMI_IH_I2CM_STAT0_ERROR
	.comm	_HDMI_IH_I2CM_STAT0_DONE,4,2    ; @HDMI_IH_I2CM_STAT0_DONE
	.no_dead_strip	_dw_hdmi_i2c_xfer
.subsections_via_symbols
