	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7146_set_clipping_rect
_saa7146_set_clipping_rect:             ## @saa7146_set_clipping_rect
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r14
	movl	8(%rax), %r15d
	movq	_CLIP_FORMAT_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_saa7146_read
	movl	%eax, -44(%rbp)
	movq	_PCI_BT_V1@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_saa7146_read
	movl	%eax, -48(%rbp)
	leaq	-72(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %r9d
	callq	_calculate_clipping_registers_rect
	movl	$-65528, %eax                   ## imm = 0xFFFF0008
	andl	-44(%rbp), %eax
	movq	_SAA7146_CLIPPING_RECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$4, %ecx
	orl	%eax, %ecx
	movl	%ecx, -44(%rbp)
	movq	_BASE_EVEN2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-72(%rbp), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movq	_BASE_ODD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-68(%rbp), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movq	_PROT_ADDR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-64(%rbp), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movq	_BASE_PAGE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movq	_PITCH2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movq	_NUM_LINE_BYTE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movl	(%r13), %esi
	movl	-48(%rbp), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movq	_MASK_05@GOTPCREL(%rip), %r14
	movq	_MASK_21@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	orl	(%r14), %edx
	movq	_MC2@GOTPCREL(%rip), %rax
	movq	_MASK_03@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_MASK_19@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	movq	_MC1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	orl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_saa7146_write
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_saa7146_disable_clipping       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CLIP_FORMAT_CTRL,4,2           ## @CLIP_FORMAT_CTRL
	.comm	_PCI_BT_V1,4,2                  ## @PCI_BT_V1
	.comm	_SAA7146_CLIPPING_RECT,4,2      ## @SAA7146_CLIPPING_RECT
	.comm	_BASE_EVEN2,4,2                 ## @BASE_EVEN2
	.comm	_BASE_ODD2,4,2                  ## @BASE_ODD2
	.comm	_PROT_ADDR2,4,2                 ## @PROT_ADDR2
	.comm	_BASE_PAGE2,4,2                 ## @BASE_PAGE2
	.comm	_PITCH2,4,2                     ## @PITCH2
	.comm	_NUM_LINE_BYTE2,4,2             ## @NUM_LINE_BYTE2
	.comm	_MC2,4,2                        ## @MC2
	.comm	_MASK_05,4,2                    ## @MASK_05
	.comm	_MASK_21,4,2                    ## @MASK_21
	.comm	_MASK_03,4,2                    ## @MASK_03
	.comm	_MASK_19,4,2                    ## @MASK_19
	.comm	_MC1,4,2                        ## @MC1
	.no_dead_strip	_saa7146_set_clipping_rect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7146_set_clipping_rect
_saa7146_set_clipping_rect:             ; @saa7146_set_clipping_rect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x19, [x0]
	ldr	x8, [x19]
	ldr	x9, [x8]
	cbz	x9, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w21, [x8, #8]
Lloh0:
	adrp	x22, _CLIP_FORMAT_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CLIP_FORMAT_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_saa7146_read
	str	w0, [sp, #4]
Lloh2:
	adrp	x23, _PCI_BT_V1@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PCI_BT_V1@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_saa7146_read
	str	w0, [sp]
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x4, sp
	mov	x0, x19
	mov	x1, x20
	mov	x5, x21
	bl	_calculate_clipping_registers_rect
	ldp	w8, w2, [sp, #4]
	mov	w9, #-65528
	and	w8, w8, w9
Lloh4:
	adrp	x9, _SAA7146_CLIPPING_RECT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SAA7146_CLIPPING_RECT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w8, w8, w9, lsl #4
	str	w8, [sp, #4]
Lloh7:
	adrp	x8, _BASE_EVEN2@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BASE_EVEN2@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_saa7146_write
Lloh10:
	adrp	x8, _BASE_ODD2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BASE_ODD2@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_saa7146_write
Lloh13:
	adrp	x8, _PROT_ADDR2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PROT_ADDR2@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w2, [sp, #16]
	mov	x0, x19
	bl	_saa7146_write
Lloh16:
	adrp	x8, _BASE_PAGE2@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BASE_PAGE2@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [sp, #20]
	mov	x0, x19
	bl	_saa7146_write
Lloh19:
	adrp	x8, _PITCH2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PITCH2@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [sp, #24]
	mov	x0, x19
	bl	_saa7146_write
Lloh22:
	adrp	x8, _NUM_LINE_BYTE2@GOTPAGE
Lloh23:
	ldr	x8, [x8, _NUM_LINE_BYTE2@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w2, [sp, #28]
	mov	x0, x19
	bl	_saa7146_write
	ldr	w1, [x22]
	ldr	w2, [sp, #4]
	mov	x0, x19
	bl	_saa7146_write
	ldr	w1, [x23]
	ldr	w2, [sp]
	mov	x0, x19
	bl	_saa7146_write
Lloh25:
	adrp	x8, _MC2@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MC2@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x20, _MASK_05@GOTPAGE
Lloh29:
	ldr	x20, [x20, _MASK_05@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh30:
	adrp	x21, _MASK_21@GOTPAGE
Lloh31:
	ldr	x21, [x21, _MASK_21@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w9, w8
Lloh32:
	adrp	x9, _MASK_03@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MASK_03@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh35:
	adrp	x9, _MASK_19@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MASK_19@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_saa7146_write
Lloh38:
	adrp	x8, _MC1@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MC1@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	ldr	w8, [x20]
	ldr	w9, [x21]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_saa7146_disable_clipping
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CLIP_FORMAT_CTRL,4,2           ; @CLIP_FORMAT_CTRL
	.comm	_PCI_BT_V1,4,2                  ; @PCI_BT_V1
	.comm	_SAA7146_CLIPPING_RECT,4,2      ; @SAA7146_CLIPPING_RECT
	.comm	_BASE_EVEN2,4,2                 ; @BASE_EVEN2
	.comm	_BASE_ODD2,4,2                  ; @BASE_ODD2
	.comm	_PROT_ADDR2,4,2                 ; @PROT_ADDR2
	.comm	_BASE_PAGE2,4,2                 ; @BASE_PAGE2
	.comm	_PITCH2,4,2                     ; @PITCH2
	.comm	_NUM_LINE_BYTE2,4,2             ; @NUM_LINE_BYTE2
	.comm	_MC2,4,2                        ; @MC2
	.comm	_MASK_05,4,2                    ; @MASK_05
	.comm	_MASK_21,4,2                    ; @MASK_21
	.comm	_MASK_03,4,2                    ; @MASK_03
	.comm	_MASK_19,4,2                    ; @MASK_19
	.comm	_MC1,4,2                        ; @MC1
	.no_dead_strip	_saa7146_set_clipping_rect
.subsections_via_symbols
