	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cvt_gate_to_trap
_cvt_gate_to_trap:                      ## @cvt_gate_to_trap
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	(%rsi), %rcx
	movq	_GATE_TRAP@GOTPCREL(%rip), %rax
	movq	_GATE_INTERRUPT@GOTPCREL(%rip), %r15
	cmpq	(%rax), %rcx
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	cmpq	(%r15), %rcx
	jne	LBB0_4
LBB0_2:
	movl	%edi, (%r14)
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsp)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rsp)
	callq	_gate_offset
	movq	%rax, 8(%r14)
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsp)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rsp)
	callq	_gate_segment
	movl	%eax, 20(%r14)
	movl	16(%rbx), %ecx
	movl	%ecx, 16(%r14)
	movq	(%rbx), %rdx
	movl	$1, %eax
	cmpq	(%r15), %rdx
	jne	LBB0_4
## %bb.3:
	orl	$4, %ecx
	movl	%ecx, 16(%r14)
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GATE_TRAP,8,3                  ## @GATE_TRAP
	.comm	_GATE_INTERRUPT,8,3             ## @GATE_INTERRUPT
	.comm	_debug,8,3                      ## @debug
	.comm	_double_fault,8,3               ## @double_fault
	.comm	_int3,8,3                       ## @int3
	.comm	_machine_check,8,3              ## @machine_check
	.comm	_nmi,8,3                        ## @nmi
	.comm	_stack_segment,8,3              ## @stack_segment
	.comm	_xen_debug,8,3                  ## @xen_debug
	.comm	_xen_int3,8,3                   ## @xen_int3
	.comm	_xen_stack_segment,8,3          ## @xen_stack_segment
	.no_dead_strip	_cvt_gate_to_trap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cvt_gate_to_trap
_cvt_gate_to_trap:                      ; @cvt_gate_to_trap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _GATE_TRAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GATE_TRAP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x21, _GATE_INTERRUPT@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GATE_INTERRUPT@GOTPAGEOFF]
	ldr	x10, [x21]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	str	w0, [x2]
	ldr	q0, [x1]
	str	q0, [sp]
	ldr	x8, [x1, #16]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_gate_offset
	str	x0, [x19, #8]
	ldr	q0, [x20]
	str	q0, [sp]
	ldr	x8, [x20, #16]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_gate_segment
	str	w0, [x19, #20]
	ldr	w8, [x20, #16]
	str	w8, [x19, #16]
	ldr	x9, [x20]
	ldr	x10, [x21]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.2:
	orr	w8, w8, #0x4
	str	w8, [x19, #16]
LBB0_3:
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GATE_TRAP,8,3                  ; @GATE_TRAP
	.comm	_GATE_INTERRUPT,8,3             ; @GATE_INTERRUPT
	.comm	_debug,8,3                      ; @debug
	.comm	_double_fault,8,3               ; @double_fault
	.comm	_int3,8,3                       ; @int3
	.comm	_machine_check,8,3              ; @machine_check
	.comm	_nmi,8,3                        ; @nmi
	.comm	_stack_segment,8,3              ; @stack_segment
	.comm	_xen_debug,8,3                  ; @xen_debug
	.comm	_xen_int3,8,3                   ; @xen_int3
	.comm	_xen_stack_segment,8,3          ; @xen_stack_segment
	.no_dead_strip	_cvt_gate_to_trap
.subsections_via_symbols
