	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mjpeg_build_huffman_codes   ## -- Begin function ff_mjpeg_build_huffman_codes
	.p2align	4, 0x90
_ff_mjpeg_build_huffman_codes:          ## @ff_mjpeg_build_huffman_codes
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movl	$0, (%rdi)
	xorl	%r8d, %r8d
	movl	$1, %r9d
	xorl	%r10d, %r10d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	addl	%r8d, %r8d
	incq	%r9
	cmpq	$17, %r9
	je	LBB0_17
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	(%rdx,%r9,4), %r11d
	testl	%r11d, %r11d
	jle	LBB0_16
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r10d, %r10
	testb	$1, %r11b
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r8d, %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	(%rcx,%r10,4), %rax
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r9d, (%rdi,%rax,4)
	movl	%r8d, (%rsi,%rax,4)
	jmp	LBB0_7
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%rdi)
	je	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%r10
	movl	%r8d, %eax
	orl	$1, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	%r11d, %r8d
	cmpl	$1, %r11d
	jne	LBB0_9
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=2
	leal	1(%rax), %ebx
	movl	%r9d, (%rdi,%r11,4)
	movl	%ebx, (%rsi,%r11,4)
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=2
	addl	$2, %eax
	addq	$2, %r10
	cmpl	%eax, %r8d
	je	LBB0_16
LBB0_9:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rcx,%r10,4), %r11
	testq	%r11, %r11
	je	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=2
	movl	%r9d, (%rdi,%r11,4)
	movl	%eax, (%rsi,%r11,4)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=2
	cmpl	$0, (%rdi)
	je	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=2
	movslq	4(%rcx,%r10,4), %r11
	testq	%r11, %r11
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=2
	cmpl	$0, (%rdi)
	jne	LBB0_15
	jmp	LBB0_14
LBB0_17:
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mjpeg_build_huffman_codes   ; -- Begin function ff_mjpeg_build_huffman_codes
	.p2align	2
_ff_mjpeg_build_huffman_codes:          ; @ff_mjpeg_build_huffman_codes
	.cfi_startproc
; %bb.0:
	mov	w9, #0
	mov	w8, #0
	str	wzr, [x0]
	mov	w10, #1
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, x12
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	lsl	w9, w9, #1
	add	x10, x10, #1
	cmp	x10, #17
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w11, [x2, x10, lsl #2]
	cmp	w11, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w12, w9, w11
	add	x13, x3, w8, sxtw #2
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	lsl	x14, x14, #2
	str	w10, [x0, x14]
	str	w9, [x1, x14]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w9, w9, #1
	add	x13, x13, #4
	add	w8, w8, #1
	subs	w11, w11, #1
	b.eq	LBB0_1
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x14, [x13]
	cbnz	w14, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w15, [x0]
	cbnz	w15, LBB0_6
	b	LBB0_5
LBB0_9:
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
