	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_ports_clock_alloc         ## -- Begin function mmal_ports_clock_alloc
	.p2align	4, 0x90
_mmal_ports_clock_alloc:                ## @mmal_ports_clock_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
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	_MMAL_PORT_TYPE_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leal	4(%r13), %ecx
	callq	_mmal_ports_alloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r15
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.2:
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rbx,8), %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_mmal_port_clock_setup
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_3
	jmp	LBB0_11
LBB0_5:
	cmpl	%ebx, %r12d
	je	LBB0_11
## %bb.6:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.7:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%r14,8), %rdi
	callq	_mmal_port_clock_free
	incq	%r14
	cmpq	%r14, %rbx
	jne	LBB0_8
LBB0_9:
	movq	%r15, %rdi
	callq	_vcos_free
LBB0_10:
	xorl	%r15d, %r15d
LBB0_11:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_PORT_TYPE_CLOCK,4,2       ## @MMAL_PORT_TYPE_CLOCK
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_ports_clock_alloc         ; -- Begin function mmal_ports_clock_alloc
	.p2align	2
_mmal_ports_clock_alloc:                ; @mmal_ports_clock_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	x20, x3
	mov	x21, x2
	mov	x22, x1
Lloh0:
	adrp	x8, _MMAL_PORT_TYPE_CLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_PORT_TYPE_CLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	w3, w21, #4
	bl	_mmal_ports_alloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.1:
	cbz	w22, LBB0_10
; %bb.2:
	mov	x23, #0
	mov	w22, w22
Lloh3:
	adrp	x24, _MMAL_SUCCESS@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MMAL_SUCCESS@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, x23, lsl #3]
	mov	x1, x21
	mov	x2, x20
	bl	_mmal_port_clock_setup
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x22, x23
	b.ne	LBB0_3
	b	LBB0_10
LBB0_5:
	cmp	w22, w23
	b.eq	LBB0_10
; %bb.6:
	cbz	w23, LBB0_9
; %bb.7:
	mov	x20, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, x20, lsl #3]
	bl	_mmal_port_clock_free
	add	x20, x20, #1
	cmp	x23, x20
	b.ne	LBB0_8
LBB0_9:
	mov	x0, x19
	bl	_vcos_free
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	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 AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_PORT_TYPE_CLOCK,4,2       ; @MMAL_PORT_TYPE_CLOCK
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
.subsections_via_symbols
