	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function apply_h264_level
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.space	4
	.space	4
LCPI0_2:
	.long	15                              ## 0xf
	.long	15                              ## 0xf
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_apply_h264_level
	.p2align	4, 0x90
_apply_h264_level:                      ## @apply_h264_level
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.1:
	movl	%r8d, %r12d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_hb_h264_level_names@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	(%r14), %r13
	movq	%rdx, %rdi
	movq	%r13, %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movq	_hb_h264_level_values@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	(%r12), %r15d
	testl	%r15d, %r15d
	je	LBB0_18
## %bb.3:
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	$4, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx), %r15d
	testl	%r15d, %r15d
	je	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14,%rbx,2), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_strcmp
	addq	$4, %rbx
	testl	%eax, %eax
	jne	LBB0_5
LBB0_7:
	movq	_x264_levels@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_18
## %bb.8:
	cmpl	%r15d, %eax
	jne	LBB0_12
## %bb.9:
	xorl	%eax, %eax
	movq	%rbx, %r13
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_hb_error
	jmp	LBB0_19
LBB0_11:
	xorl	%r12d, %r12d
	jmp	LBB0_20
LBB0_12:
	xorl	%eax, %eax
	movq	%rbx, %r13
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	40(%r13), %ecx
	testl	%ecx, %ecx
	je	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	addq	$40, %r13
	incq	%rax
	cmpl	%r15d, %ecx
	jne	LBB0_13
LBB0_15:
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movq	64(%r14), %rcx
	movq	_X264_RC_CRF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_21
## %bb.16:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	ucomisd	72(%r14), %xmm0
	jbe	LBB0_21
## %bb.17:
	movl	$4, %r8d
	movb	$1, %r9b
	jmp	LBB0_26
LBB0_18:
	leaq	L_.str(%rip), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_hb_error
LBB0_19:
	movl	$-1, %r12d
LBB0_20:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	cmpq	$0, 56(%r14)
	jne	LBB0_24
## %bb.22:
	movq	(%r14), %rcx
	movq	_X264_CQM_FLAT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_24
## %bb.23:
	movl	$4, %r8d
	jmp	LBB0_25
LBB0_24:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$10, (%rcx)
	movl	$12, %ecx
	movl	$5, %r8d
	cmovel	%ecx, %r8d
LBB0_25:
	xorl	%r9d, %r9d
LBB0_26:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	8(%r14), %xmm0                  ## xmm0 = mem[0],zero
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = <1,1,u,u>
	pcmpgtd	%xmm0, %xmm1
	pmovsxdq	%xmm1, %xmm1
	movmskpd	%xmm1, %ecx
	testl	%ecx, %ecx
	je	LBB0_28
## %bb.27:
	movd	%xmm0, %esi
	pextrd	$1, %xmm0, %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_hb_error
	jmp	LBB0_19
LBB0_28:
	movl	%eax, %eax
	leaq	(%rax,%rax,4), %rsi
	cmpq	$0, 32(%rbx,%rsi,8)
	movq	40(%r14), %rax
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_37
## %bb.29:
	testq	%rax, %rax
	jne	LBB0_31
## %bb.30:
	cmpq	$0, 104(%r14)
	je	LBB0_68
LBB0_31:
	testl	%edx, %edx
	je	LBB0_33
## %bb.32:
	movl	%r9d, %r15d
	leaq	L_.str.3(%rip), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	xorl	%eax, %eax
	movq	%r8, %r12
	callq	_hb_log
	movl	%r15d, %r9d
	movq	%r12, %r8
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%r14), %xmm0                  ## xmm0 = mem[0],zero
LBB0_33:
	movq	$0, 104(%r14)
	movq	$0, 40(%r14)
	movl	$1, %r12d
LBB0_34:
	paddd	LCPI0_2(%rip), %xmm0
	movdqa	%xmm0, %xmm1
	psrad	$31, %xmm1
	psrld	$28, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$4, %xmm1
LBB0_35:
	cmpq	$0, 104(%r14)
	jne	LBB0_38
## %bb.36:
	movd	%xmm1, %r15d
	pextrd	$1, %xmm1, %eax
	jmp	LBB0_39
LBB0_37:
	paddd	LCPI0_2(%rip), %xmm0
	psrld	$4, %xmm0
	xorl	%r12d, %r12d
	movdqa	%xmm0, %xmm1
	testq	%rax, %rax
	je	LBB0_35
LBB0_38:
	pextrd	$1, %xmm1, %eax
	incl	%eax
	andl	$-2, %eax
	movd	%xmm1, %r15d
LBB0_39:
	movl	%eax, %edi
	imull	%r15d, %edi
	movl	16(%r14), %ecx
	pxor	%xmm0, %xmm0
	movq	%xmm0, -96(%rbp)                ## 8-byte Folded Spill
	testl	%ecx, %ecx
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	jle	LBB0_42
## %bb.40:
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	movl	20(%r14), %edx
	testl	%edx, %edx
	jle	LBB0_43
## %bb.41:
	movl	%edx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%edx, %xmm0
	imull	%edi, %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ecx, %xmm1
	cltd
	idivl	%ecx
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	divss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, -96(%rbp)                ## 8-byte Spill
	jmp	LBB0_43
LBB0_42:
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
LBB0_43:
	cmpl	$1, 24(%r14)
	movl	%edi, -80(%rbp)                 ## 4-byte Spill
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	je	LBB0_48
## %bb.44:
	movl	%r9d, -72(%rbp)                 ## 4-byte Spill
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rbx, %r15
	movl	4(%rbx,%rsi,8), %eax
	cltd
	idivl	%edi
	movl	%eax, %edi
	movl	$16, %esi
	callq	_MIN
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_MAX
	movl	%eax, %ebx
	movl	28(%r14), %esi
	movl	%eax, %edi
	callq	_MIN
	movl	%eax, 28(%r14)
	cmpl	$1, %ebx
	jg	LBB0_46
## %bb.45:
	movq	$0, 96(%r14)
	movq	%r15, %rbx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	-72(%rbp), %r9d                 ## 4-byte Reload
	jmp	LBB0_48
LBB0_46:
	cmpl	$3, %ebx
	movq	%r15, %rbx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	-72(%rbp), %r9d                 ## 4-byte Reload
	ja	LBB0_48
## %bb.47:
	movq	_X264_B_PYRAMID_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%r14)
LBB0_48:
	testb	%r9b, %r9b
	jne	LBB0_54
## %bb.49:
	movl	80(%r14), %edi
	movl	8(%rbx,%rsi,8), %ecx
	imull	%r8d, %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	testl	%edi, %edi
	je	LBB0_51
## %bb.50:
	movl	%eax, %esi
	movq	%r8, %r15
	callq	_MIN
	movq	%r15, %r8
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
LBB0_51:
	movl	%eax, 80(%r14)
	movl	84(%r14), %edi
	imull	12(%rbx,%rsi,8), %r8d
	leal	3(%r8), %eax
	testl	%r8d, %r8d
	cmovnsl	%r8d, %eax
	sarl	$2, %eax
	testl	%edi, %edi
	je	LBB0_53
## %bb.52:
	movl	%eax, %esi
	callq	_MIN
LBB0_53:
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%eax, 84(%r14)
LBB0_54:
	movl	48(%r14), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rbx,%rax,8), %esi
	cmpq	$0, 40(%r14)
	setne	%cl
	sarl	%cl, %esi
	callq	_MIN
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 48(%r14)
	movq	%rbx, %rax
	leaq	(%rbx,%rdx,8), %rbx
	addq	$20, %rbx
	movl	20(%rax,%rdx,8), %r9d
	movl	-80(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r9d
	jge	LBB0_57
## %bb.55:
	movl	$1, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_60
## %bb.56:
	movl	%r15d, %esi
	shll	$4, %esi
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	shll	$4, %edx
	leaq	L_.str.4(%rip), %rdi
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_hb_log
	jmp	LBB0_60
LBB0_57:
	movl	24(%rax,%rdx,8), %eax
	cmpl	-68(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_60
## %bb.58:
	movl	$1, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_60
## %bb.59:
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ecx, %xmm1
	movl	8(%r14), %edx
	movl	12(%r14), %ecx
	divss	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm1
	leaq	L_.str.5(%rip), %rdi
	movq	-96(%rbp), %xmm0                ## 8-byte Folded Reload
                                        ## xmm0 = mem[0],zero
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movb	$2, %al
	callq	_hb_log
LBB0_60:
	movl	(%rbx), %edi
	shll	$3, %edi
	callq	_sqrt
	movl	%eax, %ebx
	cmpl	%eax, %r15d
	jle	LBB0_63
## %bb.61:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_66
## %bb.62:
	movl	8(%r14), %esi
	movl	%ebx, %ecx
	shll	$4, %ecx
	leaq	L_.str.6(%rip), %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_hb_log
	movl	$1, %r12d
LBB0_63:
	cmpl	%ebx, -76(%rbp)                 ## 4-byte Folded Reload
	jle	LBB0_67
## %bb.64:
	movl	$1, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_67
## %bb.65:
	movl	12(%r14), %esi
	shll	$4, %ebx
	leaq	L_.str.7(%rip), %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_hb_log
	jmp	LBB0_67
LBB0_66:
	movl	$1, %r12d
LBB0_67:
	movl	(%r13), %eax
	movl	%eax, 32(%r14)
	jmp	LBB0_20
LBB0_68:
	xorl	%r12d, %r12d
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_hb_h264_level_names,8,3        ## @hb_h264_level_names
	.comm	_hb_h264_level_values,8,3       ## @hb_h264_level_values
	.comm	_x264_levels,8,3                ## @x264_levels
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"apply_h264_level: invalid level %s"

L_.str.1:                               ## @.str.1
	.asciz	"apply_h264_level: no level specified"

	.comm	_X264_RC_CRF,8,3                ## @X264_RC_CRF
	.comm	_X264_CQM_FLAT,8,3              ## @X264_CQM_FLAT
L_.str.2:                               ## @.str.2
	.asciz	"apply_h264_level: invalid resolution (width: %d, height: %d)"

L_.str.3:                               ## @.str.3
	.asciz	"apply_h264_level [warning]: interlaced flag not supported for level %s, disabling"

	.comm	_X264_B_PYRAMID_NONE,4,2        ## @X264_B_PYRAMID_NONE
L_.str.4:                               ## @.str.4
	.asciz	"apply_h264_level [warning]: frame size (%dx%d, %d macroblocks) too high for level %s (max. %d macroblocks)"

L_.str.5:                               ## @.str.5
	.asciz	"apply_h264_level [warning]: framerate (%.3f) too high for level %s at %dx%d (max. %.3f)"

L_.str.6:                               ## @.str.6
	.asciz	"apply_h264_level [warning]: frame too wide (%d) for level %s (max. %d)"

L_.str.7:                               ## @.str.7
	.asciz	"apply_h264_level [warning]: frame too tall (%d) for level %s (max. %d)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_apply_h264_level               ; -- Begin function apply_h264_level
	.p2align	2
_apply_h264_level:                      ; @apply_h264_level
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	d9, d8, [sp, #64]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	cbz	x2, LBB0_10
; %bb.1:
	mov	x21, x4
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _hb_h264_level_names@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hb_h264_level_names@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	ldr	x23, [x24]
	mov	x0, x2
	mov	x1, x23
	bl	_strcasecmp
	cbz	x0, LBB0_11
; %bb.2:
Lloh3:
	adrp	x8, _hb_h264_level_values@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hb_h264_level_values@GOTPAGEOFF]
Lloh5:
	ldr	x25, [x8]
	ldr	w26, [x25]
	cbz	w26, LBB0_18
; %bb.3:
	mov	x0, x23
	mov	x1, x20
	bl	_strcmp
	cbz	w0, LBB0_7
; %bb.4:
	add	x23, x24, #8
	add	x24, x25, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w26, [x24]
	cbz	w26, LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x23], #8
	mov	x1, x20
	bl	_strcmp
	add	x24, x24, #4
	cbnz	w0, LBB0_5
LBB0_7:
Lloh6:
	adrp	x8, _x264_levels@GOTPAGE
Lloh7:
	ldr	x8, [x8, _x264_levels@GOTPAGEOFF]
Lloh8:
	ldr	x25, [x8]
	ldr	w8, [x25]
	cbz	w8, LBB0_18
; %bb.8:
	cmp	w8, w26
	b.ne	LBB0_12
; %bb.9:
	mov	x8, #0
	mov	x24, x25
	b	LBB0_15
LBB0_10:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_11:
	mov	w22, #0
	b	LBB0_20
LBB0_12:
	mov	x8, #0
	mov	x24, x25
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x24, #40]
	cbz	w9, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x24, x24, #40
	add	x8, x8, #1
	cmp	w9, w26
	b.ne	LBB0_13
LBB0_15:
	ldr	x9, [x19, #64]
Lloh11:
	adrp	x10, _X264_RC_CRF@GOTPAGE
Lloh12:
	ldr	x10, [x10, _X264_RC_CRF@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_21
; %bb.16:
	ldr	d0, [x19, #72]
	fmov	d1, #1.00000000
	fcmp	d0, d1
	b.pl	LBB0_21
; %bb.17:
	mov	w23, #4
	mov	w27, #1
	b	LBB0_25
LBB0_18:
	str	x20, [sp]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
LBB0_19:
	bl	_hb_error
	mov	w22, #-1
LBB0_20:
	mov	x0, x22
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #64]               ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_21:
	ldr	x9, [x19, #56]
	cbnz	x9, LBB0_24
; %bb.22:
	ldr	x9, [x19]
Lloh16:
	adrp	x10, _X264_CQM_FLAT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _X264_CQM_FLAT@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_24
; %bb.23:
	mov	w27, #0
	mov	w23, #4
	b	LBB0_25
LBB0_24:
	mov	w27, #0
	ldr	w9, [x22]
	mov	w10, #5
	mov	w11, #12
	cmp	w9, #10
	csel	w23, w11, w10, eq
LBB0_25:
	ldp	w10, w9, [x19, #8]
	cmp	w10, #1
	b.lt	LBB0_35
; %bb.26:
	cmp	w9, #0
	b.le	LBB0_35
; %bb.27:
	and	x28, x8, #0xffffffff
	mov	w8, #40
	madd	x8, x28, x8, x25
	ldr	x11, [x8, #32]
	ldr	x8, [x19, #40]
	cbz	x11, LBB0_36
; %bb.28:
	cbnz	x8, LBB0_30
; %bb.29:
	ldr	x8, [x19, #104]
	cbz	x8, LBB0_69
LBB0_30:
	cbz	w21, LBB0_32
; %bb.31:
	str	x20, [sp]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_hb_log
	ldp	w10, w9, [x19, #8]
LBB0_32:
	str	xzr, [x19, #104]
	str	xzr, [x19, #40]
	mov	w22, #1
LBB0_33:
	add	w8, w10, #15
	add	w10, w10, #30
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w10, w8, #4
	add	w8, w9, #15
	add	w9, w9, #30
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w26, w8, #4
LBB0_34:
	ldr	x8, [x19, #104]
	cbnz	x8, LBB0_37
	b	LBB0_38
LBB0_35:
	stp	x10, x9, [sp]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_36:
	mov	w22, #0
	add	w10, w10, #15
	lsr	w10, w10, #4
	add	w9, w9, #15
	lsr	w26, w9, #4
	cbz	x8, LBB0_34
LBB0_37:
	add	w8, w26, #1
	and	w26, w8, #0xfffffffe
LBB0_38:
	str	w10, [sp, #60]                  ; 4-byte Folded Spill
	mul	w11, w26, w10
	ldr	w8, [x19, #16]
	movi	d8, #0000000000000000
	cmp	w8, #1
	b.lt	LBB0_41
; %bb.39:
	ldr	w9, [x19, #20]
	cmp	w9, #1
	b.lt	LBB0_41
; %bb.40:
	mul	w10, w9, w11
	sdiv	w10, w10, w8
	str	w10, [sp, #44]                  ; 4-byte Folded Spill
	scvtf	s0, w9
	scvtf	s1, w8
	fdiv	s0, s0, s1
	fcvt	d8, s0
	b	LBB0_42
LBB0_41:
	str	wzr, [sp, #44]                  ; 4-byte Folded Spill
LBB0_42:
	ldr	w8, [x19, #24]
	cmp	w8, #1
	str	x11, [sp, #48]                  ; 8-byte Folded Spill
	b.eq	LBB0_47
; %bb.43:
	str	w27, [sp, #40]                  ; 4-byte Folded Spill
	mov	x27, x26
	mov	x26, x23
	mov	w8, #40
	madd	x8, x28, x8, x25
	ldr	w8, [x8, #4]
	sdiv	w0, w8, w11
	mov	w1, #16
	bl	_MIN
	mov	w1, #1
	bl	_MAX
	mov	x23, x0
	ldr	w1, [x19, #28]
	bl	_MIN
	str	w0, [x19, #28]
	cmp	w23, #1
	b.gt	LBB0_45
; %bb.44:
	str	xzr, [x19, #96]
	mov	x23, x26
	mov	x26, x27
	ldr	w27, [sp, #40]                  ; 4-byte Folded Reload
	b	LBB0_47
LBB0_45:
	cmp	w23, #3
	mov	x23, x26
	mov	x26, x27
	ldr	w27, [sp, #40]                  ; 4-byte Folded Reload
	b.hi	LBB0_47
; %bb.46:
Lloh23:
	adrp	x8, _X264_B_PYRAMID_NONE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _X264_B_PYRAMID_NONE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #88]
LBB0_47:
	tbnz	w27, #0, LBB0_53
; %bb.48:
	ldr	w0, [x19, #80]
	mov	w8, #40
	madd	x8, x28, x8, x25
	ldr	w8, [x8, #8]
	mul	w8, w8, w23
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #2
	cbz	w0, LBB0_50
; %bb.49:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_MIN
	mov	x1, x0
LBB0_50:
	str	w1, [x19, #80]
	ldr	w0, [x19, #84]
	mov	w8, #40
	madd	x8, x28, x8, x25
	ldr	w8, [x8, #12]
	mul	w8, w8, w23
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #2
	cbz	w0, LBB0_52
; %bb.51:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_MIN
	mov	x1, x0
LBB0_52:
	str	w1, [x19, #84]
LBB0_53:
	ldr	w0, [x19, #48]
	mov	w8, #40
	madd	x23, x28, x8, x25
	ldr	w8, [x23, #16]
	ldr	x9, [x19, #40]
	cmp	x9, #0
	cset	w9, ne
	asr	w1, w8, w9
	bl	_MIN
	str	w0, [x19, #48]
	ldr	w8, [x23, #20]!
	ldr	x11, [sp, #48]                  ; 8-byte Folded Reload
	cmp	w8, w11
	b.ge	LBB0_56
; %bb.54:
	cbz	w21, LBB0_60
; %bb.55:
	ldr	w9, [sp, #60]                   ; 4-byte Folded Reload
	lsl	w9, w9, #4
	lsl	w10, w26, #4
	stp	x20, x8, [sp, #24]
	stp	x10, x11, [sp, #8]
	str	x9, [sp]
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_59
LBB0_56:
	mov	w8, #40
	madd	x8, x28, x8, x25
	ldr	w8, [x8, #24]
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.ge	LBB0_61
; %bb.57:
	cbz	w21, LBB0_60
; %bb.58:
	scvtf	s0, w8
	scvtf	s1, w11
	fdiv	s0, s0, s1
	fcvt	d0, s0
	ldp	w8, w9, [x19, #8]
	str	d0, [sp, #32]
	stp	x8, x9, [sp, #16]
	str	x20, [sp, #8]
	str	d8, [sp]
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_59:
	bl	_hb_log
LBB0_60:
	mov	w22, #1
LBB0_61:
	ldr	w8, [x23]
	lsl	w0, w8, #3
	bl	_sqrt
	mov	x23, x0
	ldr	w8, [sp, #60]                   ; 4-byte Folded Reload
	cmp	w8, w0
	b.le	LBB0_64
; %bb.62:
	cbz	w21, LBB0_67
; %bb.63:
	lsl	w8, w23, #4
	ldr	w9, [x19, #8]
	stp	x20, x8, [sp, #8]
	str	x9, [sp]
Lloh30:
	adrp	x0, l_.str.6@PAGE
Lloh31:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_hb_log
	mov	w22, #1
LBB0_64:
	cmp	w26, w23
	b.le	LBB0_68
; %bb.65:
	cbz	w21, LBB0_67
; %bb.66:
	lsl	w8, w23, #4
	ldr	w9, [x19, #12]
	stp	x20, x8, [sp, #8]
	str	x9, [sp]
Lloh32:
	adrp	x0, l_.str.7@PAGE
Lloh33:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_hb_log
LBB0_67:
	mov	w22, #1
LBB0_68:
	ldr	w8, [x24]
	str	w8, [x19, #32]
	b	LBB0_20
LBB0_69:
	mov	w22, #0
	b	LBB0_33
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_hb_h264_level_names,8,3        ; @hb_h264_level_names
	.comm	_hb_h264_level_values,8,3       ; @hb_h264_level_values
	.comm	_x264_levels,8,3                ; @x264_levels
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"apply_h264_level: invalid level %s"

l_.str.1:                               ; @.str.1
	.asciz	"apply_h264_level: no level specified"

	.comm	_X264_RC_CRF,8,3                ; @X264_RC_CRF
	.comm	_X264_CQM_FLAT,8,3              ; @X264_CQM_FLAT
l_.str.2:                               ; @.str.2
	.asciz	"apply_h264_level: invalid resolution (width: %d, height: %d)"

l_.str.3:                               ; @.str.3
	.asciz	"apply_h264_level [warning]: interlaced flag not supported for level %s, disabling"

	.comm	_X264_B_PYRAMID_NONE,4,2        ; @X264_B_PYRAMID_NONE
l_.str.4:                               ; @.str.4
	.asciz	"apply_h264_level [warning]: frame size (%dx%d, %d macroblocks) too high for level %s (max. %d macroblocks)"

l_.str.5:                               ; @.str.5
	.asciz	"apply_h264_level [warning]: framerate (%.3f) too high for level %s at %dx%d (max. %.3f)"

l_.str.6:                               ; @.str.6
	.asciz	"apply_h264_level [warning]: frame too wide (%d) for level %s (max. %d)"

l_.str.7:                               ; @.str.7
	.asciz	"apply_h264_level [warning]: frame too tall (%d) for level %s (max. %d)"

.subsections_via_symbols
