	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function host1x_syncpt_alloc
_host1x_syncpt_alloc:                   ## @host1x_syncpt_alloc
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	16(%rdi), %rbx
	callq	_mutex_lock
	movq	8(%r14), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_11
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	addq	$40, %rbx
	decl	%eax
	jne	LBB0_1
	jmp	LBB0_11
LBB0_3:
	movq	_HOST1X_SYNCPT_HAS_BASE@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_host1x_syncpt_base_request
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_11
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%rbx), %r13d
	testq	%r12, %r12
	je	LBB0_6
## %bb.7:
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	(%r12), %edi
	callq	_dev_name
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rax, %rcx
	jmp	LBB0_8
LBB0_6:
	xorl	%ecx, %ecx
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_kasprintf
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r12, 24(%rbx)
	movq	%rax, (%rbx)
	movq	_HOST1X_SYNCPT_CLIENT_MANAGED@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	andq	(%rax), %r15
	setne	%cl
	movl	%ecx, 8(%rbx)
	jmp	LBB0_12
LBB0_10:
	movq	16(%rbx), %rdi
	callq	_host1x_syncpt_base_free
	movq	$0, 16(%rbx)
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST1X_SYNCPT_HAS_BASE,8,3     ## @HOST1X_SYNCPT_HAS_BASE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%02u-%s"

	.comm	_HOST1X_SYNCPT_CLIENT_MANAGED,8,3 ## @HOST1X_SYNCPT_CLIENT_MANAGED
	.no_dead_strip	_host1x_syncpt_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function host1x_syncpt_alloc
_host1x_syncpt_alloc:                   ; @host1x_syncpt_alloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #16]
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_11
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	cbz	x9, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x20, x20, #40
	subs	w8, w8, #1
	b.ne	LBB0_1
	b	LBB0_11
LBB0_3:
Lloh0:
	adrp	x8, _HOST1X_SYNCPT_HAS_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HOST1X_SYNCPT_HAS_BASE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tst	x8, x21
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_host1x_syncpt_base_request
	str	x0, [x20, #16]
	cbz	x0, LBB0_11
LBB0_5:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	w24, [x20, #32]
	cbz	x22, LBB0_7
; %bb.6:
	ldr	w0, [x22]
	bl	_dev_name
	mov	x3, x0
	b	LBB0_8
LBB0_7:
	mov	x3, #0
LBB0_8:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x24
	bl	_kasprintf
	cbz	x0, LBB0_10
; %bb.9:
	str	x22, [x20, #24]
	str	x0, [x20]
Lloh8:
	adrp	x8, _HOST1X_SYNCPT_CLIENT_MANAGED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HOST1X_SYNCPT_CLIENT_MANAGED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	tst	x8, x21
	cset	w8, ne
	str	w8, [x20, #8]
	b	LBB0_12
LBB0_10:
	ldr	x0, [x20, #16]
	bl	_host1x_syncpt_base_free
	str	xzr, [x20, #16]
LBB0_11:
	mov	x20, #0
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST1X_SYNCPT_HAS_BASE,8,3     ; @HOST1X_SYNCPT_HAS_BASE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%02u-%s"

	.comm	_HOST1X_SYNCPT_CLIENT_MANAGED,8,3 ; @HOST1X_SYNCPT_CLIENT_MANAGED
	.no_dead_strip	_host1x_syncpt_alloc
.subsections_via_symbols
