	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmux_switch_ddc
_gmux_switch_ddc:                       ## @gmux_switch_ddc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_apple_gmux_data@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	(%rax), %r14d
	cmpl	%edi, %r14d
	jne	LBB0_2
## %bb.1:
	movl	%ebx, %r14d
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_pr_debug
	movq	(%r15), %rdi
	movl	%ebx, (%rdi)
	movq	_VGA_SWITCHEROO_IGD@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%ebx, (%rax)
	sete	%cl
	movq	_GMUX_PORT_SWITCH_DDC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edx
	subl	%ecx, %edx
	callq	_gmux_write8
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_apple_gmux_data,8,3            ## @apple_gmux_data
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Switching DDC from %d to %d\n"

	.comm	_VGA_SWITCHEROO_IGD,4,2         ## @VGA_SWITCHEROO_IGD
	.comm	_GMUX_PORT_SWITCH_DDC,4,2       ## @GMUX_PORT_SWITCH_DDC
	.no_dead_strip	_gmux_switch_ddc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmux_switch_ddc
_gmux_switch_ddc:                       ; @gmux_switch_ddc
	.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	x20, x0
Lloh0:
	adrp	x21, _apple_gmux_data@GOTPAGE
Lloh1:
	ldr	x21, [x21, _apple_gmux_data@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w19, [x8]
	cmp	w19, w0
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_pr_debug
	ldr	x0, [x21]
	str	w20, [x0]
Lloh4:
	adrp	x8, _VGA_SWITCHEROO_IGD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VGA_SWITCHEROO_IGD@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _GMUX_PORT_SWITCH_DDC@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GMUX_PORT_SWITCH_DDC@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
	cmp	w8, w20
	mov	w8, #1
	cinc	w2, w8, ne
	bl	_gmux_write8
	mov	x20, x19
LBB0_2:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_apple_gmux_data,8,3            ; @apple_gmux_data
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Switching DDC from %d to %d\n"

	.comm	_VGA_SWITCHEROO_IGD,4,2         ; @VGA_SWITCHEROO_IGD
	.comm	_GMUX_PORT_SWITCH_DDC,4,2       ; @GMUX_PORT_SWITCH_DDC
	.no_dead_strip	_gmux_switch_ddc
.subsections_via_symbols
