	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_datalink_SetMode               ## -- Begin function datalink_SetMode
	.p2align	4, 0x90
_datalink_SetMode:                      ## @datalink_SetMode
	.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	%esi, %r14d
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	callq	_physical_SetMode
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movq	_PHYS_DIRECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PHYS_DEDICATED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	testl	%eax, %edx
	je	LBB0_4
## %bb.3:
	movq	$0, 24(%rbx)
LBB0_4:
	cmpl	%ecx, %eax
	jne	LBB0_6
## %bb.5:
	movq	$0, 8(%rbx)
LBB0_6:
	movq	_PHYS_DDIAL@GOTPCREL(%rip), %rax
	movq	_PHYS_BACKGROUND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_PHYS_FOREGROUND@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	$1, %r15d
	testl	%r14d, %ecx
	je	LBB0_9
## %bb.7:
	movq	(%rbx), %rax
	movq	_DATALINK_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_9
## %bb.8:
	movl	$1, %r15d
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_datalink_Up
	jmp	LBB0_9
LBB0_1:
	xorl	%r15d, %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHYS_DIRECT,4,2                ## @PHYS_DIRECT
	.comm	_PHYS_DEDICATED,4,2             ## @PHYS_DEDICATED
	.comm	_PHYS_DDIAL,4,2                 ## @PHYS_DDIAL
	.comm	_PHYS_BACKGROUND,4,2            ## @PHYS_BACKGROUND
	.comm	_PHYS_FOREGROUND,4,2            ## @PHYS_FOREGROUND
	.comm	_DATALINK_READY,8,3             ## @DATALINK_READY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_datalink_SetMode               ; -- Begin function datalink_SetMode
	.p2align	2
_datalink_SetMode:                      ; @datalink_SetMode
	.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	x20, x1
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	_physical_SetMode
	cbz	w0, LBB0_8
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _PHYS_DIRECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHYS_DIRECT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _PHYS_DEDICATED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PHYS_DEDICATED@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w10, w10, w9
	tst	w10, w8
	b.eq	LBB0_3
; %bb.2:
	str	xzr, [x19, #24]
LBB0_3:
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
	str	xzr, [x19, #8]
LBB0_5:
Lloh6:
	adrp	x8, _PHYS_DDIAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PHYS_DDIAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PHYS_BACKGROUND@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PHYS_BACKGROUND@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _PHYS_FOREGROUND@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PHYS_FOREGROUND@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w20
	b.eq	LBB0_9
; %bb.6:
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _DATALINK_READY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DATALINK_READY@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	mov	w20, #1
	cmp	x8, x9
	b.gt	LBB0_10
; %bb.7:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_datalink_Up
	b	LBB0_10
LBB0_8:
	mov	w20, #0
	b	LBB0_10
LBB0_9:
	mov	w20, #1
LBB0_10:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PHYS_DIRECT,4,2                ; @PHYS_DIRECT
	.comm	_PHYS_DEDICATED,4,2             ; @PHYS_DEDICATED
	.comm	_PHYS_DDIAL,4,2                 ; @PHYS_DDIAL
	.comm	_PHYS_BACKGROUND,4,2            ; @PHYS_BACKGROUND
	.comm	_PHYS_FOREGROUND,4,2            ; @PHYS_FOREGROUND
	.comm	_DATALINK_READY,8,3             ; @DATALINK_READY
.subsections_via_symbols
