	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_record_sample
_shader_record_sample:                  ## @shader_record_sample
	.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
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movl	(%rdi), %r13d
	testq	%r13, %r13
	je	LBB0_5
## %bb.1:
	leaq	(,%r13,4), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	xorl	%edx, %edx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$12, %rdx
	cmpq	%rdx, %rcx
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, (%rax,%rdx)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r15d, 4(%rax,%rdx)
	jne	LBB0_4
	jmp	LBB0_15
LBB0_5:
	movl	4(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.9:
	cmpl	%ecx, %r13d
	jne	LBB0_14
## %bb.10:
	movslq	%r13d, %rcx
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,2), %rsi
	movslq	%r13d, %rcx
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	cmpq	%rcx, %rsi
	jbe	LBB0_16
## %bb.11:
	movq	%rax, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_heap_realloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	addl	%r13d, %r13d
	jmp	LBB0_13
LBB0_6:
	movl	$4, %r13d
	movl	$4, %edi
	movl	$12, %esi
	callq	_heap_calloc
	testq	%rax, %rax
	je	LBB0_7
LBB0_13:
	movl	%r13d, 4(%r12)
	movq	%rax, 8(%r12)
LBB0_14:
	movl	(%r12), %ecx
	leal	1(%rcx), %edx
	movl	%edx, (%r12)
	leaq	(%rcx,%rcx,2), %rcx
	movl	%ebx, (%rax,%rcx,4)
	movl	%r15d, 4(%rax,%rcx,4)
	movl	%r14d, 8(%rax,%rcx,4)
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate sampler map entries.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to resize sampler map entries.\n"

	.no_dead_strip	_shader_record_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_record_sample
_shader_record_sample:                  ; @shader_record_sample
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x0, [x0, #8]
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.1:
	add	x9, x0, #4
	mov	x10, x8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #12
	subs	x10, x10, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x9, #-4]
	cmp	w11, w21
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x9]
	cmp	w11, w20
	b.ne	LBB0_2
	b	LBB0_13
LBB0_5:
	ldr	w9, [x22, #4]
	cbz	w9, LBB0_10
; %bb.6:
	sxtw	x23, w8
	cmp	w23, w9
	b.ne	LBB0_12
; %bb.7:
	add	x9, x23, x23, lsl #1
	lsl	x1, x9, #3
	add	x8, x23, w8, sxtw #1
	cmp	x1, x8, lsl #2
	b.ls	LBB0_14
; %bb.8:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_heap_realloc
	cbz	x0, LBB0_14
; %bb.9:
	lsl	w23, w23, #1
	b	LBB0_11
LBB0_10:
	mov	w23, #4
	mov	w0, #4
	mov	w1, #12
	bl	_heap_calloc
	cbz	x0, LBB0_15
LBB0_11:
	str	w23, [x22, #4]
	str	x0, [x22, #8]
LBB0_12:
	ldr	w8, [x22]
	add	w9, w8, #1
	str	w9, [x22]
	mov	w9, #12
	madd	x8, x8, x9, x0
	stp	w21, w20, [x8]
	str	w19, [x8, #8]
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate sampler map entries.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to resize sampler map entries.\n"

	.no_dead_strip	_shader_record_sample
.subsections_via_symbols
