	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dispc_init_gamma_tables
_dispc_init_gamma_tables:               ## @dispc_init_gamma_tables
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	xorl	%ebx, %ebx
	cmpl	$0, (%rax)
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_11
## %bb.2:
	xorl	%ebx, %ebx
	movq	_mgr_desc@GOTPCREL(%rip), %r15
	movq	_OMAP_DSS_CHANNEL_LCD2@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %r13
	movl	(%r12), %eax
	cmpq	%rax, %rbx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_FEAT_MGR_LCD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dispc_has_feature
	testl	%eax, %eax
	je	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_OMAP_DSS_CHANNEL_LCD3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %rbx
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_FEAT_MGR_LCD3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dispc_has_feature
	testl	%eax, %eax
	je	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r14), %rdi
	movl	(%r13,%rbx,4), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %edx
	callq	_devm_kmalloc_array
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dispc_mgr_set_gamma
	jmp	LBB0_9
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mgr_desc,8,3                   ## @mgr_desc
	.comm	_OMAP_DSS_CHANNEL_LCD2,4,2      ## @OMAP_DSS_CHANNEL_LCD2
	.comm	_FEAT_MGR_LCD2,4,2              ## @FEAT_MGR_LCD2
	.comm	_OMAP_DSS_CHANNEL_LCD3,4,2      ## @OMAP_DSS_CHANNEL_LCD3
	.comm	_FEAT_MGR_LCD3,4,2              ## @FEAT_MGR_LCD3
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_dispc_init_gamma_tables
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dispc_init_gamma_tables
_dispc_init_gamma_tables:               ; @dispc_init_gamma_tables
	.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
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x20, #0
Lloh0:
	adrp	x21, _mgr_desc@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mgr_desc@GOTPAGEOFF]
Lloh2:
	adrp	x22, _OMAP_DSS_CHANNEL_LCD2@GOTPAGE
Lloh3:
	ldr	x22, [x22, _OMAP_DSS_CHANNEL_LCD2@GOTPAGEOFF]
Lloh4:
	adrp	x23, _FEAT_MGR_LCD2@GOTPAGE
Lloh5:
	ldr	x23, [x23, _FEAT_MGR_LCD2@GOTPAGEOFF]
Lloh6:
	adrp	x24, _OMAP_DSS_CHANNEL_LCD3@GOTPAGE
Lloh7:
	ldr	x24, [x24, _OMAP_DSS_CHANNEL_LCD3@GOTPAGEOFF]
Lloh8:
	adrp	x25, _FEAT_MGR_LCD3@GOTPAGE
Lloh9:
	ldr	x25, [x25, _FEAT_MGR_LCD3@GOTPAGEOFF]
Lloh10:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	ldr	x0, [x19]
	bl	_ARRAY_SIZE
	cmp	x20, w0, sxtw
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x21]
	ldr	w8, [x22]
	cmp	x20, x8
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_dispc_has_feature
	cbz	w0, LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	cmp	x20, x8
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	bl	_dispc_has_feature
	cbz	w0, LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #8]
	ldr	w1, [x27, x20, lsl #2]
	ldr	w3, [x26]
	mov	w2, #4
	bl	_devm_kmalloc_array
	cbz	x0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	str	x0, [x8, x20, lsl #3]
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	mov	w3, #0
	bl	_dispc_mgr_set_gamma
	b	LBB0_3
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
LBB0_12:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_mgr_desc,8,3                   ; @mgr_desc
	.comm	_OMAP_DSS_CHANNEL_LCD2,4,2      ; @OMAP_DSS_CHANNEL_LCD2
	.comm	_FEAT_MGR_LCD2,4,2              ; @FEAT_MGR_LCD2
	.comm	_OMAP_DSS_CHANNEL_LCD3,4,2      ; @OMAP_DSS_CHANNEL_LCD3
	.comm	_FEAT_MGR_LCD3,4,2              ; @FEAT_MGR_LCD3
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_dispc_init_gamma_tables
.subsections_via_symbols
