	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_wrapper_create            ## -- Begin function mmal_wrapper_create
	.p2align	4, 0x90
_mmal_wrapper_create:                   ## @mmal_wrapper_create
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_LOG_TRACE
	testq	%r12, %r12
	je	LBB0_17
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_17
## %bb.2:
	xorl	%eax, %eax
	callq	_vcos_getmicrosecs
	movq	%rax, %r13
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_mmal_component_create
	movq	%rax, %r14
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_24
## %bb.3:
	movq	-48(%rbp), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %eax
	shll	$4, %eax
	leal	(%rax,%rcx,8), %esi
	addl	$80, %esi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %edi
	callq	_vcos_calloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.4:
	movq	%rax, %r15
	leaq	72(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	callq	_vcos_semaphore_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.5:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdx
	movq	%rdx, 64(%r15)
	movq	24(%rdx), %rax
	movq	%rax, 16(%r15)
	movslq	(%rdx), %rsi
	leaq	80(%r15), %rdi
	movl	%esi, (%r15)
	movq	16(%rdx), %rax
	movq	%rax, 48(%r15)
	movslq	4(%rdx), %rcx
	movl	%ecx, 4(%r15)
	movq	8(%rdx), %rdx
	movq	%rdx, 24(%r15)
	movq	%rdi, 56(%r15)
	leaq	80(%r15,%rsi,8), %rdx
	movq	%rdx, 32(%r15)
	leaq	(%rdx,%rcx,8), %rdx
	movq	%rdx, 40(%r15)
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.6:
	xorl	%ebx, %ebx
	movq	_mmal_wrapper_bh_release_cb@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx,8), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mmal_port_pool_create
	movq	56(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	56(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdx
	callq	_mmal_pool_callback_set
	movq	48(%r15), %rax
	movq	(%rax,%rbx,8), %rcx
	movq	%r15, (%rcx)
	incq	%rbx
	movl	(%r15), %ecx
	cmpq	%rcx, %rbx
	jb	LBB0_7
## %bb.9:
	movl	4(%r15), %ecx
LBB0_10:
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.11:
	movq	24(%r15), %rax
	movq	_mmal_wrapper_bh_release_cb@GOTPCREL(%rip), %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%r13,8), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mmal_port_pool_create
	movq	32(%r15), %rcx
	movq	%rax, (%rcx,%r13,8)
	xorl	%eax, %eax
	callq	_mmal_queue_create
	movq	40(%r15), %rcx
	movq	%rax, (%rcx,%r13,8)
	movq	32(%r15), %rax
	movq	(%rax,%r13,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	40(%r15), %rax
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%rbx), %esi
	movq	%r15, %rdx
	callq	_mmal_pool_callback_set
	movq	24(%r15), %rax
	movq	(%rax,%r13,8), %rcx
	movq	%r15, (%rcx)
	incq	%r13
	movl	4(%r15), %ecx
	cmpq	%rcx, %r13
	jb	LBB0_12
LBB0_15:
	movq	16(%r15), %rdi
	movq	%r15, (%rdi)
	movq	_mmal_wrapper_control_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mmal_port_enable
	movq	%rax, %r14
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_21
## %bb.16:
	xorl	%eax, %eax
	callq	_vcos_getmicrosecs
	subq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	%rax, 8(%r15)
	movq	%r15, (%r12)
	movq	(%rbx), %r14
	jmp	LBB0_24
LBB0_17:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_18:
	movq	-48(%rbp), %rdi
	callq	_mmal_component_destroy
	jmp	LBB0_22
LBB0_19:
	movq	-48(%rbp), %rdi
	callq	_mmal_component_destroy
	movq	%r15, %rdi
	callq	_vcos_free
	jmp	LBB0_22
LBB0_20:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rbx
LBB0_21:
	movq	%r15, %rdi
	callq	_mmal_wrapper_destroy
	cmpq	(%rbx), %r14
	jne	LBB0_24
LBB0_22:
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %rax
LBB0_23:
	movq	(%rax), %r14
LBB0_24:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrapper %p, name %s"

	.comm	_MMAL_EINVAL,8,3                ## @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"mmal wrapper"

	.comm	_MMAL_ENOMEM,8,3                ## @MMAL_ENOMEM
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.comm	_mmal_wrapper_bh_release_cb,4,2 ## @mmal_wrapper_bh_release_cb
	.comm	_mmal_wrapper_control_cb,4,2    ## @mmal_wrapper_control_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_wrapper_create            ; -- Begin function mmal_wrapper_create
	.p2align	2
_mmal_wrapper_create:                   ; @mmal_wrapper_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_LOG_TRACE
	cbz	x20, LBB0_17
; %bb.1:
	cbz	x19, LBB0_17
; %bb.2:
	bl	_vcos_getmicrosecs
	mov	x21, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_mmal_component_create
	mov	x19, x0
Lloh2:
	adrp	x23, _MMAL_SUCCESS@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_22
; %bb.3:
	ldr	x8, [sp, #8]
	ldp	w9, w8, [x8]
	lsl	w9, w9, #3
	add	w8, w9, w8, lsl #4
	add	w1, w8, #80
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_vcos_calloc
	cbz	x0, LBB0_18
; %bb.4:
	mov	x22, x0
	add	x0, x0, #72
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #0
	bl	_vcos_semaphore_create
Lloh8:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.5:
	ldr	x10, [sp, #8]
	str	x10, [x22, #64]
	ldr	x11, [x10, #24]
	ldpsw	x12, x9, [x10]
	stp	w12, w9, [x22]
	ldp	x10, x8, [x10, #8]
	stp	x11, x10, [x22, #16]
	add	x10, x22, #80
	stp	x8, x10, [x22, #48]
	add	x10, x10, x12, lsl #3
	add	x11, x10, x9, lsl #3
	stp	x10, x11, [x22, #32]
Lloh11:
	adrp	x24, _mmal_wrapper_bh_release_cb@GOTPAGE
Lloh12:
	ldr	x24, [x24, _mmal_wrapper_bh_release_cb@GOTPAGEOFF]
	cbz	w12, LBB0_10
; %bb.6:
	mov	x25, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x26, x25, #3
	ldr	x0, [x8, x26]
	mov	w1, #0
	mov	w2, #0
	bl	_mmal_port_pool_create
	ldr	x8, [x22, #56]
	str	x0, [x8, x26]
	ldr	x8, [x22, #56]
	ldr	x0, [x8, x26]
	cbz	x0, LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x24]
	mov	x2, x22
	bl	_mmal_pool_callback_set
	ldr	x8, [x22, #48]
	ldr	x9, [x8, x25, lsl #3]
	str	x22, [x9]
	add	x25, x25, #1
	ldr	w9, [x22]
	cmp	x25, x9
	b.lo	LBB0_7
; %bb.9:
	ldr	w9, [x22, #4]
LBB0_10:
	cbz	w9, LBB0_15
; %bb.11:
	mov	x25, #0
	ldr	x8, [x22, #24]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	lsl	x26, x25, #3
	ldr	x0, [x8, x26]
	mov	w1, #0
	mov	w2, #0
	bl	_mmal_port_pool_create
	ldr	x8, [x22, #32]
	str	x0, [x8, x26]
	bl	_mmal_queue_create
	ldr	x8, [x22, #40]
	str	x0, [x8, x26]
	ldr	x8, [x22, #32]
	ldr	x0, [x8, x26]
	cbz	x0, LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x22, #40]
	ldr	x8, [x8, x25, lsl #3]
	cbz	x8, LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x24]
	mov	x2, x22
	bl	_mmal_pool_callback_set
	ldr	x8, [x22, #24]
	ldr	x9, [x8, x25, lsl #3]
	str	x22, [x9]
	add	x25, x25, #1
	ldr	w9, [x22, #4]
	cmp	x25, x9
	b.lo	LBB0_12
LBB0_15:
	ldr	x0, [x22, #16]
	str	x22, [x0]
Lloh13:
	adrp	x8, _mmal_wrapper_control_cb@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mmal_wrapper_control_cb@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_mmal_port_enable
	mov	x19, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_21
; %bb.16:
	bl	_vcos_getmicrosecs
	sub	x8, x0, x21
	str	x8, [x22, #8]
	str	x22, [x20]
	ldr	x19, [x23]
	b	LBB0_22
LBB0_17:
Lloh16:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	x19, [x8]
	b	LBB0_22
LBB0_18:
	ldr	x0, [sp, #8]
	bl	_mmal_component_destroy
	b	LBB0_20
LBB0_19:
	ldr	x0, [sp, #8]
	bl	_mmal_component_destroy
	mov	x0, x22
	bl	_vcos_free
LBB0_20:
Lloh19:
	adrp	x8, _MMAL_ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MMAL_ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	x19, [x8]
	b	LBB0_22
LBB0_21:
	mov	x0, x22
	bl	_mmal_wrapper_destroy
	ldr	x8, [x23]
Lloh22:
	adrp	x9, _MMAL_ENOMEM@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MMAL_ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x19, x8
	csel	x19, x9, x19, eq
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrapper %p, name %s"

	.comm	_MMAL_EINVAL,8,3                ; @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"mmal wrapper"

	.comm	_MMAL_ENOMEM,8,3                ; @MMAL_ENOMEM
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.comm	_mmal_wrapper_bh_release_cb,4,2 ; @mmal_wrapper_bh_release_cb
	.comm	_mmal_wrapper_control_cb,4,2    ; @mmal_wrapper_control_cb
.subsections_via_symbols
