	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apply_predictor_transform
_apply_predictor_transform:             ## @apply_predictor_transform
	.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	8(%rdi), %rcx
	movq	_IMAGE_ROLE_ARGB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	shlq	$4, %rdx
	movq	8(%rcx,%rdx), %rax
	cmpl	$0, (%rax)
	jle	LBB0_15
## %bb.1:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rdx), %r12
	addq	$8, %r12
	movq	_IMAGE_ROLE_PREDICTOR@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rdx
	leaq	(%rcx,%rdx), %r13
	leaq	(%rcx,%rdx), %r14
	addq	$8, %r14
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	(%rax), %r15d
	jge	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, 4(%rax)
	jle	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r13), %ecx
	movl	%ebx, %esi
	shrl	%cl, %esi
	movl	%r15d, %edx
	shrl	%cl, %edx
	movq	(%r14), %rdi
	movl	$2, %ecx
	callq	_GET_PIXEL_COMP
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	testl	%r15d, %r15d
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_PRED_MODE_L@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=2
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_PRED_MODE_T@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	_PRED_MODE_BLACK@GOTPCREL(%rip), %rax
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	(%rax), %eax
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$14, %eax
	jae	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r12), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_inverse_prediction
	incl	%ebx
	movq	(%r12), %rax
	cmpl	4(%rax), %ebx
	jl	LBB0_4
	jmp	LBB0_14
LBB0_12:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %ecx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMAGE_ROLE_ARGB,8,3            ## @IMAGE_ROLE_ARGB
	.comm	_IMAGE_ROLE_PREDICTOR,8,3       ## @IMAGE_ROLE_PREDICTOR
	.comm	_PRED_MODE_BLACK,4,2            ## @PRED_MODE_BLACK
	.comm	_PRED_MODE_T,4,2                ## @PRED_MODE_T
	.comm	_PRED_MODE_L,4,2                ## @PRED_MODE_L
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid predictor mode: %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_apply_predictor_transform
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apply_predictor_transform
_apply_predictor_transform:             ; @apply_predictor_transform
	.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
	ldr	x9, [x0, #8]
Lloh0:
	adrp	x8, _IMAGE_ROLE_ARGB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMAGE_ROLE_ARGB@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x22, x9, x8, lsl #4
	ldr	x8, [x22, #8]!
	ldr	w10, [x8]
	cmp	w10, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x19, x0
	mov	w20, #0
Lloh3:
	adrp	x10, _IMAGE_ROLE_PREDICTOR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IMAGE_ROLE_PREDICTOR@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	add	x23, x9, x10, lsl #4
	add	x24, x23, #8
Lloh6:
	adrp	x25, _PRED_MODE_BLACK@GOTPAGE
Lloh7:
	ldr	x25, [x25, _PRED_MODE_BLACK@GOTPAGEOFF]
Lloh8:
	adrp	x26, _PRED_MODE_T@GOTPAGE
Lloh9:
	ldr	x26, [x26, _PRED_MODE_T@GOTPAGEOFF]
Lloh10:
	adrp	x27, _PRED_MODE_L@GOTPAGE
Lloh11:
	ldr	x27, [x27, _PRED_MODE_L@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldr	w9, [x8]
	cmp	w20, w9
	b.ge	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	w9, [x8, #4]
	cmp	w9, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w21, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x23]
	lsr	w1, w21, w8
	lsr	w2, w20, w8
	ldr	x0, [x24]
	mov	w3, #2
	bl	_GET_PIXEL_COMP
	cbz	w21, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x27]
	cmp	w20, #0
	csel	w3, w8, w0, eq
	cmp	w3, #14
	b.lo	LBB0_10
	b	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=2
	cbz	w20, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w3, [x26]
	cmp	w3, #14
	b.lo	LBB0_10
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
	ldr	w3, [x25]
	cmp	w3, #14
	b.hs	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x0, [x22]
	mov	x1, x3
	mov	x2, x21
	mov	x3, x20
	bl	_inverse_prediction
	add	w21, w21, #1
	ldr	x8, [x22]
	ldr	w9, [x8, #4]
	cmp	w21, w9
	b.lt	LBB0_5
	b	LBB0_2
LBB0_11:
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh17:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IMAGE_ROLE_ARGB,8,3            ; @IMAGE_ROLE_ARGB
	.comm	_IMAGE_ROLE_PREDICTOR,8,3       ; @IMAGE_ROLE_PREDICTOR
	.comm	_PRED_MODE_BLACK,4,2            ; @PRED_MODE_BLACK
	.comm	_PRED_MODE_T,4,2                ; @PRED_MODE_T
	.comm	_PRED_MODE_L,4,2                ; @PRED_MODE_L
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid predictor mode: %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_apply_predictor_transform
.subsections_via_symbols
