	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_atpx_switchto
_radeon_atpx_switchto:                  ## @radeon_atpx_switchto
	.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	_VGA_SWITCHEROO_IGD@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_ATPX_INTEGRATED_GPU@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ATPX_DISCRETE_GPU@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	_radeon_atpx_priv@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_atpx_switch_start
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_atpx_switch_disp_mux
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_atpx_switch_i2c_mux
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_atpx_switch_end
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VGA_SWITCHEROO_IGD,4,2         ## @VGA_SWITCHEROO_IGD
	.comm	_ATPX_INTEGRATED_GPU,4,2        ## @ATPX_INTEGRATED_GPU
	.comm	_ATPX_DISCRETE_GPU,4,2          ## @ATPX_DISCRETE_GPU
	.comm	_radeon_atpx_priv,4,2           ## @radeon_atpx_priv
	.no_dead_strip	_radeon_atpx_switchto
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_atpx_switchto
_radeon_atpx_switchto:                  ; @radeon_atpx_switchto
	.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
Lloh0:
	adrp	x8, _VGA_SWITCHEROO_IGD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VGA_SWITCHEROO_IGD@GOTPAGEOFF]
Lloh2:
	adrp	x9, _ATPX_INTEGRATED_GPU@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATPX_INTEGRATED_GPU@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _ATPX_DISCRETE_GPU@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ATPX_DISCRETE_GPU@GOTPAGEOFF]
	cmp	w8, w0
	csel	x8, x9, x10, eq
	ldr	w19, [x8]
Lloh7:
	adrp	x20, _radeon_atpx_priv@GOTPAGE
Lloh8:
	ldr	x20, [x20, _radeon_atpx_priv@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_atpx_switch_start
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_atpx_switch_disp_mux
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_atpx_switch_i2c_mux
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_atpx_switch_end
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_VGA_SWITCHEROO_IGD,4,2         ; @VGA_SWITCHEROO_IGD
	.comm	_ATPX_INTEGRATED_GPU,4,2        ; @ATPX_INTEGRATED_GPU
	.comm	_ATPX_DISCRETE_GPU,4,2          ; @ATPX_DISCRETE_GPU
	.comm	_radeon_atpx_priv,4,2           ; @radeon_atpx_priv
	.no_dead_strip	_radeon_atpx_switchto
.subsections_via_symbols
