	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function format_from_vec4
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_format_from_vec4:                      ## @format_from_vec4
	.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	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	24(%rdi), %edx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	(%r15), %r8
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%r14
	cmpq	$4, %r14
	je	LBB0_12
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	(%r8,%r14,4), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	_format_from_vec4.component_offsets(%rip), %rcx
	movl	(%rcx,%r14,4), %edx
	movl	%eax, %ecx
	negb	%cl
	movl	$-1, %r13d
	shrl	%cl, %r13d
	movss	(%rbx,%rdx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movq	8(%r15), %rcx
	movq	_FORMAT_ARGBF16@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	callq	_float_32_to_16
                                        ## kill: def $eax killed $eax def $rax
	movq	(%r15), %r8
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_FORMAT_ARGBF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movd	%xmm0, %eax
	jmp	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$-1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	notl	%edx
	xorps	%xmm1, %xmm1
	cvtsi2ss	%edx, %xmm1
	mulss	%xmm1, %xmm0
	addss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %rax
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r15), %r9
	movl	(%r9,%r14,4), %r11d
	leal	7(%r11), %r10d
	testl	%r11d, %r11d
	cmovnsl	%r11d, %r10d
	movl	%r10d, %edx
	andl	$-8, %edx
	movl	(%r8,%r14,4), %ecx
	addl	%r11d, %ecx
	cmpl	%ecx, %edx
	jae	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	sarl	$3, %r10d
	andl	%r13d, %eax
	shll	$3, %r10d
	negl	%r10d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%edx, %edi
	leal	(%r11,%r10), %ecx
	movl	%eax, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	subl	%r11d, %edi
	movl	%eax, %ebx
	movl	%edi, %ecx
	shrl	%cl, %ebx
	cmpl	%r11d, %edx
	cmovbl	%esi, %ebx
	movl	%edx, %ecx
	shrl	$3, %ecx
	orl	%ebx, (%r12,%rcx,4)
	addl	$8, %edx
	movl	(%r9,%r14,4), %r11d
	movl	(%r8,%r14,4), %ecx
	addl	%r11d, %ecx
	addl	$-8, %r10d
	cmpl	%ecx, %edx
	jb	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @format_from_vec4.component_offsets
_format_from_vec4.component_offsets:
	.long	3                               ## 0x3
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2

	.comm	_FORMAT_ARGBF16,8,3             ## @FORMAT_ARGBF16
	.comm	_FORMAT_ARGBF,8,3               ## @FORMAT_ARGBF
	.no_dead_strip	_format_from_vec4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function format_from_vec4
_format_from_vec4:                      ; @format_from_vec4
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w2, [x0, #24]
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	mov	x22, #0
	ldr	x8, [x21]
Lloh0:
	adrp	x23, _FORMAT_ARGBF16@GOTPAGE
Lloh1:
	ldr	x23, [x23, _FORMAT_ARGBF16@GOTPAGEOFF]
	mov	w24, #-1
Lloh2:
	adrp	x25, _format_from_vec4.component_offsets@PAGE
Lloh3:
	add	x25, x25, _format_from_vec4.component_offsets@PAGEOFF
Lloh4:
	adrp	x26, _FORMAT_ARGBF@GOTPAGE
Lloh5:
	ldr	x26, [x26, _FORMAT_ARGBF@GOTPAGEOFF]
	fmov	s8, #0.50000000
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	cmp	x22, #4
	b.eq	LBB0_11
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	lsl	x27, x22, #2
	ldr	w28, [x8, x27]
	cbz	w28, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x25, x27]
	ldr	s0, [x20, x9, lsl #2]
	ldr	x9, [x21, #8]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_float_32_to_16
	ldr	x8, [x21]
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x10, [x26]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	fmov	w0, s0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	lsl	w9, w24, w28
	mvn	w9, w9
	scvtf	s1, w9
	fmadd	s0, s0, s1, s8
	fcvtzu	w0, s0
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x21, #16]
	ldr	w11, [x9, x27]
	add	w10, w11, #7
	cmp	w11, #0
	csel	w12, w10, w11, lt
	and	w10, w12, #0xfffffff8
	ldr	w13, [x8, x27]
	add	w13, w13, w11
	cmp	w10, w13
	b.hs	LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	neg	w13, w28
	lsr	w13, w24, w13
	asr	w14, w12, #3
	and	w12, w0, w13
	neg	w13, w14, lsl #3
LBB0_10:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w14, w11, w13
	lsl	w14, w12, w14
	sub	w15, w10, w11
	lsr	w15, w12, w15
	lsr	w16, w10, #3
	lsl	x16, x16, #2
	ldr	w17, [x19, x16]
	cmp	w11, w10
	csel	w11, w14, w15, hi
	orr	w11, w17, w11
	str	w11, [x19, x16]
	ldr	w11, [x9, x27]
	add	w10, w10, #8
	ldr	w14, [x8, x27]
	sub	w13, w13, #8
	add	w14, w14, w11
	cmp	w10, w14
	b.lo	LBB0_10
	b	LBB0_1
LBB0_11:
	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
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @format_from_vec4.component_offsets
_format_from_vec4.component_offsets:
	.long	3                               ; 0x3
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2

	.comm	_FORMAT_ARGBF16,8,3             ; @FORMAT_ARGBF16
	.comm	_FORMAT_ARGBF,8,3               ; @FORMAT_ARGBF
	.no_dead_strip	_format_from_vec4
.subsections_via_symbols
