	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_resize_coeffs
_calc_resize_coeffs:                    ## @calc_resize_coeffs
	.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	(%rdi), %rax
	movq	(%rax), %rdi
	cmpl	$4097, %esi                     ## imm = 0x1001
	jl	LBB0_3
## %bb.1:
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%rcx, %r14
	movl	%edx, %ecx
	cmpl	$1025, %edx                     ## imm = 0x401
	jl	LBB0_5
## %bb.4:
	movl	(%rdi), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	leal	(,%rcx,4), %eax
	cmpl	%esi, %eax
	jge	LBB0_6
## %bb.18:
	movl	(%rdi), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	leal	(%rcx,%rcx), %edx
	xorl	%eax, %eax
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$1, %eax
	ja	LBB0_10
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	sarl	%esi
	incl	%eax
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$1024, %esi                     ## imm = 0x400
	jg	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%edx, %esi
	jl	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$2, %eax
	jb	LBB0_13
LBB0_10:
	movl	%eax, (%r8)
	movslq	%esi, %rax
	shlq	$13, %rax
	addq	$-8192, %rax                    ## imm = 0xE000
	decl	%ecx
	movslq	%ecx, %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_11
## %bb.14:
	cqto
	idivq	%rsi
	jmp	LBB0_15
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_15:
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	cmpl	$16384, %eax                    ## imm = 0x4000
	jl	LBB0_17
## %bb.16:
	movl	(%rdi), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	movl	$16383, (%r14)                  ## imm = 0x3FFF
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported resize (in_size > 4096)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported resize (out_size > 1024)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unsupported downsize\n"

L_.str.3:                               ## @.str.3
	.asciz	"Warning! Overflow on resize coeff.\n"

	.no_dead_strip	_calc_resize_coeffs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_resize_coeffs
_calc_resize_coeffs:                    ; @calc_resize_coeffs
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	cmp	w1, #1, lsl #12                 ; =4096
	b.le	LBB0_2
; %bb.1:
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	cmp	w2, #1025
	b.lt	LBB0_4
; %bb.3:
	ldr	w0, [x8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	cmp	w1, w2, lsl #2
	b.le	LBB0_8
; %bb.5:
	ldr	w0, [x8]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	bl	_dev_err
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x19, x3
	mov	w9, #0
	lsl	w10, w2, #1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	cmp	w9, #1
	b.hi	LBB0_14
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	asr	w1, w1, #1
	add	w9, w9, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cmp	w1, #1024
	b.gt	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w1, w10
	b.lt	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w9, #2
	b.lo	LBB0_10
LBB0_14:
	str	w9, [x4]
	sub	w9, w1, #1
	sbfiz	x9, x9, #13, #32
	sub	w10, w2, #1
	sxtw	x10, w10
	sdiv	x9, x9, x10
	str	w9, [x19]
	cmp	w9, #4, lsl #12                 ; =16384
	b.lt	LBB0_16
; %bb.15:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	mov	w0, #0
	mov	w8, #16383
	str	w8, [x19]
	b	LBB0_7
LBB0_16:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported resize (in_size > 4096)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported resize (out_size > 1024)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unsupported downsize\n"

l_.str.3:                               ; @.str.3
	.asciz	"Warning! Overflow on resize coeff.\n"

	.no_dead_strip	_calc_resize_coeffs
.subsections_via_symbols
