	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_list_insert               ## -- Begin function mmal_list_insert
	.p2align	4, 0x90
_mmal_list_insert:                      ## @mmal_list_insert
	.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, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_mmal_list_lock
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	*%r12
	testq	%rax, %rax
	jne	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_1
## %bb.7:
	movq	%r14, %rdi
	callq	_mmal_list_unlock
	movq	%r14, %rdi
	movq	%r15, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmal_list_push_back            ## TAILCALL
LBB0_8:
	movq	%r14, %rdi
	callq	_mmal_list_unlock
	movq	%r14, %rdi
	movq	%r15, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmal_list_push_front           ## TAILCALL
LBB0_2:
	incl	8(%r14)
	cmpq	(%r14), %rbx
	je	LBB0_3
## %bb.4:
	movq	8(%rbx), %rax
	movq	%r15, (%rax)
	jmp	LBB0_5
LBB0_3:
	movq	%r15, (%r14)
	movq	8(%rbx), %rax
LBB0_5:
	movq	%rax, 8(%r15)
	movq	%rbx, (%r15)
	movq	%r15, 8(%rbx)
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmal_list_unlock               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_list_insert               ; -- Begin function mmal_list_insert
	.p2align	2
_mmal_list_insert:                      ; @mmal_list_insert
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_mmal_list_lock
	ldr	x21, [x20]
	cbz	x21, LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	blr	x22
	cbnz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x21, [x21]
	cbnz	x21, LBB0_1
; %bb.3:
	mov	x0, x20
	bl	_mmal_list_unlock
	mov	x0, x20
	mov	x1, 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	_mmal_list_push_back
LBB0_4:
	mov	x0, x20
	bl	_mmal_list_unlock
	mov	x0, x20
	mov	x1, 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	_mmal_list_push_front
LBB0_5:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	ldr	x8, [x20]
	cmp	x21, x8
	b.eq	LBB0_7
; %bb.6:
	ldr	x8, [x21, #8]
	str	x19, [x8]
	b	LBB0_8
LBB0_7:
	str	x19, [x20]
	ldr	x8, [x21, #8]
LBB0_8:
	stp	x21, x8, [x19]
	str	x19, [x21, #8]
	mov	x0, x20
	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	_mmal_list_unlock
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
