	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_hdmi_i2c_write
_zx_hdmi_i2c_write:                     ## @zx_hdmi_i2c_write
	.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
	cmpl	$1, (%rsi)
	jne	LBB0_3
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	4(%rsi), %edx
	movq	_DDC_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DDC_SEGMENT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%ecx, %edx
	je	LBB0_4
## %bb.2:
	cmpl	%eax, %edx
	je	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_4:
	cmpl	%eax, %edx
	je	LBB0_6
## %bb.5:
	cmpl	%ecx, %edx
	jne	LBB0_10
LBB0_6:
	cmpl	%eax, %edx
	jne	LBB0_7
## %bb.8:
	movq	_ZX_DDC_SEGM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_ZX_DDC_ADDR@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	addl	%edx, %edx
	movq	%r14, %rdi
	callq	_hdmi_writeb
LBB0_10:
	movq	_ZX_DDC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_hdmi_writeb
	xorl	%eax, %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DDC_ADDR,4,2                   ## @DDC_ADDR
	.comm	_DDC_SEGMENT_ADDR,4,2           ## @DDC_SEGMENT_ADDR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ZX_DDC_SEGM,4,2                ## @ZX_DDC_SEGM
	.comm	_ZX_DDC_ADDR,4,2                ## @ZX_DDC_ADDR
	.comm	_ZX_DDC_OFFSET,4,2              ## @ZX_DDC_OFFSET
	.no_dead_strip	_zx_hdmi_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_hdmi_i2c_write
_zx_hdmi_i2c_write:                     ; @zx_hdmi_i2c_write
	.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
	ldr	w8, [x1]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x1
	ldr	w8, [x1, #4]
Lloh0:
	adrp	x9, _DDC_ADDR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DDC_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x9]
Lloh3:
	adrp	x9, _DDC_SEGMENT_ADDR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DDC_SEGMENT_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w10
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_5
; %bb.2:
	mov	x19, x0
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x10, _ZX_DDC_SEGM@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ZX_DDC_SEGM@GOTPAGEOFF]
Lloh8:
	adrp	x11, _ZX_DDC_ADDR@GOTPAGE
Lloh9:
	ldr	x11, [x11, _ZX_DDC_ADDR@GOTPAGEOFF]
	cmp	w8, w9
	csel	x9, x10, x11, eq
	ldr	w1, [x9]
	lsl	w2, w8, #1
	mov	x0, x19
	bl	_hdmi_writeb
LBB0_4:
Lloh10:
	adrp	x8, _ZX_DDC_OFFSET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ZX_DDC_OFFSET@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x8, [x20, #8]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hdmi_writeb
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DDC_ADDR,4,2                   ; @DDC_ADDR
	.comm	_DDC_SEGMENT_ADDR,4,2           ; @DDC_SEGMENT_ADDR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ZX_DDC_SEGM,4,2                ; @ZX_DDC_SEGM
	.comm	_ZX_DDC_ADDR,4,2                ; @ZX_DDC_ADDR
	.comm	_ZX_DDC_OFFSET,4,2              ; @ZX_DDC_OFFSET
	.no_dead_strip	_zx_hdmi_i2c_write
.subsections_via_symbols
