	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_xrgb8888_to_rgb565      ## -- Begin function drm_fb_xrgb8888_to_rgb565
	.p2align	4, 0x90
_drm_fb_xrgb8888_to_rgb565:             ## @drm_fb_xrgb8888_to_rgb565
	.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
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rcx), %rax
	subq	8(%rcx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,4), %r14
	movl	16(%rcx), %r13d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	20(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$4, %edx
	callq	_clip_offset
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r13d
	je	LBB0_4
## %bb.2:
	subl	%ecx, %r13d
	cltq
	addq	%rax, %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_drm_fb_xrgb8888_to_rgb565_line
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	(%rax), %rax
	addq	%rax, %r12
	addq	%r14, %rbx
	decl	%r13d
	jne	LBB0_3
LBB0_4:
	movq	%r15, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_xrgb8888_to_rgb565      ; -- Begin function drm_fb_xrgb8888_to_rgb565
	.p2align	2
_drm_fb_xrgb8888_to_rgb565:             ; @drm_fb_xrgb8888_to_rgb565
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x26, x3
	mov	x20, x2
	mov	x25, x1
	mov	x21, x0
	ldp	x8, x9, [x3]
	sub	x22, x8, x9
	lsl	x23, x22, #2
	ldp	w27, w28, [x3, #16]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x24, x0
	ldr	x8, [x20]
	ldr	w1, [x8]
	mov	x0, x26
	mov	w2, #4
	bl	_clip_offset
	cmp	w27, w28
	b.eq	LBB0_4
; %bb.2:
	sub	w26, w27, w28
	add	x25, x25, w0, sxtw
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	bl	_memcpy
	mov	x0, x21
	mov	x1, x24
	mov	x2, x22
	mov	x3, x19
	bl	_drm_fb_xrgb8888_to_rgb565_line
	ldr	x8, [x20]
	ldrsw	x8, [x8]
	add	x25, x25, x8
	add	x21, x21, x23
	subs	w26, w26, #1
	b.ne	LBB0_3
LBB0_4:
	mov	x0, x24
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_kfree
LBB0_5:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
