	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpia2_g_jpegcomp
_cpia2_g_jpegcomp:                      ## @cpia2_g_jpegcomp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	$80, (%rbx)
	movq	_V4L2_JPEG_MARKER_DQT@GOTPCREL(%rip), %rcx
	movq	_V4L2_JPEG_MARKER_DRI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
	cmpl	$0, 28(%r14)
	jne	LBB0_2
## %bb.1:
	movq	_V4L2_JPEG_MARKER_DHT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
LBB0_2:
	movl	24(%r14), %eax
	movl	%eax, 32(%rbx)
	movq	(%r14), %rdx
	movq	%rdx, 8(%rbx)
	testq	%rdx, %rdx
	jle	LBB0_4
## %bb.3:
	movl	28(%rbx), %edi
	movl	20(%r14), %esi
	callq	_memcpy
	movq	_V4L2_JPEG_MARKER_APP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_4:
	movq	8(%r14), %rdx
	movq	%rdx, 16(%rbx)
	testq	%rdx, %rdx
	jle	LBB0_6
## %bb.5:
	movl	24(%rbx), %edi
	movl	16(%r14), %esi
	callq	_memcpy
	movq	_JPEG_MARKER_COM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movq	16(%rbx), %rdx
LBB0_6:
	movq	8(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_JPEG_MARKER_DQT,4,2       ## @V4L2_JPEG_MARKER_DQT
	.comm	_V4L2_JPEG_MARKER_DRI,4,2       ## @V4L2_JPEG_MARKER_DRI
	.comm	_V4L2_JPEG_MARKER_DHT,4,2       ## @V4L2_JPEG_MARKER_DHT
	.comm	_V4L2_JPEG_MARKER_APP,4,2       ## @V4L2_JPEG_MARKER_APP
	.comm	_JPEG_MARKER_COM,4,2            ## @JPEG_MARKER_COM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"G_JPEGCOMP APP_len:%d COM_len:%d\n"

	.no_dead_strip	_cpia2_g_jpegcomp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpia2_g_jpegcomp
_cpia2_g_jpegcomp:                      ; @cpia2_g_jpegcomp
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_video_drvdata
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	w8, #80
	str	w8, [x19]
Lloh0:
	adrp	x8, _V4L2_JPEG_MARKER_DQT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_JPEG_MARKER_DQT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _V4L2_JPEG_MARKER_DRI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_JPEG_MARKER_DRI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	ldr	w9, [x20, #28]
	cbnz	w9, LBB0_2
; %bb.1:
Lloh6:
	adrp	x9, _V4L2_JPEG_MARKER_DHT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_JPEG_MARKER_DHT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_2:
	ldr	w8, [x20, #24]
	str	w8, [x19, #32]
	ldr	x2, [x20]
	str	x2, [x19, #8]
	cmp	x2, #1
	b.lt	LBB0_4
; %bb.3:
	ldr	w0, [x19, #28]
	ldr	w1, [x20, #20]
	bl	_memcpy
Lloh9:
	adrp	x8, _V4L2_JPEG_MARKER_APP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_JPEG_MARKER_APP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_4:
	ldr	x2, [x20, #8]
	str	x2, [x19, #16]
	cmp	x2, #1
	b.lt	LBB0_6
; %bb.5:
	ldr	w0, [x19, #24]
	ldr	w1, [x20, #16]
	bl	_memcpy
Lloh12:
	adrp	x8, _JPEG_MARKER_COM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _JPEG_MARKER_COM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	ldr	x2, [x19, #16]
LBB0_6:
	ldr	x1, [x19, #8]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_JPEG_MARKER_DQT,4,2       ; @V4L2_JPEG_MARKER_DQT
	.comm	_V4L2_JPEG_MARKER_DRI,4,2       ; @V4L2_JPEG_MARKER_DRI
	.comm	_V4L2_JPEG_MARKER_DHT,4,2       ; @V4L2_JPEG_MARKER_DHT
	.comm	_V4L2_JPEG_MARKER_APP,4,2       ; @V4L2_JPEG_MARKER_APP
	.comm	_JPEG_MARKER_COM,4,2            ; @JPEG_MARKER_COM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"G_JPEGCOMP APP_len:%d COM_len:%d\n"

	.no_dead_strip	_cpia2_g_jpegcomp
.subsections_via_symbols
