	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_PainEvent                   ## -- Begin function CG_PainEvent
	.p2align	4, 0x90
_CG_PainEvent:                          ## @CG_PainEvent
	.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
	movq	_cg@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	subl	(%rdi), %eax
	cmpl	$500, %eax                      ## imm = 0x1F4
	jl	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$25, %esi
	jge	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	cmpl	$50, %esi
	jae	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	cmpl	$75, %esi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmovbq	%rax, %rsi
LBB0_6:
	movl	8(%rbx), %r14d
	movq	_CHAN_VOICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r14d, %edi
	callq	_CG_CustomSound
	xorl	%edi, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_trap_S_StartSound
	movl	(%r12), %eax
	movl	%eax, (%rbx)
	xorb	$1, 4(%rbx)
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,4,2                         ## @cg
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"*pain25_1.wav"

L_.str.1:                               ## @.str.1
	.asciz	"*pain50_1.wav"

L_.str.2:                               ## @.str.2
	.asciz	"*pain75_1.wav"

L_.str.3:                               ## @.str.3
	.asciz	"*pain100_1.wav"

	.comm	_CHAN_VOICE,4,2                 ## @CHAN_VOICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_PainEvent                   ; -- Begin function CG_PainEvent
	.p2align	2
_CG_PainEvent:                          ; @CG_PainEvent
	.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
Lloh0:
	adrp	x22, _cg@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cg@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x0]
	sub	w8, w8, w9
	cmp	w8, #500
	b.lt	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, l_.str@PAGE
Lloh3:
	add	x8, x8, l_.str@PAGEOFF
Lloh4:
	adrp	x9, l_.str.1@PAGE
Lloh5:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh6:
	adrp	x10, l_.str.3@PAGE
Lloh7:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh8:
	adrp	x11, l_.str.2@PAGE
Lloh9:
	add	x11, x11, l_.str.2@PAGEOFF
	cmp	w1, #75
	csel	x10, x11, x10, lo
	cmp	w1, #50
	csel	x9, x9, x10, lo
	cmp	w1, #25
	csel	x1, x8, x9, lt
	ldr	w20, [x0, #8]
Lloh10:
	adrp	x8, _CHAN_VOICE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CHAN_VOICE@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_CG_CustomSound
	mov	x3, x0
	mov	x0, #0
	mov	x1, x20
	mov	x2, x21
	bl	_trap_S_StartSound
	ldr	w8, [x22]
	ldr	w9, [x19, #4]
	eor	w9, w9, #0x1
	stp	w8, w9, [x19]
LBB0_2:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,4,2                         ; @cg
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"*pain25_1.wav"

l_.str.1:                               ; @.str.1
	.asciz	"*pain50_1.wav"

l_.str.2:                               ; @.str.2
	.asciz	"*pain75_1.wav"

l_.str.3:                               ; @.str.3
	.asciz	"*pain100_1.wav"

	.comm	_CHAN_VOICE,4,2                 ; @CHAN_VOICE
.subsections_via_symbols
