	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_pcb_flags_fsgsbase
_set_pcb_flags_fsgsbase:                ## @set_pcb_flags_fsgsbase
	.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, %r14d
	movq	%rdi, %rbx
	movq	_curpcb@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	je	LBB0_1
LBB0_9:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_pcb_flags_raw              ## TAILCALL
LBB0_1:
	movq	_PCB_FULL_IRET@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%r14d, %eax
	je	LBB0_9
## %bb.2:
	testl	%eax, (%rbx)
	jne	LBB0_9
## %bb.3:
	xorl	%eax, %eax
	callq	_intr_disable
	movl	%eax, %r15d
	movl	(%r12), %eax
	testl	%eax, (%rbx)
	jne	LBB0_8
## %bb.4:
	xorl	%eax, %eax
	callq	_rfs
	movq	__ufssel@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_rdfsbase
	movl	%eax, 8(%rbx)
LBB0_6:
	xorl	%eax, %eax
	callq	_rgs
	movq	__ugssel@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_MSR_KGSBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdmsr
	movl	%eax, 4(%rbx)
LBB0_8:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_set_pcb_flags_raw
	movl	%r15d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intr_restore                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_curpcb,8,3                     ## @curpcb
	.comm	_PCB_FULL_IRET,4,2              ## @PCB_FULL_IRET
	.comm	__ufssel,8,3                    ## @_ufssel
	.comm	__ugssel,8,3                    ## @_ugssel
	.comm	_MSR_KGSBASE,4,2                ## @MSR_KGSBASE
	.no_dead_strip	_set_pcb_flags_fsgsbase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_pcb_flags_fsgsbase
_set_pcb_flags_fsgsbase:                ; @set_pcb_flags_fsgsbase
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _curpcb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _curpcb@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_2
LBB0_1:
	mov	x0, x20
	mov	x1, 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	_set_pcb_flags_raw
LBB0_2:
Lloh3:
	adrp	x22, _PCB_FULL_IRET@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PCB_FULL_IRET@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w19
	b.eq	LBB0_1
; %bb.3:
	ldr	w9, [x20]
	tst	w9, w8
	b.ne	LBB0_1
; %bb.4:
	bl	_intr_disable
	mov	x21, x0
	ldr	w8, [x20]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.5:
	bl	_rfs
Lloh5:
	adrp	x8, __ufssel@GOTPAGE
Lloh6:
	ldr	x8, [x8, __ufssel@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	bl	_rdfsbase
	str	w0, [x20, #8]
LBB0_7:
	bl	_rgs
Lloh8:
	adrp	x8, __ugssel@GOTPAGE
Lloh9:
	ldr	x8, [x8, __ugssel@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _MSR_KGSBASE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSR_KGSBASE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_rdmsr
	str	w0, [x20, #4]
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_set_pcb_flags_raw
	mov	x0, x21
	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	_intr_restore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_curpcb,8,3                     ; @curpcb
	.comm	_PCB_FULL_IRET,4,2              ; @PCB_FULL_IRET
	.comm	__ufssel,8,3                    ; @_ufssel
	.comm	__ugssel,8,3                    ; @_ugssel
	.comm	_MSR_KGSBASE,4,2                ; @MSR_KGSBASE
	.no_dead_strip	_set_pcb_flags_fsgsbase
.subsections_via_symbols
