	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_wrapper_port_enable       ## -- Begin function mmal_wrapper_port_enable
	.p2align	4, 0x90
_mmal_wrapper_port_enable:              ## @mmal_wrapper_port_enable
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	48(%rdi), %r15
	xorl	%eax, %eax
	callq	_vcos_getmicrosecs
	movq	%rax, %r14
	movl	32(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_LOG_TRACE
	movq	(%rbx), %rax
	movq	_MMAL_PORT_TYPE_INPUT@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	cmpq	%rcx, %rax
	je	LBB0_3
## %bb.1:
	movq	_MMAL_PORT_TYPE_OUTPUT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_3
## %bb.2:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	cmpq	$0, 40(%rbx)
	je	LBB0_7
## %bb.4:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %r12
LBB0_6:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	cmpq	%rcx, %rax
	sete	%dl
	movq	8(%r15,%rdx,8), %rax
	movq	8(%rbx), %rcx
	movq	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	je	LBB0_9
## %bb.8:
	movl	16(%rbx), %r14d
	jmp	LBB0_10
LBB0_9:
	xorl	%r14d, %r14d
LBB0_10:
	movq	(%rax,%rcx,8), %rdi
	movq	_MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_15
## %bb.11:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_MMAL_PARAMETER_ZERO_COPY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	leaq	-68(%rbp), %rsi
	movl	$1, -68(%rbp)
	movq	$0, -64(%rbp)
	movq	%rbx, %rdi
	callq	_mmal_port_parameter_set
	movq	%rax, %r12
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_14
## %bb.12:
	movq	_MMAL_ENOSYS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_14
## %bb.13:
	movl	32(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_6
LBB0_14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_15:
	movq	24(%rbx), %rsi
	movl	%r14d, %edx
	callq	_mmal_pool_resize
	movq	%rax, %r12
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_18
## %bb.16:
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_19
## %bb.17:
	movq	_mmal_wrapper_bh_in_cb@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_18:
	movl	24(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_6
LBB0_19:
	movq	_mmal_wrapper_bh_out_cb@GOTPCREL(%rip), %rax
LBB0_20:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mmal_port_enable
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_22
## %bb.21:
	xorl	%eax, %eax
	callq	_vcos_getmicrosecs
	subl	%r14d, %eax
	addl	%eax, (%r15)
	movq	(%rbx), %r12
	jmp	LBB0_6
LBB0_22:
	movq	%rax, %r12
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p, %s"

	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ## @MMAL_PORT_TYPE_INPUT
	.comm	_MMAL_PORT_TYPE_OUTPUT,8,3      ## @MMAL_PORT_TYPE_OUTPUT
	.comm	_MMAL_EINVAL,8,3                ## @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE,4,2 ## @MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE
	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY,4,2 ## @MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY
	.comm	_MMAL_PARAMETER_ZERO_COPY,4,2   ## @MMAL_PARAMETER_ZERO_COPY
	.comm	_MMAL_ENOSYS,8,3                ## @MMAL_ENOSYS
L_.str.1:                               ## @.str.1
	.asciz	"failed to set zero copy on %s"

L_.str.2:                               ## @.str.2
	.asciz	"could not resize pool (%i/%i)"

	.comm	_mmal_wrapper_bh_in_cb,4,2      ## @mmal_wrapper_bh_in_cb
	.comm	_mmal_wrapper_bh_out_cb,4,2     ## @mmal_wrapper_bh_out_cb
L_.str.3:                               ## @.str.3
	.asciz	"could not enable port"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_wrapper_port_enable       ; -- Begin function mmal_wrapper_port_enable
	.p2align	2
_mmal_wrapper_port_enable:              ; @mmal_wrapper_port_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x1
	mov	x21, x0
	ldr	x19, [x0, #48]
	bl	_vcos_getmicrosecs
	mov	x20, x0
	ldr	w2, [x21, #32]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_LOG_TRACE
	ldr	x8, [x21]
Lloh2:
	adrp	x25, _MMAL_PORT_TYPE_INPUT@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MMAL_PORT_TYPE_INPUT@GOTPAGEOFF]
	ldr	x9, [x25]
Lloh4:
	adrp	x10, _MMAL_PORT_TYPE_OUTPUT@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MMAL_PORT_TYPE_OUTPUT@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_3
; %bb.1:
	ldr	x10, [x21, #40]
	cbz	x10, LBB0_6
; %bb.2:
Lloh7:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	x22, [x8]
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	mov	w10, #8
	mov	w11, #16
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	x8, [x19, x8]
	ldr	x9, [x21, #8]
Lloh11:
	adrp	x10, _MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w10, w22
	b.eq	LBB0_8
; %bb.7:
	ldr	w23, [x21, #16]
	b	LBB0_9
LBB0_8:
	mov	w23, #0
LBB0_9:
	ldr	x24, [x8, x9, lsl #3]
Lloh14:
	adrp	x8, _MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_13
; %bb.10:
Lloh17:
	adrp	x8, _MMAL_PARAMETER_ZERO_COPY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMAL_PARAMETER_ZERO_COPY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	add	x9, sp, #16
	orr	x1, x9, #0x4
	mov	w9, #1
	stp	w8, w9, [sp, #16]
	str	xzr, [sp, #24]
	mov	x0, x21
	bl	_mmal_port_parameter_set
Lloh20:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.11:
	mov	x22, x0
Lloh23:
	adrp	x8, _MMAL_ENOSYS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MMAL_ENOSYS@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.12:
	ldr	w8, [x21, #32]
	str	x8, [sp]
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
	b	LBB0_5
LBB0_13:
	ldr	x1, [x21, #24]
	mov	x0, x24
	mov	x2, x23
	bl	_mmal_pool_resize
Lloh28:
	adrp	x24, _MMAL_SUCCESS@GOTPAGE
Lloh29:
	ldr	x24, [x24, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.14:
	ldr	x8, [x21]
Lloh30:
	adrp	x9, _mmal_wrapper_bh_in_cb@GOTPAGE
Lloh31:
	ldr	x9, [x9, _mmal_wrapper_bh_in_cb@GOTPAGEOFF]
	ldr	x10, [x25]
Lloh32:
	adrp	x11, _mmal_wrapper_bh_out_cb@GOTPAGE
Lloh33:
	ldr	x11, [x11, _mmal_wrapper_bh_out_cb@GOTPAGEOFF]
	cmp	x8, x10
	csel	x8, x9, x11, eq
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mmal_port_enable
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.15:
	bl	_vcos_getmicrosecs
	ldr	w8, [x19]
	sub	w9, w0, w20
	add	w8, w8, w9
	str	w8, [x19]
	ldr	x22, [x24]
	b	LBB0_5
LBB0_16:
	mov	x22, x0
	ldr	x8, [x21, #24]
	stp	x8, x23, [sp]
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_LOG_ERROR
	b	LBB0_5
LBB0_17:
	mov	x22, x0
Lloh36:
	adrp	x0, l_.str.3@PAGE
Lloh37:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_LOG_ERROR
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p, %s"

	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ; @MMAL_PORT_TYPE_INPUT
	.comm	_MMAL_PORT_TYPE_OUTPUT,8,3      ; @MMAL_PORT_TYPE_OUTPUT
	.comm	_MMAL_EINVAL,8,3                ; @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE,4,2 ; @MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE
	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY,4,2 ; @MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY
	.comm	_MMAL_PARAMETER_ZERO_COPY,4,2   ; @MMAL_PARAMETER_ZERO_COPY
	.comm	_MMAL_ENOSYS,8,3                ; @MMAL_ENOSYS
l_.str.1:                               ; @.str.1
	.asciz	"failed to set zero copy on %s"

l_.str.2:                               ; @.str.2
	.asciz	"could not resize pool (%i/%i)"

	.comm	_mmal_wrapper_bh_in_cb,4,2      ; @mmal_wrapper_bh_in_cb
	.comm	_mmal_wrapper_bh_out_cb,4,2     ; @mmal_wrapper_bh_out_cb
l_.str.3:                               ; @.str.3
	.asciz	"could not enable port"

.subsections_via_symbols
