	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_ptr_alignment
_calc_ptr_alignment:                    ## @calc_ptr_alignment
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_av_sample_fmt_is_planar
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movl	(%rbx), %eax
	testl	%eax, %eax
	jg	LBB0_2
## %bb.5:
	movl	$128, %ecx
	jmp	LBB0_25
LBB0_1:
	movl	$1, %eax
LBB0_2:
	movq	8(%rbx), %r10
	movl	%eax, %r8d
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.3:
	movl	$128, %ecx
	xorl	%ebx, %ebx
LBB0_18:
	testb	$1, %r8b
	je	LBB0_25
## %bb.19:
	movq	(%r10,%rbx,8), %rsi
	movl	$128, %eax
	movq	%rsi, %rdi
	shrq	$32, %rdi
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%rsi, %rax
	cqto
	idivq	%rbx
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	%ebx, %eax
	shrl	%eax
	testq	%rdx, %rdx
	je	LBB0_24
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ebx
	testq	%rdi, %rdi
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_23
LBB0_6:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	movl	$128, %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%ecx, %edi
	cmovll	%edi, %ecx
	addq	$2, %rbx
	cmpq	%r9, %rbx
	je	LBB0_18
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	movq	(%r10,%rbx,8), %rsi
	movl	$128, %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	%rsi, %rax
	cqto
	idivq	%rdi
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	%edi, %eax
	shrl	%eax
	testq	%rdx, %rdx
	je	LBB0_12
LBB0_8:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %edi
	movq	%rsi, %rax
	shrq	$32, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%ecx, %edi
	cmovll	%edi, %ecx
	leaq	(,%rbx,8), %rax
	orq	$8, %rax
	movq	(%r10,%rax), %rsi
	movl	$128, %eax
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rax
	cqto
	idivq	%rdi
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	%edi, %eax
	shrl	%eax
	testq	%rdx, %rdx
	je	LBB0_17
LBB0_13:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %edi
	movq	%rsi, %rax
	shrq	$32, %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_16
LBB0_24:
	cmpl	%ecx, %ebx
	cmovll	%ebx, %ecx
LBB0_25:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calc_ptr_alignment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_ptr_alignment
_calc_ptr_alignment:                    ; @calc_ptr_alignment
	.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, x0
	ldr	w0, [x0, #16]
	bl	_av_sample_fmt_is_planar
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w10, [x19]
	cmp	w10, #1
	b.ge	LBB0_4
; %bb.2:
	mov	w0, #128
	b	LBB0_8
LBB0_3:
	mov	w10, #1
LBB0_4:
	mov	x8, #0
	ldr	x9, [x19, #8]
	mov	w10, w10
	mov	w0, #128
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x11, [x9, x8, lsl #3]
	mov	w13, #128
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x12, x13
	mov	w13, w13
	sdiv	x14, x11, x13
	msub	x14, x14, x13, x11
	lsr	w13, w12, #1
	cbnz	x14, LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w12, w0
	csel	w0, w12, w0, lt
	add	x8, x8, #1
	cmp	x8, x10
	b.ne	LBB0_5
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calc_ptr_alignment
.subsections_via_symbols
