	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmalomx_command_state_set      ## -- Begin function mmalomx_command_state_set
	.p2align	4, 0x90
_mmalomx_command_state_set:             ## @mmalomx_command_state_set
	.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, %r13
	cmpq	%rsi, (%rdi)
	jne	LBB0_4
## %bb.1:
	movq	_OMX_EventError@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OMX_ErrorSameState@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	%rsi, %r14
	movq	_OMX_StateInvalid@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	%r14, (%r13)
	movq	_OMX_EventError@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OMX_ErrorInvalidState@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	xorl	%edi, %edi
	cmpl	$0, 8(%r13)
	sete	%dil
	callq	_vcos_assert
	movq	(%r13), %rdi
	movq	%r14, %rsi
	callq	_mmalomx_state_transition_get
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %r15d
	movq	_OMX_StateExecuting@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	%r14, %rax
	jne	LBB0_9
## %bb.24:
	movl	36(%r13), %edi
	callq	_mmal_component_enable
	jmp	LBB0_11
LBB0_7:
	movq	_OMX_EventError@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OMX_ErrorIncorrectStateTransition@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edx
	movq	%r13, %rdi
LBB0_3:
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mmalomx_callback_event_handler
LBB0_23:
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpq	%rax, (%r13)
	jne	LBB0_13
## %bb.10:
	movl	36(%r13), %edi
	callq	_mmal_component_disable
LBB0_11:
	movq	%rax, %r12
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_12
LBB0_13:
	movq	%r13, %rdi
	callq	_MMALOMX_LOCK
	movl	%r15d, 8(%r13)
	movl	12(%r13), %eax
	testl	%eax, %eax
	je	LBB0_22
## %bb.14:
	movl	%r15d, %ecx
	xorl	%ebx, %ebx
	leaq	(%rcx,%rcx,2), %r15
	movq	_OMX_StateIdle@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=1
	addq	%rbx, %rsi
	movq	%r13, %rdi
	callq	_MMALOMX_UNLOCK_PORT
	movl	12(%r13), %eax
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%r14
	movl	%eax, %ecx
	addq	$8, %rbx
	cmpq	%rcx, %r14
	jae	LBB0_22
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rsi
	cmpl	$0, 4(%rsi,%rbx)
	je	LBB0_21
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	addq	%rbx, %rsi
	movq	%r13, %rdi
	callq	_MMALOMX_LOCK_PORT
	movq	_state_transition_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%rcx,%r15,8), %eax
	movq	16(%r13), %rsi
	movl	%eax, (%rsi,%rbx)
	movq	8(%rcx,%r15,8), %rdx
	cmpq	(%r12), %rdx
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	16(%rcx,%r15,8), %rcx
	movq	_OMX_StateLoaded@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpq	$0, 24(%r13)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	_MMALOMX_ACTION_FLUSH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MMALOMX_ACTION_CHECK_FLUSHED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rsi,%rbx)
	jmp	LBB0_20
LBB0_22:
	movq	%r13, %rdi
	callq	_MMALOMX_UNLOCK
	movq	%r13, %rdi
	callq	_mmalomx_commands_actions_check
	jmp	LBB0_23
LBB0_12:
	cmpq	%r14, (%rbx)
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	32(%r13), %edx
	leaq	L_.str(%rip), %rdi
	callq	_LOG_ERROR
	movq	_OMX_EventError@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	callq	_mmalil_error_to_omx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_OMX_EventError,4,2             ## @OMX_EventError
	.comm	_OMX_ErrorSameState,4,2         ## @OMX_ErrorSameState
	.comm	_OMX_ErrorNone,4,2              ## @OMX_ErrorNone
	.comm	_OMX_StateInvalid,8,3           ## @OMX_StateInvalid
	.comm	_OMX_ErrorInvalidState,4,2      ## @OMX_ErrorInvalidState
	.comm	_OMX_ErrorIncorrectStateTransition,4,2 ## @OMX_ErrorIncorrectStateTransition
	.comm	_OMX_StateExecuting,8,3         ## @OMX_StateExecuting
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not %s %s"

L_.str.1:                               ## @.str.1
	.asciz	"enable"

L_.str.2:                               ## @.str.2
	.asciz	"disable"

	.comm	_state_transition_table,8,3     ## @state_transition_table
	.comm	_OMX_StateIdle,8,3              ## @OMX_StateIdle
	.comm	_OMX_StateLoaded,8,3            ## @OMX_StateLoaded
	.comm	_MMALOMX_ACTION_FLUSH,4,2       ## @MMALOMX_ACTION_FLUSH
	.comm	_MMALOMX_ACTION_CHECK_FLUSHED,4,2 ## @MMALOMX_ACTION_CHECK_FLUSHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmalomx_command_state_set      ; -- Begin function mmalomx_command_state_set
	.p2align	2
_mmalomx_command_state_set:             ; @mmalomx_command_state_set
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, x1
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _OMX_EventError@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OMX_EventError@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _OMX_ErrorSameState@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OMX_ErrorSameState@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	x20, x1
Lloh5:
	adrp	x8, _OMX_StateInvalid@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OMX_StateInvalid@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_4
; %bb.3:
	str	x20, [x19]
Lloh8:
	adrp	x8, _OMX_EventError@GOTPAGE
Lloh9:
	ldr	x8, [x8, _OMX_EventError@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _OMX_ErrorInvalidState@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OMX_ErrorInvalidState@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	w8, [x19, #8]
	cmp	w8, #0
	cset	w0, eq
	bl	_vcos_assert
	ldr	x0, [x19]
	mov	x1, x20
	bl	_mmalomx_state_transition_get
	cbz	w0, LBB0_7
; %bb.5:
	mov	x21, x0
Lloh13:
	adrp	x23, _OMX_StateExecuting@GOTPAGE
Lloh14:
	ldr	x23, [x23, _OMX_StateExecuting@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x20
	b.ne	LBB0_11
; %bb.6:
	ldr	w0, [x19, #36]
	bl	_mmal_component_enable
	b	LBB0_13
LBB0_7:
Lloh15:
	adrp	x8, _OMX_EventError@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OMX_EventError@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _OMX_ErrorIncorrectStateTransition@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OMX_ErrorIncorrectStateTransition@GOTPAGEOFF]
LBB0_8:
	ldr	w2, [x8]
	mov	x0, x19
LBB0_9:
	mov	w3, #0
	mov	x4, #0
	bl	_mmalomx_callback_event_handler
LBB0_10:
Lloh20:
	adrp	x8, _OMX_ErrorNone@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OMX_ErrorNone@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x9, [x19]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.12:
	ldr	w0, [x19, #36]
	bl	_mmal_component_disable
LBB0_13:
	mov	x22, x0
Lloh23:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_24
LBB0_14:
	mov	x0, x19
	bl	_MMALOMX_LOCK
	str	w21, [x19, #8]
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_23
; %bb.15:
	mov	x20, #0
	mov	x22, #0
Lloh26:
	adrp	x23, _state_transition_table@GOTPAGE
Lloh27:
	ldr	x23, [x23, _state_transition_table@GOTPAGEOFF]
Lloh28:
	adrp	x24, _OMX_StateIdle@GOTPAGE
Lloh29:
	ldr	x24, [x24, _OMX_StateIdle@GOTPAGEOFF]
Lloh30:
	adrp	x25, _OMX_StateLoaded@GOTPAGE
Lloh31:
	ldr	x25, [x25, _OMX_StateLoaded@GOTPAGEOFF]
	mov	w26, #24
Lloh32:
	adrp	x27, _MMALOMX_ACTION_FLUSH@GOTPAGE
Lloh33:
	ldr	x27, [x27, _MMALOMX_ACTION_FLUSH@GOTPAGEOFF]
Lloh34:
	adrp	x28, _MMALOMX_ACTION_CHECK_FLUSHED@GOTPAGE
Lloh35:
	ldr	x28, [x28, _MMALOMX_ACTION_CHECK_FLUSHED@GOTPAGEOFF]
	mov	w21, w21
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x1, x8, x20
	mov	x0, x19
	bl	_MMALOMX_UNLOCK_PORT
	ldr	w8, [x19, #12]
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x22, x22, #1
	add	x20, x20, #8
	cmp	x22, w8, uxtw
	b.hs	LBB0_23
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	add	x1, x9, x20
	ldr	w9, [x1, #4]
	cbz	w9, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x19
	bl	_MMALOMX_LOCK_PORT
	ldr	x10, [x23]
	madd	x11, x21, x26, x10
	ldr	w9, [x11]
	ldr	x8, [x19, #16]
	str	w9, [x8, x20]
	ldr	x11, [x11, #8]
	ldr	x12, [x24]
	cmp	x11, x12
	b.ne	LBB0_16
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	madd	x10, x21, x26, x10
	ldr	x10, [x10, #16]
	ldr	x11, [x25]
	cmp	x10, x11
	b.ne	LBB0_16
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x10, [x19, #24]
	cbz	x10, LBB0_16
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w10, [x27]
	ldr	w11, [x28]
	orr	w9, w10, w9
	orr	w9, w9, w11
	str	w9, [x8, x20]
	b	LBB0_16
LBB0_23:
	mov	x0, x19
	bl	_MMALOMX_UNLOCK
	mov	x0, x19
	bl	_mmalomx_commands_actions_check
	b	LBB0_10
LBB0_24:
Lloh36:
	adrp	x8, l_.str.2@PAGE
Lloh37:
	add	x8, x8, l_.str.2@PAGEOFF
	ldr	x9, [x23]
Lloh38:
	adrp	x10, l_.str.1@PAGE
Lloh39:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	x9, x20
	csel	x1, x10, x8, eq
	ldr	w2, [x19, #32]
Lloh40:
	adrp	x0, l_.str@PAGE
Lloh41:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOG_ERROR
Lloh42:
	adrp	x8, _OMX_EventError@GOTPAGE
Lloh43:
	ldr	x8, [x8, _OMX_EventError@GOTPAGEOFF]
Lloh44:
	ldr	w20, [x8]
	mov	x0, x22
	bl	_mmalil_error_to_omx
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	b	LBB0_9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_OMX_EventError,4,2             ; @OMX_EventError
	.comm	_OMX_ErrorSameState,4,2         ; @OMX_ErrorSameState
	.comm	_OMX_ErrorNone,4,2              ; @OMX_ErrorNone
	.comm	_OMX_StateInvalid,8,3           ; @OMX_StateInvalid
	.comm	_OMX_ErrorInvalidState,4,2      ; @OMX_ErrorInvalidState
	.comm	_OMX_ErrorIncorrectStateTransition,4,2 ; @OMX_ErrorIncorrectStateTransition
	.comm	_OMX_StateExecuting,8,3         ; @OMX_StateExecuting
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not %s %s"

l_.str.1:                               ; @.str.1
	.asciz	"enable"

l_.str.2:                               ; @.str.2
	.asciz	"disable"

	.comm	_state_transition_table,8,3     ; @state_transition_table
	.comm	_OMX_StateIdle,8,3              ; @OMX_StateIdle
	.comm	_OMX_StateLoaded,8,3            ; @OMX_StateLoaded
	.comm	_MMALOMX_ACTION_FLUSH,4,2       ; @MMALOMX_ACTION_FLUSH
	.comm	_MMALOMX_ACTION_CHECK_FLUSHED,4,2 ; @MMALOMX_ACTION_CHECK_FLUSHED
.subsections_via_symbols
