	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_physical_SetMode               ## -- Begin function physical_SetMode
	.p2align	4, 0x90
_physical_SetMode:                      ## @physical_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	(%rdi), %eax
	movq	_PHYS_DIRECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PHYS_DEDICATED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	movl	%eax, %esi
	orl	%ebx, %esi
	testl	%esi, %edx
	je	LBB0_4
## %bb.1:
	testl	%eax, %ecx
	je	LBB0_3
## %bb.2:
	movq	_PHYS_BACKGROUND@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_3
LBB0_4:
	movl	%ebx, (%rdi)
	movl	$1, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_LogWARN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	4(%rdi), %r15d
	movl	%eax, %edi
	callq	_mode2Nam
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_mode2Nam
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_log_Printf
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	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_BACKGROUND,4,2            ## @PHYS_BACKGROUND
	.comm	_LogWARN,4,2                    ## @LogWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Cannot change mode %s to %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_physical_SetMode               ; -- Begin function physical_SetMode
	.p2align	2
_physical_SetMode:                      ; @physical_SetMode
	.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, x1
	ldr	w8, [x0]
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
	orr	w11, w8, w1
	tst	w10, w11
	b.eq	LBB0_3
; %bb.1:
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh6:
	adrp	x9, _PHYS_BACKGROUND@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PHYS_BACKGROUND@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w19
	b.eq	LBB0_4
LBB0_3:
	str	w19, [x0]
	mov	w0, #1
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x9, _LogWARN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LogWARN@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x9]
	ldr	w21, [x0, #4]
	mov	x0, x8
	bl	_mode2Nam
	mov	x22, x0
	mov	x0, x19
	bl	_mode2Nam
	mov	x4, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	bl	_log_Printf
	mov	w0, #0
LBB0_5:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PHYS_DIRECT,4,2                ; @PHYS_DIRECT
	.comm	_PHYS_DEDICATED,4,2             ; @PHYS_DEDICATED
	.comm	_PHYS_BACKGROUND,4,2            ; @PHYS_BACKGROUND
	.comm	_LogWARN,4,2                    ; @LogWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Cannot change mode %s to %s\n"

.subsections_via_symbols
