	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function register_pid
_register_pid:                          ## @register_pid
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_MAX_PID@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rsi, (%rax)
	setbe	%dil
	callq	_BUG_ON
	movq	16(%r12), %rax
	movq	(%rax,%r15,8), %rbx
	testq	%rbx, %rbx
	jne	LBB0_3
## %bb.1:
	movl	$24, %edi
	callq	_zalloc
	movq	%rax, %rbx
	movq	%r15, (%rax)
	movq	(%r12), %rax
	movq	%rax, 8(%rbx)
	movl	16(%rbx), %edi
	movq	%r14, %rsi
	callq	_strcpy
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_add_sched_event_sleep
	movq	16(%r12), %rax
	movq	%rbx, (%rax,%r15,8)
	movq	(%r12), %rsi
	movq	8(%r12), %rdi
	incq	%rsi
	movq	%rsi, (%r12)
	shll	$3, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_realloc
	movq	%rax, 8(%r12)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_BUG_ON
	movq	8(%r12), %rax
	movq	8(%rbx), %rcx
	movq	%rbx, (%rax,%rcx,8)
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_printf
LBB0_3:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PID,8,3                    ## @MAX_PID
	.comm	_verbose,8,3                    ## @verbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"registered task #%ld, PID %ld (%s)\n"

	.no_dead_strip	_register_pid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function register_pid
_register_pid:                          ; @register_pid
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MAX_PID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_PID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	cset	w0, ls
	bl	_BUG_ON
	ldr	x8, [x21, #16]
	ldr	x22, [x8, x20, lsl #3]
	cbnz	x22, LBB0_3
; %bb.1:
	mov	w0, #24
	bl	_zalloc
	mov	x22, x0
	ldr	x8, [x21]
	stp	x20, x8, [x0]
	ldr	w0, [x0, #16]
	mov	x1, x19
	bl	_strcpy
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	mov	w3, #0
	bl	_add_sched_event_sleep
	ldr	x8, [x21, #16]
	str	x22, [x8, x20, lsl #3]
	ldp	x8, x0, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	lsl	w1, w8, #3
	bl	_realloc
	str	x0, [x21, #8]
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x21, #8]
	ldr	x9, [x22, #8]
	str	x22, [x8, x9, lsl #3]
Lloh3:
	adrp	x8, _verbose@GOTPAGE
Lloh4:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	w1, [x21]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_printf
LBB0_3:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PID,8,3                    ; @MAX_PID
	.comm	_verbose,8,3                    ; @verbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"registered task #%ld, PID %ld (%s)\n"

	.no_dead_strip	_register_pid
.subsections_via_symbols
