	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function select_event_lwp
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_select_event_lwp:                      ## @select_event_lwp
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	$0, -36(%rbp)
	movl	(%rsi), %eax
	movq	(%rdi), %rcx
	movl	%eax, (%rcx)
	movq	_select_singlestep_lwp_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_iterate_over_lwps
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	_debug_lin_lwp@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	4(%rbx), %edi
	callq	_target_pid_to_str
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf_unfiltered
	jmp	LBB0_3
LBB0_4:
	movq	_count_events_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-36(%rbp), %rsi
	callq	_iterate_over_lwps
	cvtsi2sdl	-36(%rbp), %xmm0
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	callq	_rand
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movq	_RAND_MAX@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	addsd	LCPI0_0(%rip), %xmm1
	mulsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	divsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %ecx
	movl	%ecx, -40(%rbp)
	movq	_debug_lin_lwp@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.5:
	movl	-36(%rbp), %edx
	cmpl	$2, %edx
	jl	LBB0_7
## %bb.6:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf_unfiltered
LBB0_7:
	movq	_select_event_lwp_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-40(%rbp), %rsi
	callq	_iterate_over_lwps
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_8
LBB0_3:
	movq	%rbx, (%r15)
	movl	(%rbx), %eax
	movl	%eax, (%r14)
LBB0_9:
	movl	$0, (%rbx)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%r15), %rbx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_select_singlestep_lwp_callback,4,2 ## @select_singlestep_lwp_callback
	.comm	_debug_lin_lwp,8,3              ## @debug_lin_lwp
	.comm	_gdb_stdlog,4,2                 ## @gdb_stdlog
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SEL: Select single-step %s\n"

	.comm	_count_events_callback,4,2      ## @count_events_callback
	.comm	_RAND_MAX,8,3                   ## @RAND_MAX
L_.str.1:                               ## @.str.1
	.asciz	"SEL: Found %d SIGTRAP events, selecting #%d\n"

	.comm	_select_event_lwp_callback,4,2  ## @select_event_lwp_callback
	.no_dead_strip	_select_event_lwp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_event_lwp
_select_event_lwp:                      ; @select_event_lwp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	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
	.cfi_offset b8, -56
	.cfi_offset b9, -64
	mov	x19, x1
	mov	x20, x0
	str	wzr, [sp, #12]
	ldr	w8, [x1]
	ldr	x9, [x0]
	str	w8, [x9]
Lloh0:
	adrp	x8, _select_singlestep_lwp_callback@GOTPAGE
Lloh1:
	ldr	x8, [x8, _select_singlestep_lwp_callback@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_iterate_over_lwps
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x8, _debug_lin_lwp@GOTPAGE
Lloh4:
	ldr	x8, [x8, _debug_lin_lwp@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.2:
Lloh6:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh7:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	ldr	w0, [x21, #4]
	bl	_target_pid_to_str
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_fprintf_unfiltered
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x8, _count_events_callback@GOTPAGE
Lloh12:
	ldr	x8, [x8, _count_events_callback@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, sp, #12
	bl	_iterate_over_lwps
	ldr	s0, [sp, #12]
	sshll.2d	v0, v0, #0
	scvtf	d8, d0
	bl	_rand
	scvtf	d0, x0
	fmul	d0, d8, d0
Lloh14:
	adrp	x8, _RAND_MAX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RAND_MAX@GOTPAGEOFF]
Lloh16:
	ldr	d1, [x8]
	fmov	d2, #1.00000000
	fadd	d1, d1, d2
	fdiv	d0, d0, d1
	fcvtzs	w8, d0
	str	w8, [sp, #8]
Lloh17:
	adrp	x9, _debug_lin_lwp@GOTPAGE
Lloh18:
	ldr	x9, [x9, _debug_lin_lwp@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w2, [sp, #12]
	cmp	x9, #0
	ccmp	w2, #2, #8, ne
	b.lt	LBB0_5
; %bb.4:
Lloh20:
	adrp	x9, _gdb_stdlog@GOTPAGE
Lloh21:
	ldr	x9, [x9, _gdb_stdlog@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf_unfiltered
LBB0_5:
Lloh25:
	adrp	x8, _select_event_lwp_callback@GOTPAGE
Lloh26:
	ldr	x8, [x8, _select_event_lwp_callback@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_iterate_over_lwps
	mov	x21, x0
	cbz	x0, LBB0_8
LBB0_6:
	str	x21, [x20]
	ldr	w8, [x21]
	str	w8, [x19]
LBB0_7:
	str	wzr, [x21]
	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
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	ldr	x21, [x20]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_select_singlestep_lwp_callback,4,2 ; @select_singlestep_lwp_callback
	.comm	_debug_lin_lwp,8,3              ; @debug_lin_lwp
	.comm	_gdb_stdlog,4,2                 ; @gdb_stdlog
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SEL: Select single-step %s\n"

	.comm	_count_events_callback,4,2      ; @count_events_callback
	.comm	_RAND_MAX,8,3                   ; @RAND_MAX
l_.str.1:                               ; @.str.1
	.asciz	"SEL: Found %d SIGTRAP events, selecting #%d\n"

	.comm	_select_event_lwp_callback,4,2  ; @select_event_lwp_callback
	.no_dead_strip	_select_event_lwp
.subsections_via_symbols
