	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gamma_convert
_gamma_convert:                         ## @gamma_convert
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.1:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movq	(%rax), %r13
	movq	(%rcx), %rax
	movl	(%rax), %ecx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_5
	.p2align	4, 0x90
LBB0_3:
	movq	8(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addl	%edx, %ecx
	subl	(%rax), %ecx
	movq	8(%rax), %rax
	movslq	%ecx, %rcx
	movq	(%rax,%rcx,8), %rbx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_AV_RL16
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_AV_RL16
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %r12
	movq	%r12, %rdi
	callq	_AV_RL16
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	(%r13,%rax,8), %rsi
	movq	%rbx, %rdi
	callq	_AV_WL16
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%r13,%rax,8), %rsi
	movq	%r14, %rdi
	callq	_AV_WL16
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%r13,%rax,8), %rsi
	movq	%r12, %rdi
	callq	_AV_WL16
	addq	$32, %rbx
	decq	%r15
	jne	LBB0_4
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jg	LBB0_3
	jmp	LBB0_5
LBB0_7:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gamma_convert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gamma_convert
_gamma_convert:                         ; @gamma_convert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	str	x1, [sp, #16]                   ; 8-byte Folded Spill
	str	w3, [sp, #28]                   ; 4-byte Folded Spill
	cmp	w3, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w28, #0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldp	x8, x9, [x8]
	ldr	x20, [x9]
	ldr	w19, [x8]
	cmp	w19, #1
	b.lt	LBB0_4
LBB0_2:
	ldr	x8, [x8, #8]
	ldr	x9, [x8, #8]
	ldr	w8, [x8]
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	add	w10, w28, w10
	sub	w8, w10, w8
	ldr	x22, [x9, w8, sxtw #3]
	mov	x21, x19
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_AV_RL16
	mov	x23, x0
	add	x24, x22, #8
	mov	x0, x24
	bl	_AV_RL16
	mov	x25, x0
	add	x26, x22, #16
	mov	x0, x26
	bl	_AV_RL16
	mov	x27, x0
	ldr	x1, [x20, x23, lsl #3]
	mov	x0, x22
	bl	_AV_WL16
	ldr	x1, [x20, x25, lsl #3]
	mov	x0, x24
	bl	_AV_WL16
	ldr	x1, [x20, x27, lsl #3]
	mov	x0, x26
	bl	_AV_WL16
	add	x22, x22, #32
	subs	x21, x21, #1
	b.ne	LBB0_3
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w28, w28, #1
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w28, w8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	cmp	w19, #1
	b.ge	LBB0_2
	b	LBB0_4
LBB0_6:
	ldr	w0, [sp, #28]                   ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gamma_convert
.subsections_via_symbols
