	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_choose_random_tid              ## -- Begin function choose_random_tid
	.p2align	4, 0x90
_choose_random_tid:                     ## @choose_random_tid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_max_port@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_min_port@GOTPCREL(%rip), %rbx
	subl	(%rbx), %r14d
	xorl	%eax, %eax
	callq	_lrand48
	movl	$-1, %ecx
	testl	%r14d, %r14d
	js	LBB0_5
## %bb.1:
	movl	%eax, %edx
	incl	%r14d
	movq	_C@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movslq	(%rbx), %rdi
	movl	%r14d, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edx, %eax
	cltd
	idivl	%r14d
	movslq	%edx, %rax
	addq	%rdi, %rax
	cmpq	$0, (%rsi,%rax,8)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%edx
	decl	%ebx
	testl	%ebx, %ebx
	jg	LBB0_3
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %ecx
LBB0_5:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_max_port,4,2                   ## @max_port
	.comm	_min_port,4,2                   ## @min_port
	.comm	_C,8,3                          ## @C
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_choose_random_tid              ; -- Begin function choose_random_tid
	.p2align	2
_choose_random_tid:                     ; @choose_random_tid
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _max_port@GOTPAGE
Lloh1:
	ldr	x8, [x8, _max_port@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x19, _min_port@GOTPAGE
Lloh4:
	ldr	x19, [x19, _min_port@GOTPAGEOFF]
	ldr	w9, [x19]
	sub	w20, w8, w9
	bl	_lrand48
	tbnz	w20, #31, LBB0_4
; %bb.1:
	add	w8, w20, #1
Lloh5:
	adrp	x9, _C@GOTPAGE
Lloh6:
	ldr	x9, [x9, _C@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w10, [x19]
	mov	x11, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sdiv	w12, w0, w8
	msub	w12, w12, w8, w0
	add	w0, w10, w12
	ldr	x13, [x9, w0, sxtw #3]
	cbz	x13, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w0, w12, #1
	sub	w11, w11, #1
	cmp	w11, #1
	b.ge	LBB0_2
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_max_port,4,2                   ; @max_port
	.comm	_min_port,4,2                   ; @min_port
	.comm	_C,8,3                          ; @C
.subsections_via_symbols
