	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_waitpool
_create_waitpool:                       ## @create_waitpool
	.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	%rdi, %r14
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_MAX_WAITERS@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_vcos_semaphore_create
	movq	%rax, %r13
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_14
## %bb.1:
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.2:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdi
	movq	$0, 8(%rdi,%r15)
	addq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_vcos_semaphore_create
	movq	%rax, %r13
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r13
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r12), %rcx
	addq	$16, %r15
	cmpq	%rcx, %rbx
	jl	LBB0_3
LBB0_5:
	cmpq	%rax, %r13
	je	LBB0_10
## %bb.6:
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.7:
	leaq	1(%rbx), %r15
	shlq	$4, %rbx
	addq	$-16, %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdi
	addq	%rbx, %rdi
	callq	_vcos_semaphore_delete
	decq	%r15
	addq	$-16, %rbx
	cmpq	$1, %r15
	ja	LBB0_8
LBB0_9:
	movq	%r14, %rdi
	callq	_vcos_semaphore_delete
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_10:
	cmpq	%rax, %r13
	jne	LBB0_14
LBB0_11:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	%r13, %rax
	cmpq	%rax, %r13
	je	LBB0_11
LBB0_14:
	movq	_MMAL_ENOSPC@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCOS_FUNCTION,8,3              ## @VCOS_FUNCTION
	.comm	_MAX_WAITERS,4,2                ## @MAX_WAITERS
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.comm	_MMAL_ENOSPC,4,2                ## @MMAL_ENOSPC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmal waiter"

	.no_dead_strip	_create_waitpool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_waitpool
_create_waitpool:                       ; @create_waitpool
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
Lloh3:
	adrp	x23, _MAX_WAITERS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MAX_WAITERS@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_vcos_semaphore_create
Lloh5:
	adrp	x22, _VCOS_SUCCESS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _VCOS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.1:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.2:
	mov	x24, #0
	mov	w25, #8
Lloh7:
	adrp	x21, l_.str@PAGE
Lloh8:
	add	x21, x21, l_.str@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x25
	str	xzr, [x0], #-8
	mov	x1, x21
	mov	w2, #0
	bl	_vcos_semaphore_create
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldrsw	x9, [x23]
	add	x25, x25, #16
	cmp	x24, x9
	b.lt	LBB0_3
LBB0_5:
	cmp	x20, x8
	b.eq	LBB0_12
; %bb.6:
	cmp	w24, #1
	b.lt	LBB0_9
; %bb.7:
	add	x21, x24, #1
	lsl	x8, x24, #4
	sub	x23, x8, #16
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x23
	bl	_vcos_semaphore_delete
	sub	x21, x21, #1
	sub	x23, x23, #16
	cmp	x21, #1
	b.hi	LBB0_8
LBB0_9:
	mov	x0, x19
	bl	_vcos_semaphore_delete
	ldr	x8, [x22]
	b	LBB0_12
LBB0_10:
Lloh9:
	adrp	x8, _MMAL_ENOSPC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_ENOSPC@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	mov	x20, x0
	mov	x8, x0
LBB0_12:
Lloh11:
	adrp	x9, _MMAL_SUCCESS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh13:
	adrp	x10, _MMAL_ENOSPC@GOTPAGE
Lloh14:
	ldr	x10, [x10, _MMAL_ENOSPC@GOTPAGEOFF]
	cmp	x20, x8
	csel	x8, x9, x10, eq
LBB0_13:
	ldr	w0, [x8]
	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	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VCOS_FUNCTION,8,3              ; @VCOS_FUNCTION
	.comm	_MAX_WAITERS,4,2                ; @MAX_WAITERS
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.comm	_MMAL_ENOSPC,4,2                ; @MMAL_ENOSPC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmal waiter"

	.no_dead_strip	_create_waitpool
.subsections_via_symbols
