	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pam_encode_frame
_pam_encode_frame:                      ## @pam_encode_frame
	.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
	movl	8(%rdi), %eax
	addl	$-128, %eax
	cmpl	$8, %eax
	ja	LBB0_1
## %bb.2:
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %r13d
	movl	4(%rdi), %r12d
	leaq	L_.str(%rip), %rdx
	movl	$1, %r15d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	movl	%r12d, %ebx
	movl	$1, %ecx
	jmpq	*%rax
LBB0_6:
	leal	(,%r12,4), %ebx
	leaq	L_.str.2(%rip), %rdx
	movl	$65535, %ecx                    ## imm = 0xFFFF
	movl	$2, %r15d
	jmp	LBB0_12
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_27
LBB0_10:
	leal	(,%r12,8), %ebx
	leaq	L_.str.4(%rip), %rdx
	movl	$65535, %ecx                    ## imm = 0xFFFF
	jmp	LBB0_11
LBB0_8:
	leal	(,%r12,4), %ebx
	leaq	L_.str.4(%rip), %rdx
	movl	$255, %ecx
LBB0_11:
	movl	$4, %r15d
	jmp	LBB0_12
LBB0_9:
	leal	(%r12,%r12), %eax
	leal	(%rax,%rax,2), %ebx
	leaq	L_.str.3(%rip), %rdx
	movl	$65535, %ecx                    ## imm = 0xFFFF
	movl	$3, %r15d
	jmp	LBB0_12
LBB0_7:
	leal	(%r12,%r12,2), %ebx
	leaq	L_.str.3(%rip), %rdx
	movl	$255, %ecx
	movl	$3, %r15d
	jmp	LBB0_12
LBB0_5:
	leal	(%r12,%r12), %ebx
	leaq	L_.str.2(%rip), %rdx
	movl	$255, %ecx
	movl	$2, %r15d
	jmp	LBB0_12
LBB0_3:
	leaq	L_.str.1(%rip), %rdx
	movl	$255, %ecx
	movl	%r12d, %ebx
	jmp	LBB0_12
LBB0_4:
	leal	(%r12,%r12), %ebx
	leaq	L_.str.1(%rip), %rdx
	movl	$65535, %ecx                    ## imm = 0xFFFF
LBB0_12:
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edx
	imull	%r13d, %edx
	addl	$200, %edx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	%rsi, %r14
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_27
## %bb.13:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	(%r14), %rbx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movl	%r15d, %r9d
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	callq	_snprintf
	addq	$16, %rsp
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rax,4), %r14
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movq	(%rax), %r15
	movslq	(%rcx), %rbx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	$133, 8(%rax)
	jne	LBB0_14
## %bb.17:
	testl	%r13d, %r13d
	jle	LBB0_26
## %bb.18:
	movl	%r12d, %eax
	andl	$-2, %eax
	xorl	%r8d, %r8d
	movq	%rbx, %r9
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_19 Depth=1
	leaq	(%r15,%rbx,4), %r15
	incl	%r8d
	cmpl	%r13d, %r8d
	je	LBB0_26
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_22 Depth 2
	testl	%r12d, %r12d
	jle	LBB0_25
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	xorl	%edx, %edx
	cmpl	$1, %r12d
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_22:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%edx, %esi
	shrl	$3, %esi
	movl	(%r15,%rsi,4), %edi
	movb	$7, %bl
	subb	%dl, %bl
	andb	$7, %bl
	movzbl	%bl, %ebx
	xorl	%ecx, %ecx
	btl	%ebx, %edi
	setb	%cl
	movl	%ecx, (%r14)
	movl	(%r15,%rsi,4), %ecx
	movb	$6, %bl
	subb	%dl, %bl
	andb	$6, %bl
	movzbl	%bl, %esi
	xorl	%edi, %edi
	btl	%esi, %ecx
	setb	%dil
	movl	%edi, 4(%r14)
	addq	$8, %r14
	addl	$2, %edx
	cmpl	%eax, %edx
	jne	LBB0_22
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	testb	$1, %r12b
	movq	%r9, %rbx
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%edx, %ecx
	shrl	$3, %ecx
	movl	(%r15,%rcx,4), %ecx
	movb	$7, %bl
	subb	%dl, %bl
	andb	$7, %bl
	movzbl	%bl, %edx
	movq	%r9, %rbx
	xorl	%esi, %esi
	btl	%edx, %ecx
	setb	%sil
	movl	%esi, (%r14)
	addq	$4, %r14
	jmp	LBB0_25
LBB0_14:
	testl	%r13d, %r13d
	jle	LBB0_26
## %bb.15:
	movslq	-44(%rbp), %r12                 ## 4-byte Folded Reload
	shlq	$2, %rbx
	shlq	$2, %r12
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	addq	%rbx, %r15
	addq	%r12, %r14
	decl	%r13d
	jne	LBB0_16
LBB0_26:
	subq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	shrq	$2, %r14
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, 8(%rcx)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%rcx)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_27:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_7
	.long	L0_0_set_12
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BLACKANDWHITE"

L_.str.1:                               ## @.str.1
	.asciz	"GRAYSCALE"

L_.str.2:                               ## @.str.2
	.asciz	"GRAYSCALE_ALPHA"

L_.str.3:                               ## @.str.3
	.asciz	"RGB"

L_.str.4:                               ## @.str.4
	.asciz	"RGB_ALPHA"

L_.str.5:                               ## @.str.5
	.asciz	"P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\nTUPLTYPE %s\nENDHDR\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_pam_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pam_encode_frame
_pam_encode_frame:                      ; @pam_encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	w8, [x0, #8]
	sub	w8, w8, #128
	cmp	w8, #8
	b.hi	LBB0_3
; %bb.1:
	mov	x26, x3
	mov	x25, x2
	mov	x20, x1
	mov	x24, x0
	ldp	w21, w22, [x0]
Lloh0:
	adrp	x28, l_.str@PAGE
Lloh1:
	add	x28, x28, l_.str@PAGEOFF
	mov	w19, #1
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	mov	x23, x22
	mov	w27, #1
	br	x10
LBB0_2:
	lsl	w23, w22, #2
	mov	w27, #65535
	b	LBB0_10
LBB0_3:
	mov	w0, #-1
	b	LBB0_26
LBB0_4:
	lsl	w23, w22, #3
	mov	w27, #65535
	b	LBB0_6
LBB0_5:
	lsl	w23, w22, #2
	mov	w27, #255
LBB0_6:
	mov	w19, #4
Lloh4:
	adrp	x28, l_.str.4@PAGE
Lloh5:
	add	x28, x28, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_7:
	add	w8, w22, w22, lsl #1
	lsl	w23, w8, #1
Lloh6:
	adrp	x28, l_.str.3@PAGE
Lloh7:
	add	x28, x28, l_.str.3@PAGEOFF
	mov	w27, #65535
	mov	w19, #3
	b	LBB0_14
LBB0_8:
	add	w23, w22, w22, lsl #1
	mov	w27, #255
	mov	w19, #3
Lloh8:
	adrp	x28, l_.str.3@PAGE
Lloh9:
	add	x28, x28, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_9:
	lsl	w23, w22, #1
	mov	w27, #255
LBB0_10:
	mov	w19, #2
Lloh10:
	adrp	x28, l_.str.2@PAGE
Lloh11:
	add	x28, x28, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_11:
	mov	w27, #255
	mov	w19, #1
	mov	x23, x22
	b	LBB0_13
LBB0_12:
	lsl	w23, w22, #1
	mov	w27, #65535
	mov	w19, #1
LBB0_13:
Lloh12:
	adrp	x28, l_.str.1@PAGE
Lloh13:
	add	x28, x28, l_.str.1@PAGEOFF
LBB0_14:
	mul	w8, w23, w21
	add	w2, w8, #200
	mov	x0, x24
	mov	x1, x20
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_26
; %bb.15:
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x26, [x20]
	ldr	w1, [x20, #8]
Lloh14:
	adrp	x2, l_.str.5@PAGE
Lloh15:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x26
	mov	x3, x22
	mov	x4, x21
	mov	x5, x19
	mov	x6, x27
	mov	x7, x28
	bl	_snprintf
	mov	x0, x26
	bl	_strlen
	add	x27, x26, w0, sxtw #2
	ldp	x8, x9, [x25]
	ldr	x25, [x8]
	ldrsw	x8, [x9]
	ldr	w9, [x24, #8]
	cmp	w9, #133
	b.ne	LBB0_22
; %bb.16:
	cmp	w21, #1
	b.lt	LBB0_25
; %bb.17:
	mov	w9, #0
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x25, x25, x8, lsl #2
	add	w9, w9, #1
	cmp	w9, w21
	b.eq	LBB0_25
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	cmp	w22, #1
	b.lt	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	w10, #0
	mov	w11, #7
LBB0_21:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsr	w12, w10, #3
	ldr	w12, [x25, w12, uxtw #2]
	and	w13, w11, #0x7
	lsr	w12, w12, w13
	and	w12, w12, #0x1
	str	w12, [x27], #4
	add	w10, w10, #1
	sub	w11, w11, #1
	cmp	w22, w10
	b.ne	LBB0_21
	b	LBB0_18
LBB0_22:
	cmp	w21, #1
	b.lt	LBB0_25
; %bb.23:
	lsl	x19, x8, #2
	sbfiz	x22, x23, #2, #32
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x27
	mov	x1, x25
	mov	x2, x23
	bl	_memcpy
	add	x25, x25, x19
	add	x27, x27, x22
	subs	w21, w21, #1
	b.ne	LBB0_24
LBB0_25:
	mov	w0, #0
	sub	x8, x27, x26
	lsr	x8, x8, #2
Lloh16:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	ldr	w10, [x20, #12]
	orr	w9, w10, w9
	stp	w8, w9, [x20, #8]
	mov	w8, #1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
LBB0_26:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BLACKANDWHITE"

l_.str.1:                               ; @.str.1
	.asciz	"GRAYSCALE"

l_.str.2:                               ; @.str.2
	.asciz	"GRAYSCALE_ALPHA"

l_.str.3:                               ; @.str.3
	.asciz	"RGB"

l_.str.4:                               ; @.str.4
	.asciz	"RGB_ALPHA"

l_.str.5:                               ; @.str.5
	.asciz	"P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\nTUPLTYPE %s\nENDHDR\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_pam_encode_frame
.subsections_via_symbols
