	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psb_intel_sdvo_select_i2c_bus
_psb_intel_sdvo_select_i2c_bus:         ## @psb_intel_sdvo_select_i2c_bus
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	%edx, %edi
	callq	_IS_SDVOB
	xorl	%edx, %edx
	testq	%rax, %rax
	sete	%dl
	movq	8(%rbx), %rcx
	leaq	(%rdx,%rdx,2), %rdx
	cmpq	$0, 16(%rcx,%rdx,8)
	je	LBB0_1
## %bb.2:
	leaq	(%rcx,%rdx,8), %rax
	movq	8(%rcx,%rdx,8), %rsi
	jmp	LBB0_3
LBB0_1:
	movq	_GMBUS_RATE_1MHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	sarl	$8, %eax
	movslq	%eax, %rsi
	movq	_GMBUS_PORT_DPB@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rcx
	movq	_GMBUS_NUM_PORTS@GOTPCREL(%rip), %rdx
	movq	(%rbx), %rax
	cmpq	(%rdx), %rcx
	jae	LBB0_4
## %bb.5:
	leaq	(%rax,%rcx,4), %rdi
	movq	%rdi, (%r14)
	callq	_gma_intel_gmbus_set_speed
	movq	(%r14), %rdi
	movl	$1, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_gma_intel_gmbus_force_bit      ## TAILCALL
LBB0_4:
	movq	_GMBUS_PORT_DPB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, (%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GMBUS_PORT_DPB,8,3             ## @GMBUS_PORT_DPB
	.comm	_GMBUS_RATE_1MHZ,4,2            ## @GMBUS_RATE_1MHZ
	.comm	_GMBUS_NUM_PORTS,8,3            ## @GMBUS_NUM_PORTS
	.no_dead_strip	_psb_intel_sdvo_select_i2c_bus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psb_intel_sdvo_select_i2c_bus
_psb_intel_sdvo_select_i2c_bus:         ; @psb_intel_sdvo_select_i2c_bus
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, x2
	bl	_IS_SDVOB
	cmp	x0, #0
	cset	w9, eq
	ldr	x10, [x20, #8]
	mov	w8, #24
	umaddl	x8, w9, w8, x10
	ldr	x11, [x8, #16]
Lloh0:
	adrp	x8, _GMBUS_PORT_DPB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GMBUS_PORT_DPB@GOTPAGEOFF]
	cbz	x11, LBB0_2
; %bb.1:
	mov	w11, #24
	madd	x9, x9, x11, x10
	ldr	x1, [x9, #8]
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x9, _GMBUS_RATE_1MHZ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GMBUS_RATE_1MHZ@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	sbfx	x1, x9, #8, #24
	mov	x9, x8
LBB0_3:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _GMBUS_NUM_PORTS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GMBUS_NUM_PORTS@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x10]
	ldr	x10, [x20]
	cmp	x9, x11
	b.hs	LBB0_5
; %bb.4:
	add	x0, x10, x9, lsl #2
	str	x0, [x19]
	bl	_gma_intel_gmbus_set_speed
	ldr	x0, [x19]
	mov	w1, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_gma_intel_gmbus_force_bit
LBB0_5:
	ldr	x8, [x8]
	add	x8, x10, x8, lsl #2
	str	x8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GMBUS_PORT_DPB,8,3             ; @GMBUS_PORT_DPB
	.comm	_GMBUS_RATE_1MHZ,4,2            ; @GMBUS_RATE_1MHZ
	.comm	_GMBUS_NUM_PORTS,8,3            ; @GMBUS_NUM_PORTS
	.no_dead_strip	_psb_intel_sdvo_select_i2c_bus
.subsections_via_symbols
