	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bdisp_hw_get_op_cfg
_bdisp_hw_get_op_cfg:                   ## @bdisp_hw_get_op_cfg
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	56(%rdi), %rax
	movq	(%rax), %r14
	movl	32(%rdi), %eax
	movq	_MAX_SRC_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MAX_VERTICAL_STRIDES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	%ecx, %edx
	cmpl	%edx, %eax
	jle	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%rsi, %rbx
	xorl	%edx, %edx
	cmpl	%ecx, %eax
	setg	%dl
	movl	%edx, (%rsi)
	movl	4(%rdi), %eax
	movl	%eax, 52(%rsi)
	movl	(%rdi), %eax
	movl	%eax, 48(%rsi)
	movq	40(%rdi), %rax
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movl	%edx, 4(%rsi)
	movq	48(%rdi), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 44(%rsi)
	movq	(%rax), %rax
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	cmpq	%r8, %rax
	sete	%dl
	movq	_V4L2_PIX_FMT_YUV420@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	%rsi, %rax
	sete	%al
	orb	%dl, %al
	movzbl	%al, %eax
	movl	%eax, 8(%rbx)
	movl	%eax, 12(%rbx)
	movq	24(%rdi), %rdx
	movl	8(%rdx), %ecx
	movl	%ecx, 40(%rbx)
	movq	(%rdx), %rcx
	cmpq	%r8, %rcx
	sete	%dl
	cmpq	%rsi, %rcx
	sete	%cl
	orb	%dl, %cl
	movzbl	%cl, %ecx
	movl	%ecx, 16(%rbx)
	movl	%ecx, 20(%rbx)
	xorb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, 24(%rbx)
	leaq	28(%rbx), %r12
	leaq	32(%rbx), %r15
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_bdisp_hw_get_hv_inc
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpl	$0, 4(%rbx)
	je	LBB0_7
## %bb.6:
	movl	(%r15), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, (%r15)
LBB0_7:
	cmpl	$1024, (%r12)                   ## imm = 0x400
	jne	LBB0_9
## %bb.8:
	cmpl	$1024, (%r15)                   ## imm = 0x400
	jne	LBB0_9
## %bb.10:
	movl	$0, 36(%rbx)
	jmp	LBB0_11
LBB0_9:
	movl	$1, 36(%rbx)
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SRC_WIDTH,4,2              ## @MAX_SRC_WIDTH
	.comm	_MAX_VERTICAL_STRIDES,4,2       ## @MAX_VERTICAL_STRIDES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Image width out of HW caps\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FIELD_INTERLACED,8,3      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_PIX_FMT_NV12,8,3          ## @V4L2_PIX_FMT_NV12
	.comm	_V4L2_PIX_FMT_YUV420,8,3        ## @V4L2_PIX_FMT_YUV420
L_.str.1:                               ## @.str.1
	.asciz	"Scale factor out of HW caps\n"

	.no_dead_strip	_bdisp_hw_get_op_cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bdisp_hw_get_op_cfg
_bdisp_hw_get_op_cfg:                   ; @bdisp_hw_get_op_cfg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #56]
	ldr	x20, [x8]
	ldr	w8, [x0, #32]
Lloh0:
	adrp	x9, _MAX_SRC_WIDTH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_SRC_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _MAX_VERTICAL_STRIDES@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAX_VERTICAL_STRIDES@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	mul	w10, w10, w9
	cmp	w8, w10
	b.le	LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x19, x1
	cmp	w8, w9
	cset	w8, gt
	str	w8, [x1]
	ldr	d0, [x0]
	str	d0, [x1, #48]
Lloh8:
	adrp	x8, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldp	x9, x10, [x0, #40]
	cmp	x9, x8
	cset	w8, eq
	str	w8, [x1, #4]
	ldr	w8, [x10, #8]
Lloh11:
	adrp	x9, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh12:
	ldr	x9, [x9, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
	ldr	x10, [x10]
Lloh13:
	ldr	x9, [x9]
	cmp	x10, x9
Lloh14:
	adrp	x11, _V4L2_PIX_FMT_YUV420@GOTPAGE
Lloh15:
	ldr	x11, [x11, _V4L2_PIX_FMT_YUV420@GOTPAGEOFF]
Lloh16:
	ldr	x11, [x11]
	ccmp	x10, x11, #4, ne
	cset	w10, eq
	stp	w10, w10, [x1, #8]
	ldr	x12, [x0, #24]
	ldr	w13, [x12, #8]
	stp	w13, w8, [x1, #40]
	ldr	x8, [x12]
	cmp	x8, x9
	ccmp	x8, x11, #4, ne
	cset	w8, eq
	stp	w8, w8, [x1, #16]
	eor	w8, w10, w8
	str	w8, [x1, #24]
	add	x22, x1, #28
	add	x21, x1, #32
	mov	x1, x22
	mov	x2, x21
	bl	_bdisp_hw_get_hv_inc
	cbz	x0, LBB0_6
; %bb.3:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x20
	bl	_dev_err
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	w8, [x21]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [x21]
LBB0_8:
	ldr	w8, [x22]
	cmp	w8, #1024
	b.ne	LBB0_11
; %bb.9:
	ldr	w8, [x21]
	cmp	w8, #1024
	b.ne	LBB0_11
; %bb.10:
	mov	w0, #0
	str	wzr, [x19, #36]
	b	LBB0_5
LBB0_11:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #36]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SRC_WIDTH,4,2              ; @MAX_SRC_WIDTH
	.comm	_MAX_VERTICAL_STRIDES,4,2       ; @MAX_VERTICAL_STRIDES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Image width out of HW caps\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FIELD_INTERLACED,8,3      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_PIX_FMT_NV12,8,3          ; @V4L2_PIX_FMT_NV12
	.comm	_V4L2_PIX_FMT_YUV420,8,3        ; @V4L2_PIX_FMT_YUV420
l_.str.1:                               ; @.str.1
	.asciz	"Scale factor out of HW caps\n"

	.no_dead_strip	_bdisp_hw_get_op_cfg
.subsections_via_symbols
