	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmux_write_switch_state
_gmux_write_switch_state:               ## @gmux_write_switch_state
	.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	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_VGA_SWITCHEROO_IGD@GOTPCREL(%rip), %r14
	xorl	%ecx, %ecx
	cmpq	(%r14), %rax
	sete	%cl
	movq	_GMUX_PORT_SWITCH_DDC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edx
	subl	%ecx, %edx
	callq	_gmux_write8
	movq	8(%rbx), %rax
	xorl	%edx, %edx
	cmpq	(%r14), %rax
	sete	%dl
	xorl	$3, %edx
	movq	_GMUX_PORT_SWITCH_DISPLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gmux_write8
	movq	16(%rbx), %rax
	xorl	%edx, %edx
	cmpq	(%r14), %rax
	sete	%dl
	xorl	$3, %edx
	movq	_GMUX_PORT_SWITCH_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_gmux_write8                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VGA_SWITCHEROO_IGD,8,3         ## @VGA_SWITCHEROO_IGD
	.comm	_GMUX_PORT_SWITCH_DDC,4,2       ## @GMUX_PORT_SWITCH_DDC
	.comm	_GMUX_PORT_SWITCH_DISPLAY,4,2   ## @GMUX_PORT_SWITCH_DISPLAY
	.comm	_GMUX_PORT_SWITCH_EXTERNAL,4,2  ## @GMUX_PORT_SWITCH_EXTERNAL
	.no_dead_strip	_gmux_write_switch_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmux_write_switch_state
_gmux_write_switch_state:               ; @gmux_write_switch_state
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _VGA_SWITCHEROO_IGD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _VGA_SWITCHEROO_IGD@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh2:
	adrp	x10, _GMUX_PORT_SWITCH_DDC@GOTPAGE
Lloh3:
	ldr	x10, [x10, _GMUX_PORT_SWITCH_DDC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x10]
	cmp	x8, x9
	mov	w8, #1
	cinc	w2, w8, ne
	bl	_gmux_write8
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	cmp	x8, x9
	mov	w21, #2
	cinc	w2, w21, ne
Lloh5:
	adrp	x8, _GMUX_PORT_SWITCH_DISPLAY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GMUX_PORT_SWITCH_DISPLAY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gmux_write8
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	cmp	x8, x9
	cinc	w2, w21, ne
Lloh8:
	adrp	x8, _GMUX_PORT_SWITCH_EXTERNAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GMUX_PORT_SWITCH_EXTERNAL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	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
	b	_gmux_write8
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VGA_SWITCHEROO_IGD,8,3         ; @VGA_SWITCHEROO_IGD
	.comm	_GMUX_PORT_SWITCH_DDC,4,2       ; @GMUX_PORT_SWITCH_DDC
	.comm	_GMUX_PORT_SWITCH_DISPLAY,4,2   ; @GMUX_PORT_SWITCH_DISPLAY
	.comm	_GMUX_PORT_SWITCH_EXTERNAL,4,2  ; @GMUX_PORT_SWITCH_EXTERNAL
	.no_dead_strip	_gmux_write_switch_state
.subsections_via_symbols
