	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smiapp_read_frame_fmt
_smiapp_read_frame_fmt:                 ## @smiapp_read_frame_fmt
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r15
	movq	_SMIAPP_REG_U8_FRAME_FORMAT_MODEL_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-68(%rbp), %rdx
	movq	%r14, %rdi
	callq	_smiapp_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.1:
	movq	_SMIAPP_REG_U8_FRAME_FORMAT_MODEL_SUBTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-88(%rbp), %rdx
	movq	%r14, %rdi
	callq	_smiapp_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.2:
	movl	-88(%rbp), %r12d
	movq	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r12d, %ebx
	movq	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %ebx
	movq	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NROWS_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movl	-68(%rbp), %eax
	movq	_SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE@GOTPCREL(%rip), %rdx
	movq	_SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rcx, %rsi
	cmpl	(%rdx), %eax
	leaq	L_.str.1(%rip), %rdx
	cmovneq	%rsi, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	addl	%ebx, %r12d
	movl	%r12d, -84(%rbp)                ## 4-byte Spill
	je	LBB0_27
## %bb.3:
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 8(%r14)
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addl	%r15d, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
LBB0_26:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r13d
	cmpl	%r13d, -84(%rbp)                ## 4-byte Folded Reload
	je	LBB0_27
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	-68(%rbp), %edx
	movq	_SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %edi
	callq	_SMIAPP_REG_U16_FRAME_FORMAT_DESCRIPTOR_2
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	leaq	-64(%rbp), %rdx
	callq	_smiapp_read
	movl	%eax, %ebx
	movq	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_MASK@GOTPCREL(%rip), %rdx
	movq	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_SHIFT@GOTPCREL(%rip), %rcx
	movq	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, %ebx
	je	LBB0_9
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_29
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %edi
	callq	_SMIAPP_REG_U32_FRAME_FORMAT_DESCRIPTOR_4
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	leaq	-64(%rbp), %rdx
	callq	_smiapp_read
	movl	%eax, %ebx
	movq	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_MASK@GOTPCREL(%rip), %rdx
	movq	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_SHIFT@GOTPCREL(%rip), %rcx
	movq	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELS_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, %ebx
	jne	LBB0_32
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %r15d
	movl	(%rdx), %ebx
	andl	%r15d, %ebx
	movzbl	(%rcx), %ecx
	shrl	%cl, %ebx
	andl	(%rax), %r15d
	cmpl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	leaq	L_.str.6(%rip), %r9
	leaq	L_.str.5(%rip), %rax
	cmovbq	%rax, %r9
	leal	-128(%rbx), %eax
	cmpl	$4, %eax
	ja	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	leaq	L_.str.7(%rip), %rcx
	jmpq	*%rax
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$128, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.13(%rip), %rsi
	movl	%r12d, %edx
	leaq	L_.str.11(%rip), %rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	jae	LBB0_24
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.12(%rip), %rcx
	jmp	LBB0_15
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.8(%rip), %rcx
	jmp	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.10(%rip), %rcx
	jmp	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.9(%rip), %rcx
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.13(%rip), %rsi
	movl	%r12d, %edx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	jae	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$128, %ebx
	jne	LBB0_18
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	addl	%r15d, -60(%rbp)                ## 4-byte Folded Spill
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$128, %ebx
	je	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$129, %ebx
	jne	LBB0_25
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, 4(%r14)
	jne	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 12(%r14)
	addl	%r15d, %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_25
LBB0_27:
	movl	4(%r14), %ecx
	movl	8(%r14), %eax
	cmpl	%eax, %ecx
	jle	LBB0_28
## %bb.30:
	leaq	L_.str.14(%rip), %rsi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%ecx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	4(%r14), %ecx
	movl	%ecx, 8(%r14)
	jmp	LBB0_31
LBB0_28:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_31:
	movl	12(%r14), %edx
	leaq	L_.str.15(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%r14), %edx
	leaq	L_.str.16(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_32:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_32
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_23
	.long	L0_0_set_15
	.long	L0_0_set_11
	.long	L0_0_set_13
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_SMIAPP_REG_U8_FRAME_FORMAT_MODEL_TYPE,4,2 ## @SMIAPP_REG_U8_FRAME_FORMAT_MODEL_TYPE
	.comm	_SMIAPP_REG_U8_FRAME_FORMAT_MODEL_SUBTYPE,4,2 ## @SMIAPP_REG_U8_FRAME_FORMAT_MODEL_SUBTYPE
	.comm	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_MASK,4,2 ## @SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_MASK
	.comm	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_SHIFT,4,2 ## @SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_SHIFT
	.comm	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NROWS_MASK,4,2 ## @SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NROWS_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"format_model_type %s\n"

	.comm	_SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE,4,2 ## @SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE
L_.str.1:                               ## @.str.1
	.asciz	"2 byte"

	.comm	_SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE,4,2 ## @SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE
L_.str.2:                               ## @.str.2
	.asciz	"4 byte"

L_.str.3:                               ## @.str.3
	.asciz	"is simply bad"

	.comm	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_MASK,4,2 ## @SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_MASK
	.comm	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_SHIFT,4,2 ## @SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_SHIFT
	.comm	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK,4,2 ## @SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK
	.comm	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_MASK,4,2 ## @SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_MASK
	.comm	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_SHIFT,4,2 ## @SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_SHIFT
	.comm	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELS_MASK,4,2 ## @SMIAPP_FRAME_FORMAT_DESC_4_PIXELS_MASK
L_.str.4:                               ## @.str.4
	.asciz	"invalid frame format model type %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.5:                               ## @.str.5
	.asciz	"columns"

L_.str.6:                               ## @.str.6
	.asciz	"rows"

L_.str.7:                               ## @.str.7
	.asciz	"embedded"

L_.str.8:                               ## @.str.8
	.asciz	"dummy"

L_.str.9:                               ## @.str.9
	.asciz	"black"

L_.str.10:                              ## @.str.10
	.asciz	"dark"

L_.str.11:                              ## @.str.11
	.asciz	"visible"

L_.str.12:                              ## @.str.12
	.asciz	"invalid"

L_.str.13:                              ## @.str.13
	.asciz	"0x%8.8x %s pixels: %d %s (pixelcode %u)\n"

L_.str.14:                              ## @.str.14
	.asciz	"adjusting image start line to %u (was %u)\n"

L_.str.15:                              ## @.str.15
	.asciz	"embedded data from lines %d to %d\n"

L_.str.16:                              ## @.str.16
	.asciz	"image data starts at line %d\n"

	.no_dead_strip	_smiapp_read_frame_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smiapp_read_frame_fmt
_smiapp_read_frame_fmt:                 ; @smiapp_read_frame_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x20, x0
	ldr	x0, [x0, #16]
	bl	_v4l2_get_subdevdata
	mov	x19, x0
Lloh0:
	adrp	x8, _SMIAPP_REG_U8_FRAME_FORMAT_MODEL_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMIAPP_REG_U8_FRAME_FORMAT_MODEL_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #60
	mov	x0, x20
	bl	_smiapp_read
	cbnz	w0, LBB0_31
; %bb.1:
Lloh3:
	adrp	x8, _SMIAPP_REG_U8_FRAME_FORMAT_MODEL_SUBTYPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMIAPP_REG_U8_FRAME_FORMAT_MODEL_SUBTYPE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #56
	mov	x0, x20
	bl	_smiapp_read
	cbnz	w0, LBB0_31
; %bb.2:
	ldr	w8, [sp, #56]
Lloh6:
	adrp	x9, _SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_SHIFT@GOTPAGEOFF]
	and	w9, w9, w8
Lloh11:
	ldr	w10, [x10]
	lsr	w24, w9, w10
Lloh12:
	adrp	x9, _SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NROWS_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NROWS_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w21, w9, w8
	ldr	w8, [sp, #60]
Lloh15:
	adrp	x9, _SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE@GOTPAGEOFF]
Lloh17:
	adrp	x10, _SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	ldr	w10, [x10]
Lloh21:
	adrp	x11, l_.str.3@PAGE
Lloh22:
	add	x11, x11, l_.str.3@PAGEOFF
Lloh23:
	adrp	x12, l_.str.2@PAGE
Lloh24:
	add	x12, x12, l_.str.2@PAGEOFF
	cmp	w8, w10
	csel	x10, x12, x11, eq
Lloh25:
	adrp	x11, l_.str.1@PAGE
Lloh26:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	w8, w9
	csel	x8, x11, x10, eq
	str	x8, [sp]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	adds	w27, w21, w24
	b.eq	LBB0_28
; %bb.3:
	mov	w28, #0
	mov	w26, #0
	mov	w21, #0
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	w28, [x20, #8]
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w28, w22, w28
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w21, w21, #1
	cmp	w27, w21
	b.eq	LBB0_28
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #60]
Lloh29:
	adrp	x9, _SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_SMIAPP_REG_U16_FRAME_FORMAT_DESCRIPTOR_2
	mov	x23, x0
	add	x2, sp, #52
	mov	x0, x20
	mov	x1, x23
	bl	_smiapp_read
	cbnz	w0, LBB0_31
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh32:
	adrp	x9, _SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_MASK@GOTPAGE
Lloh33:
	ldr	x9, [x9, _SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_MASK@GOTPAGEOFF]
Lloh34:
	adrp	x10, _SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_SHIFT@GOTPAGE
Lloh35:
	ldr	x10, [x10, _SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_SHIFT@GOTPAGEOFF]
Lloh36:
	adrp	x8, _SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh38:
	adrp	x9, _SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE@GOTPAGE
Lloh39:
	ldr	x9, [x9, _SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_32
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_SMIAPP_REG_U32_FRAME_FORMAT_DESCRIPTOR_4
	mov	x23, x0
	add	x2, sp, #52
	mov	x0, x20
	mov	x1, x23
	bl	_smiapp_read
	cbnz	w0, LBB0_31
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh41:
	adrp	x9, _SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_MASK@GOTPAGE
Lloh42:
	ldr	x9, [x9, _SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_MASK@GOTPAGEOFF]
Lloh43:
	adrp	x10, _SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_SHIFT@GOTPAGE
Lloh44:
	ldr	x10, [x10, _SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_SHIFT@GOTPAGEOFF]
Lloh45:
	adrp	x8, _SMIAPP_FRAME_FORMAT_DESC_4_PIXELS_MASK@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SMIAPP_FRAME_FORMAT_DESC_4_PIXELS_MASK@GOTPAGEOFF]
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w11, [sp, #52]
	ldr	w9, [x9]
	and	w9, w9, w11
	ldr	w10, [x10]
	lsr	w25, w9, w10
	ldr	w8, [x8]
	and	w22, w8, w11
	cmp	w21, w24
Lloh47:
	adrp	x8, l_.str.6@PAGE
Lloh48:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh49:
	adrp	x9, l_.str.5@PAGE
Lloh50:
	add	x9, x9, l_.str.5@PAGEOFF
	csel	x8, x9, x8, lo
	sub	w9, w25, #128
	cmp	w9, #4
	b.hi	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh51:
	adrp	x12, lJTI0_0@PAGE
Lloh52:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x10, LBB0_15
	ldrb	w11, [x12, x9]
	add	x10, x10, x11, lsl #2
Lloh53:
	adrp	x9, l_.str.7@PAGE
Lloh54:
	add	x9, x9, l_.str.7@PAGEOFF
	br	x10
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w9, #128
	stp	x8, x9, [sp, #24]
	mov	x9, x22
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
Lloh55:
	adrp	x8, l_.str.11@PAGE
Lloh56:
	add	x8, x8, l_.str.11@PAGEOFF
	stp	x8, x9, [sp, #8]
	str	x23, [sp]
	mov	x0, x19
Lloh57:
	adrp	x1, l_.str.13@PAGE
Lloh58:
	add	x1, x1, l_.str.13@PAGEOFF
	bl	_dev_dbg
	cmp	w21, w24
	b.hs	LBB0_4
	b	LBB0_22
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh59:
	adrp	x9, l_.str.12@PAGE
Lloh60:
	add	x9, x9, l_.str.12@PAGEOFF
	b	LBB0_20
LBB0_17:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh61:
	adrp	x9, l_.str.8@PAGE
Lloh62:
	add	x9, x9, l_.str.8@PAGEOFF
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh63:
	adrp	x9, l_.str.10@PAGE
Lloh64:
	add	x9, x9, l_.str.10@PAGEOFF
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh65:
	adrp	x9, l_.str.9@PAGE
Lloh66:
	add	x9, x9, l_.str.9@PAGEOFF
LBB0_20:                                ;   in Loop: Header=BB0_7 Depth=1
	stp	x8, x25, [sp, #24]
	stp	x9, x22, [sp, #8]
	str	x23, [sp]
	mov	x0, x19
Lloh67:
	adrp	x1, l_.str.13@PAGE
Lloh68:
	add	x1, x1, l_.str.13@PAGEOFF
	bl	_dev_dbg
	cmp	w21, w24
	b.hs	LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	w25, #128
	b.ne	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_7 Depth=1
	str	w26, [x20]
LBB0_23:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w26, w22, w26
	b	LBB0_6
LBB0_24:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w25, #128
	b.eq	LBB0_4
; %bb.25:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	w25, #129
	b.ne	LBB0_5
; %bb.26:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_5
; %bb.27:                               ;   in Loop: Header=BB0_7 Depth=1
	str	w28, [x20, #12]
	add	w8, w22, w28
	str	w8, [x20, #4]
	b	LBB0_5
LBB0_28:
	ldp	w8, w9, [x20, #4]
	cmp	w8, w9
	b.le	LBB0_30
; %bb.29:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x8, x9, [sp]
Lloh69:
	adrp	x1, l_.str.14@PAGE
Lloh70:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [x20, #4]
	str	w8, [x20, #8]
LBB0_30:
	ldr	w9, [x20, #12]
	stp	x9, x8, [sp]
Lloh71:
	adrp	x1, l_.str.15@PAGE
Lloh72:
	add	x1, x1, l_.str.15@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [x20, #8]
	str	x8, [sp]
Lloh73:
	adrp	x1, l_.str.16@PAGE
Lloh74:
	add	x1, x1, l_.str.16@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w0, #0
LBB0_31:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_32:
	str	x8, [sp]
Lloh75:
	adrp	x1, l_.str.4@PAGE
Lloh76:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh77:
	adrp	x8, _EINVAL@GOTPAGE
Lloh78:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh79:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_31
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpAdd	Lloh73, Lloh74
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpAdd	Lloh75, Lloh76
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_15-LBB0_15)>>2
	.byte	(LBB0_20-LBB0_15)>>2
	.byte	(LBB0_17-LBB0_15)>>2
	.byte	(LBB0_18-LBB0_15)>>2
	.byte	(LBB0_19-LBB0_15)>>2
                                        ; -- End function
	.comm	_SMIAPP_REG_U8_FRAME_FORMAT_MODEL_TYPE,4,2 ; @SMIAPP_REG_U8_FRAME_FORMAT_MODEL_TYPE
	.comm	_SMIAPP_REG_U8_FRAME_FORMAT_MODEL_SUBTYPE,4,2 ; @SMIAPP_REG_U8_FRAME_FORMAT_MODEL_SUBTYPE
	.comm	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_MASK,4,2 ; @SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_MASK
	.comm	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_SHIFT,4,2 ; @SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NCOLS_SHIFT
	.comm	_SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NROWS_MASK,4,2 ; @SMIAPP_FRAME_FORMAT_MODEL_SUBTYPE_NROWS_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"format_model_type %s\n"

	.comm	_SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE,4,2 ; @SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE
l_.str.1:                               ; @.str.1
	.asciz	"2 byte"

	.comm	_SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE,4,2 ; @SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE
l_.str.2:                               ; @.str.2
	.asciz	"4 byte"

l_.str.3:                               ; @.str.3
	.asciz	"is simply bad"

	.comm	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_MASK,4,2 ; @SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_MASK
	.comm	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_SHIFT,4,2 ; @SMIAPP_FRAME_FORMAT_DESC_2_PIXELCODE_SHIFT
	.comm	_SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK,4,2 ; @SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK
	.comm	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_MASK,4,2 ; @SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_MASK
	.comm	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_SHIFT,4,2 ; @SMIAPP_FRAME_FORMAT_DESC_4_PIXELCODE_SHIFT
	.comm	_SMIAPP_FRAME_FORMAT_DESC_4_PIXELS_MASK,4,2 ; @SMIAPP_FRAME_FORMAT_DESC_4_PIXELS_MASK
l_.str.4:                               ; @.str.4
	.asciz	"invalid frame format model type %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.5:                               ; @.str.5
	.asciz	"columns"

l_.str.6:                               ; @.str.6
	.asciz	"rows"

l_.str.7:                               ; @.str.7
	.asciz	"embedded"

l_.str.8:                               ; @.str.8
	.asciz	"dummy"

l_.str.9:                               ; @.str.9
	.asciz	"black"

l_.str.10:                              ; @.str.10
	.asciz	"dark"

l_.str.11:                              ; @.str.11
	.asciz	"visible"

l_.str.12:                              ; @.str.12
	.asciz	"invalid"

l_.str.13:                              ; @.str.13
	.asciz	"0x%8.8x %s pixels: %d %s (pixelcode %u)\n"

l_.str.14:                              ; @.str.14
	.asciz	"adjusting image start line to %u (was %u)\n"

l_.str.15:                              ; @.str.15
	.asciz	"embedded data from lines %d to %d\n"

l_.str.16:                              ; @.str.16
	.asciz	"image data starts at line %d\n"

	.no_dead_strip	_smiapp_read_frame_fmt
.subsections_via_symbols
