	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_geode_mfgpt_alloc_timer        ## -- Begin function geode_mfgpt_alloc_timer
	.p2align	4, 0x90
_geode_mfgpt_alloc_timer:               ## @geode_mfgpt_alloc_timer
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_timers@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
	callq	_geode_mfgpt_detect
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_11
LBB0_3:
	movq	_MFGPT_MAX_TIMERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%ebx, %eax
	jle	LBB0_11
## %bb.4:
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.10:
	movq	_mfgpt_timers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_11
LBB0_12:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mfgpt_get                      ## TAILCALL
LBB0_5:
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:
	movq	_mfgpt_timers@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	_MFGPT_DOMAIN_WORKING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rsi,%rbx,8)
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%r14d, %edi
	setne	%cl
	cmpq	$5, %rbx
	setne	%dl
	orb	%cl, %dl
	cmpb	$1, %dl
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	cmpq	%rax, %rbx
	jb	LBB0_7
LBB0_11:
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_timers,4,2                     ## @timers
	.comm	_MFGPT_MAX_TIMERS,4,2           ## @MFGPT_MAX_TIMERS
	.comm	_mfgpt_timers,8,3               ## @mfgpt_timers
	.comm	_MFGPT_DOMAIN_WORKING,4,2       ## @MFGPT_DOMAIN_WORKING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_geode_mfgpt_alloc_timer        ; -- Begin function geode_mfgpt_alloc_timer
	.p2align	2
_geode_mfgpt_alloc_timer:               ; @geode_mfgpt_alloc_timer
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _timers@GOTPAGE
Lloh1:
	ldr	x21, [x21, _timers@GOTPAGEOFF]
	ldr	w9, [x21]
	cmn	w9, #1
	b.ne	LBB0_2
; %bb.1:
	bl	_geode_mfgpt_detect
	ldr	w9, [x21]
LBB0_2:
Lloh2:
	adrp	x8, _MFGPT_MAX_TIMERS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MFGPT_MAX_TIMERS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w9, #0
	ccmp	w8, w19, #4, ne
	b.gt	LBB0_4
LBB0_3:
	mov	w0, #-1
	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
LBB0_4:
	tbnz	w19, #31, LBB0_7
; %bb.5:
Lloh5:
	adrp	x8, _mfgpt_timers@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mfgpt_timers@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x8, [x8, w19, uxtw #3]
	cbz	x8, LBB0_3
LBB0_6:
	mov	x0, x19
	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
	b	_mfgpt_get
LBB0_7:
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.8:
	mov	x19, #0
Lloh8:
	adrp	x9, _mfgpt_timers@GOTPAGE
Lloh9:
	ldr	x9, [x9, _mfgpt_timers@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _MFGPT_DOMAIN_WORKING@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MFGPT_DOMAIN_WORKING@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x19, lsl #3]
	cbnz	x11, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w10, w20
	ccmp	x19, #5, #0, eq
	b.eq	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x19, x19, #1
	cmp	x19, x8
	b.lo	LBB0_9
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_timers,4,2                     ; @timers
	.comm	_MFGPT_MAX_TIMERS,4,2           ; @MFGPT_MAX_TIMERS
	.comm	_mfgpt_timers,8,3               ; @mfgpt_timers
	.comm	_MFGPT_DOMAIN_WORKING,4,2       ; @MFGPT_DOMAIN_WORKING
.subsections_via_symbols
