	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp5150_fill_fmt
_tvp5150_fill_fmt:                      ## @tvp5150_fill_fmt
	.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	%rdx, %rbx
	movq	%rdi, %r14
	callq	_to_tvp5150
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rcx
	movq	_TVP5150_PAD_VID_OUT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.3:
	movl	4(%rax), %r8d
	movl	%r8d, 12(%rbx)
	movl	(%rax), %eax
	movl	%eax, %r9d
	shrl	$31, %r9d
	addl	%eax, %r9d
	sarl	%r9d
	movl	%r9d, 8(%rbx)
	movq	_TVP5150_MBUS_FMT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_TVP5150_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_TVP5150_COLORSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	(%r14), %edi
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movl	$1, %esi
	callq	_dev_dbg_lvl
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TVP5150_PAD_VID_OUT,8,3        ## @TVP5150_PAD_VID_OUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TVP5150_MBUS_FMT,4,2           ## @TVP5150_MBUS_FMT
	.comm	_TVP5150_FIELD,4,2              ## @TVP5150_FIELD
	.comm	_TVP5150_COLORSPACE,4,2         ## @TVP5150_COLORSPACE
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"width = %d, height = %d\n"

	.no_dead_strip	_tvp5150_fill_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp5150_fill_fmt
_tvp5150_fill_fmt:                      ; @tvp5150_fill_fmt
	.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	x20, x2
	mov	x19, x0
	bl	_to_tvp5150
	cbz	x20, LBB0_3
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _TVP5150_PAD_VID_OUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TVP5150_PAD_VID_OUT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldp	w8, w4, [x0]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w5, w8, #1
	stp	w5, w4, [x20, #8]
Lloh3:
	adrp	x8, _TVP5150_MBUS_FMT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TVP5150_MBUS_FMT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #24]
Lloh6:
	adrp	x8, _TVP5150_FIELD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TVP5150_FIELD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _TVP5150_COLORSPACE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TVP5150_COLORSPACE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #16]
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _debug@GOTPAGE
Lloh13:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x3, l_.str@PAGE
Lloh16:
	add	x3, x3, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dev_dbg_lvl
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TVP5150_PAD_VID_OUT,8,3        ; @TVP5150_PAD_VID_OUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TVP5150_MBUS_FMT,4,2           ; @TVP5150_MBUS_FMT
	.comm	_TVP5150_FIELD,4,2              ; @TVP5150_FIELD
	.comm	_TVP5150_COLORSPACE,4,2         ; @TVP5150_COLORSPACE
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"width = %d, height = %d\n"

	.no_dead_strip	_tvp5150_fill_fmt
.subsections_via_symbols
