	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smiapp_set_format
_smiapp_set_format:                     ## @smiapp_set_format
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_to_smiapp_sensor
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_to_smiapp_subdev
	movq	%rax, %r13
	movq	_SMIAPP_PADS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rsi
	cmpq	(%r13), %rsi
	jne	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_smiapp_set_format_source
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.2:
	movl	%ebx, %eax
	jmp	LBB0_3
LBB0_4:
	movq	%r12, %rdi
	callq	___smiapp_get_mbus_code
	movl	%eax, 24(%rbx)
	movl	12(%rbx), %edi
	andl	$-2, %edi
	movl	%edi, 12(%rbx)
	andb	$-2, 16(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	8(%r15), %rax
	movq	_SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_SMIAPP_LIMIT_MAX_X_OUTPUT_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	callq	_clamp
	movl	%eax, 12(%rbx)
	movl	16(%rbx), %edi
	movq	8(%r15), %rax
	movq	_SMIAPP_LIMIT_MIN_Y_OUTPUT_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_SMIAPP_LIMIT_MAX_Y_OUTPUT_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	callq	_clamp
	movl	%eax, 16(%rbx)
	movl	8(%rbx), %r8d
	movq	%r12, %rdi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_smiapp_get_crop_compose
	movq	8(%r13), %rax
	movq	(%r14,%rax,8), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movl	12(%rbx), %ecx
	movl	%ecx, (%rax)
	movl	16(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	8(%rbx), %edx
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_6
## %bb.5:
	movq	16(%rax), %rcx
	movq	%rcx, 32(%r13)
	movups	(%rax), %xmm0
	movups	%xmm0, 16(%r13)
	movl	8(%rbx), %edx
LBB0_6:
	movq	_V4L2_SEL_TGT_CROP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_smiapp_propagate
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	xorl	%eax, %eax
LBB0_3:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SMIAPP_PADS,4,2                ## @SMIAPP_PADS
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE,8,3 ## @SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE
	.comm	_SMIAPP_LIMIT_MAX_X_OUTPUT_SIZE,8,3 ## @SMIAPP_LIMIT_MAX_X_OUTPUT_SIZE
	.comm	_SMIAPP_LIMIT_MIN_Y_OUTPUT_SIZE,8,3 ## @SMIAPP_LIMIT_MIN_Y_OUTPUT_SIZE
	.comm	_SMIAPP_LIMIT_MAX_Y_OUTPUT_SIZE,8,3 ## @SMIAPP_LIMIT_MAX_Y_OUTPUT_SIZE
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_V4L2_SEL_TGT_CROP,4,2          ## @V4L2_SEL_TGT_CROP
	.no_dead_strip	_smiapp_set_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smiapp_set_format
_smiapp_set_format:                     ; @smiapp_set_format
	.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
	sub	sp, sp, #16
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_to_smiapp_sensor
	mov	x19, x0
	mov	x0, x21
	bl	_to_smiapp_subdev
	mov	x23, x0
Lloh3:
	adrp	x8, _SMIAPP_PADS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMIAPP_PADS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x24, x9, x8
	mov	sp, x24
	mov	x0, x19
	bl	_mutex_lock
	ldr	x1, [x22]
	ldr	x8, [x23]
	cmp	x1, x8
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_smiapp_set_format_source
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	ldur	x8, [x29, #-56]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.2:
	mov	x0, x20
	b	LBB0_7
LBB0_3:
	mov	x0, x21
	bl	___smiapp_get_mbus_code
	ldur	d0, [x22, #12]
	bic.2s	v0, #1
	stur	d0, [x22, #12]
Lloh11:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	stp	w8, w0, [x22, #20]
	ldr	x8, [x19, #8]
Lloh14:
	adrp	x9, _SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
Lloh17:
	adrp	x9, _SMIAPP_LIMIT_MAX_X_OUTPUT_SIZE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SMIAPP_LIMIT_MAX_X_OUTPUT_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w2, [x8, x9, lsl #2]
	fmov	w0, s0
	bl	_clamp
	str	w0, [x22, #12]
	ldr	x8, [x19, #8]
Lloh20:
	adrp	x9, _SMIAPP_LIMIT_MIN_Y_OUTPUT_SIZE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SMIAPP_LIMIT_MIN_Y_OUTPUT_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w0, [x22, #16]
Lloh23:
	adrp	x9, _SMIAPP_LIMIT_MAX_Y_OUTPUT_SIZE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SMIAPP_LIMIT_MAX_Y_OUTPUT_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	ldr	w2, [x8, x9, lsl #2]
	bl	_clamp
	str	w0, [x22, #16]
	ldr	w4, [x22, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x24
	mov	x3, #0
	bl	_smiapp_get_crop_compose
	ldr	x8, [x23, #8]
	ldr	x8, [x24, x8, lsl #3]
	stp	xzr, xzr, [x8, #8]
	ldur	d0, [x22, #12]
	str	d0, [x8]
	ldr	w2, [x22, #8]
Lloh26:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w2, w9
	b.ne	LBB0_5
; %bb.4:
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [x23, #32]
	str	q0, [x23, #16]
	ldr	w2, [x22, #8]
LBB0_5:
Lloh29:
	adrp	x8, _V4L2_SEL_TGT_CROP@GOTPAGE
Lloh30:
	ldr	x8, [x8, _V4L2_SEL_TGT_CROP@GOTPAGEOFF]
Lloh31:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_smiapp_propagate
	mov	x0, x19
	bl	_mutex_unlock
	ldur	x8, [x29, #-56]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.6:
	mov	w0, #0
LBB0_7:
	sub	sp, x29, #48
	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
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_SMIAPP_PADS,4,2                ; @SMIAPP_PADS
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE,8,3 ; @SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE
	.comm	_SMIAPP_LIMIT_MAX_X_OUTPUT_SIZE,8,3 ; @SMIAPP_LIMIT_MAX_X_OUTPUT_SIZE
	.comm	_SMIAPP_LIMIT_MIN_Y_OUTPUT_SIZE,8,3 ; @SMIAPP_LIMIT_MIN_Y_OUTPUT_SIZE
	.comm	_SMIAPP_LIMIT_MAX_Y_OUTPUT_SIZE,8,3 ; @SMIAPP_LIMIT_MAX_Y_OUTPUT_SIZE
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_V4L2_SEL_TGT_CROP,4,2          ; @V4L2_SEL_TGT_CROP
	.no_dead_strip	_smiapp_set_format
.subsections_via_symbols
