	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function drm_mode_crtc_set_gamma_size
LCPI0_0:
	.long	0                               ## 0x0
	.long	256                             ## 0x100
	.long	512                             ## 0x200
	.long	768                             ## 0x300
LCPI0_1:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_2:
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
LCPI0_3:
	.long	2048                            ## 0x800
	.long	2048                            ## 0x800
	.long	2048                            ## 0x800
	.long	2048                            ## 0x800
LCPI0_4:
	.long	3072                            ## 0xc00
	.long	3072                            ## 0xc00
	.long	3072                            ## 0xc00
	.long	3072                            ## 0xc00
LCPI0_5:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_drm_mode_crtc_set_gamma_size
	.p2align	4, 0x90
_drm_mode_crtc_set_gamma_size:          ## @drm_mode_crtc_set_gamma_size
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	%esi, (%rdi)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%esi, %edi
	movl	$12, %esi
	callq	_kcalloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.4:
	movslq	%ebx, %r11
	leaq	(%rax,%r11,4), %r8
	leaq	(%r8,%r11,4), %r9
	movl	%ebx, %r14d
	cmpl	$8, %ebx
	jae	LBB0_6
## %bb.5:
	xorl	%esi, %esi
LBB0_17:
	movq	%rsi, %rdx
	notq	%rdx
	testb	$1, %r14b
	je	LBB0_19
## %bb.18:
	movl	%esi, %ecx
	shll	$8, %ecx
	movl	%ecx, (%rax,%rsi,4)
	movl	%ecx, (%r8,%rsi,4)
	movl	%ecx, (%r9,%rsi,4)
	orq	$1, %rsi
LBB0_19:
	xorl	%r10d, %r10d
	addq	%r14, %rdx
	je	LBB0_22
## %bb.20:
	movl	%esi, %edx
	shll	$8, %edx
	leaq	(%rax,%r11,8), %rdi
	addq	$4, %rdi
	leaq	(%rax,%r11,4), %rbx
	addq	$4, %rbx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, (%rax,%rsi,4)
	movl	%edx, -4(%rbx,%rsi,4)
	movl	%edx, -4(%rdi,%rsi,4)
	leal	256(%rdx), %ecx
	movl	%ecx, 4(%rax,%rsi,4)
	movl	%ecx, (%rbx,%rsi,4)
	movl	%ecx, (%rdi,%rsi,4)
	addq	$2, %rsi
	addl	$512, %edx                      ## imm = 0x200
	cmpq	%rsi, %r14
	jne	LBB0_21
	jmp	LBB0_22
LBB0_1:
	movl	$0, (%r14)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r10d, %r10d
	subl	(%rax), %r10d
	jmp	LBB0_22
LBB0_3:
	xorl	%r10d, %r10d
LBB0_22:
	movl	%r10d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	(,%r11,4), %r15
	xorl	%esi, %esi
	cmpq	$32, %r15
	jb	LBB0_17
## %bb.7:
	leaq	(,%r11,8), %rbx
	cmpq	$32, %rbx
	jb	LBB0_17
## %bb.8:
	leaq	(%rax,%r11,8), %rcx
	subq	%r8, %rcx
	cmpq	$32, %rcx
	jb	LBB0_17
## %bb.9:
	movl	%r14d, %esi
	andl	$-8, %esi
	leaq	-8(%rsi), %rcx
	movq	%rcx, %r10
	shrq	$3, %r10
	incq	%r10
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.11:
	movq	%r10, %rdx
	andq	$-2, %rdx
	leaq	48(%rax), %rcx
	movdqa	LCPI0_1(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%edi, %edi
	movdqa	LCPI0_2(%rip), %xmm1            ## xmm1 = [1024,1024,1024,1024]
	movdqa	LCPI0_3(%rip), %xmm2            ## xmm2 = [2048,2048,2048,2048]
	movdqa	LCPI0_4(%rip), %xmm3            ## xmm3 = [3072,3072,3072,3072]
	movdqa	LCPI0_5(%rip), %xmm4            ## xmm4 = [16,16,16,16]
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm5
	pslld	$8, %xmm5
	movdqa	%xmm5, %xmm6
	paddd	%xmm1, %xmm6
	movdqu	%xmm5, -48(%rcx)
	movdqu	%xmm6, -32(%rcx)
	movdqu	%xmm5, -48(%rcx,%r15)
	movdqu	%xmm6, -32(%rcx,%r15)
	movdqu	%xmm5, -48(%rcx,%rbx)
	movdqu	%xmm6, -32(%rcx,%rbx)
	movdqa	%xmm5, %xmm6
	paddd	%xmm2, %xmm6
	paddd	%xmm3, %xmm5
	movdqu	%xmm6, -16(%rcx)
	movdqu	%xmm5, (%rcx)
	movdqu	%xmm6, -16(%rcx,%r15)
	movdqu	%xmm5, (%rcx,%r15)
	movdqu	%xmm6, -16(%rcx,%rbx)
	movdqu	%xmm5, (%rcx,%rbx)
	addq	$16, %rdi
	paddd	%xmm4, %xmm0
	addq	$64, %rcx
	addq	$-2, %rdx
	jne	LBB0_12
## %bb.13:
	pslld	$8, %xmm0
	testb	$1, %r10b
	je	LBB0_16
LBB0_15:
	movdqa	LCPI0_2(%rip), %xmm1            ## xmm1 = [1024,1024,1024,1024]
	paddd	%xmm0, %xmm1
	movdqu	%xmm0, (%rax,%rdi,4)
	movdqu	%xmm1, 16(%rax,%rdi,4)
	movdqu	%xmm0, (%r8,%rdi,4)
	movdqu	%xmm1, 16(%r8,%rdi,4)
	movdqu	%xmm0, (%r9,%rdi,4)
	movdqu	%xmm1, 16(%r9,%rdi,4)
LBB0_16:
	xorl	%r10d, %r10d
	cmpq	%r14, %rsi
	jne	LBB0_17
	jmp	LBB0_22
LBB0_10:
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,256,512,768]
	xorl	%edi, %edi
	testb	$1, %r10b
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function drm_mode_crtc_set_gamma_size
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_drm_mode_crtc_set_gamma_size
	.p2align	2
_drm_mode_crtc_set_gamma_size:          ; @drm_mode_crtc_set_gamma_size
	.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	x19, x1
	mov	x20, x0
	str	w1, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x1
	mov	w1, #12
	bl	_kcalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_4
; %bb.1:
	cmp	w19, #1
	b.lt	LBB0_13
; %bb.2:
	sxtw	x8, w19
	mov	w10, w19
	lsl	x9, x8, #3
	cmp	w19, #16
	b.hs	LBB0_5
; %bb.3:
	mov	x11, #0
	b	LBB0_11
LBB0_4:
	str	wzr, [x20]
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_5:
	mov	x11, #0
	lsl	x12, x8, #2
	cmp	x12, #64
	b.lo	LBB0_11
; %bb.6:
	cmp	x9, #64
	b.lo	LBB0_11
; %bb.7:
	add	x13, x12, x0
	add	x14, x9, x0
	sub	x13, x14, x13
	cmp	x13, #64
	b.lo	LBB0_11
; %bb.8:
	and	x11, x10, #0xfffffff0
Lloh6:
	adrp	x13, lCPI0_0@PAGE
Lloh7:
	ldr	q0, [x13, lCPI0_0@PAGEOFF]
	add	x13, x0, #32
	movi.4s	v1, #4, lsl #8
	movi.4s	v2, #8, lsl #8
	movi.4s	v3, #12, lsl #8
	movi.4s	v4, #16
	mov	x14, x11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	shl.4s	v5, v0, #8
	add.4s	v6, v5, v1
	add.4s	v7, v5, v2
	stp	q5, q6, [x13, #-32]
	add.4s	v16, v5, v3
	stp	q7, q16, [x13]
	add	x15, x13, x12
	stp	q5, q6, [x15, #-32]
	stp	q7, q16, [x15]
	add	x15, x13, x9
	stp	q5, q6, [x15, #-32]
	add.4s	v0, v0, v4
	add	x13, x13, #64
	stp	q7, q16, [x15]
	subs	x14, x14, #16
	b.ne	LBB0_9
; %bb.10:
	cmp	x11, x10
	b.eq	LBB0_13
LBB0_11:
	lsl	w12, w11, #8
	sub	x10, x10, x11
	add	x11, x0, x11, lsl #2
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	str	w12, [x11, x8, lsl #2]
	str	w12, [x11]
	str	w12, [x11, x9]
	add	w12, w12, #256
	add	x11, x11, #4
	subs	x10, x10, #1
	b.ne	LBB0_12
LBB0_13:
	mov	w0, #0
LBB0_14:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdr	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
