	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_helper_setcmap          ## -- Begin function drm_fb_helper_setcmap
	.p2align	4, 0x90
_drm_fb_helper_setcmap:                 ## @drm_fb_helper_setcmap
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_7
## %bb.1:
	xorl	%edx, %edx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	incq	%rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rax
	cmpq	%rax, %rdx
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	8(%rcx), %rax
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rdx,8), %rbx
	movq	(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 36(%rax)
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	32(%rax), %ecx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %r13
	movq	(%rax), %r14
	movq	8(%rax), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r12), %r8d
	movl	(%r14,%r12,4), %esi
	movl	(%r15,%r12,4), %edx
	movl	(%r13,%r12,4), %ecx
	movq	%rbx, %rdi
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	callq	_setcolreg
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	incq	%r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	36(%rax), %r12d
	jl	LBB0_4
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_helper_setcmap          ; -- Begin function drm_fb_helper_setcmap
	.p2align	2
_drm_fb_helper_setcmap:                 ; @drm_fb_helper_setcmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x22, [x1]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x23, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x8, [x22, #8]
	ldr	x21, [x8, x23, lsl #3]
	ldr	x8, [x21]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w8, [x20, #36]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, #0
	ldr	w26, [x20, #32]
	ldp	x28, x27, [x20, #8]
	ldr	x24, [x20]
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x8, x25, #2
	add	w4, w26, w25
	ldr	w1, [x24, x8]
	ldr	w2, [x28, x8]
	ldr	w3, [x27, x8]
	mov	x0, x21
	mov	x5, x19
	bl	_setcolreg
	cbnz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x20, #36]
	add	x25, x25, #1
	cmp	w25, w8
	b.lt	LBB0_5
	b	LBB0_2
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
