	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function dxbc_write_blob
LCPI0_0:
	.long	32                              ## 0x20
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
LCPI0_1:
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_dxbc_write_blob
	.p2align	4, 0x90
_dxbc_write_blob:                       ## @dxbc_write_blob
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rdi), %r13d
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_TRACE
	movl	(%r15), %eax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	8(%r15), %rcx
	cmpl	$9, %eax
	jae	LBB0_4
## %bb.3:
	movl	$32, %ebx
	xorl	%edx, %edx
	jmp	LBB0_7
LBB0_1:
	movl	$32, %ebx
	jmp	LBB0_9
LBB0_4:
	movl	%eax, %edx
	andl	$7, %edx
	testq	%rdx, %rdx
	movl	$8, %esi
	cmovneq	%rdx, %rsi
	movq	%rax, %rdx
	subq	%rsi, %rdx
	pxor	%xmm0, %xmm0
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [32,0,0,0]
	movdqa	LCPI0_1(%rip), %xmm2            ## xmm2 = [12,12,12,12]
	movq	%rdx, %rsi
	movq	%rcx, %rdi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movd	(%rdi), %xmm3                   ## xmm3 = mem[0],zero,zero,zero
	pinsrd	$1, 12(%rdi), %xmm3
	pinsrd	$2, 24(%rdi), %xmm3
	pinsrd	$3, 36(%rdi), %xmm3
	movd	48(%rdi), %xmm4                 ## xmm4 = mem[0],zero,zero,zero
	pinsrd	$1, 60(%rdi), %xmm4
	pinsrd	$2, 72(%rdi), %xmm4
	pinsrd	$3, 84(%rdi), %xmm4
	paddd	%xmm2, %xmm1
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	paddd	%xmm4, %xmm0
	addq	$96, %rdi
	addq	$-8, %rsi
	jne	LBB0_5
## %bb.6:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ebx
LBB0_7:
	leaq	(%rdx,%rdx,2), %rsi
	leaq	(%rcx,%rsi,4), %rcx
	subq	%rdx, %rax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %edx
	addl	%edx, %ebx
	addl	$12, %ebx
	addq	$12, %rcx
	decq	%rax
	jne	LBB0_8
LBB0_9:
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	callq	_D3DCreateBlob
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	callq	_WARN
	jmp	LBB0_18
LBB0_11:
	movq	-56(%rbp), %rdi
	callq	_ID3D10Blob_GetBufferPointer
	movq	%rax, -48(%rbp)
	movq	_TAG_DXBC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_write_dword
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_write_dword_unknown
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_write_dword_unknown
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_write_dword_unknown
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_write_dword_unknown
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_write_dword_unknown
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_write_dword
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_write_dword
	cmpl	$0, (%r15)
	je	LBB0_17
## %bb.12:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	leal	32(,%r13,4), %r13d
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_write_dword
	movq	8(%r15), %rax
	movl	(%rax,%rbx), %ecx
	addl	%ecx, %r13d
	addl	$8, %r13d
	incq	%r14
	movl	(%r15), %ecx
	addq	$12, %rbx
	cmpq	%rcx, %r14
	jb	LBB0_13
## %bb.14:
	testl	%ecx, %ecx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_17
## %bb.15:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rax,%rbx), %esi
	movq	%r12, %rdi
	callq	_write_dword
	movq	8(%r15), %rax
	movl	(%rax,%rbx), %esi
	movq	%r12, %rdi
	callq	_write_dword
	movq	-48(%rbp), %rdi
	movq	8(%r15), %rax
	movl	(%rax,%rbx), %edx
	movl	8(%rax,%rbx), %esi
	callq	_memcpy
	movq	8(%r15), %rax
	movslq	(%rax,%rbx), %rcx
	addq	%rcx, -48(%rbp)
	incq	%r13
	movl	(%r15), %ecx
	addq	$12, %rbx
	cmpq	%rcx, %r13
	jb	LBB0_16
LBB0_17:
	movq	-56(%rbp), %rsi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-56(%rbp), %rax
	movq	%rax, (%r14)
	movq	_S_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dxbc %p, blob %p.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to create blob\n"

	.comm	_TAG_DXBC,4,2                   ## @TAG_DXBC
L_.str.2:                               ## @.str.2
	.asciz	"Created ID3DBlob %p\n"

	.comm	_S_OK,4,2                       ## @S_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function dxbc_write_blob
lCPI0_0:
	.long	32                              ; 0x20
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_dxbc_write_blob
	.p2align	2
_dxbc_write_blob:                       ; @dxbc_write_blob
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
	mov	x20, x0
	ldr	w23, [x0]
	str	x1, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x9, [x20, #8]
	cmp	w8, #17
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	w21, #32
	b	LBB0_7
LBB0_3:
	mov	w21, #32
	b	LBB0_9
LBB0_4:
	ands	x10, x8, #0xf
	mov	w11, #16
	csel	x10, x11, x10, eq
	sub	x10, x8, x10
Lloh2:
	adrp	x11, lCPI0_0@PAGE
Lloh3:
	ldr	q0, [x11, lCPI0_0@PAGEOFF]
	add	x11, x9, #96
	movi.2d	v2, #0000000000000000
	movi.4s	v1, #12
	mov	x12, x10
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x13, x11, #96
	sub	x14, x11, #48
	ld3.4s	{ v5, v6, v7 }, [x13]
	ld3.4s	{ v16, v17, v18 }, [x14]
	mov	x13, x11
	ld3.4s	{ v19, v20, v21 }, [x13], #48
	ld3.4s	{ v22, v23, v24 }, [x13]
	add.4s	v0, v0, v5
	add.4s	v2, v2, v16
	add.4s	v3, v3, v19
	add.4s	v4, v4, v22
	add.4s	v0, v0, v1
	add.4s	v2, v2, v1
	add.4s	v3, v3, v1
	add.4s	v4, v4, v1
	add	x11, x11, #192
	subs	x12, x12, #16
	b.ne	LBB0_5
; %bb.6:
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	add.4s	v0, v4, v0
	addv.4s	s0, v0
	fmov	w21, s0
LBB0_7:
	mov	w11, #12
	madd	x9, x10, x11, x9
	sub	x8, x8, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9], #12
	add	w10, w21, w10
	add	w21, w10, #12
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
	add	x1, sp, #24
	mov	x0, x21
	bl	_D3DCreateBlob
	mov	x22, x0
	bl	_FAILED
	cbz	x0, LBB0_11
; %bb.10:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
	b	LBB0_18
LBB0_11:
	ldr	x0, [sp, #24]
	bl	_ID3D10Blob_GetBufferPointer
	str	x0, [sp, #16]
Lloh6:
	adrp	x8, _TAG_DXBC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TAG_DXBC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #16
	bl	_write_dword
	add	x0, sp, #16
	mov	w1, #0
	bl	_write_dword_unknown
	add	x0, sp, #16
	mov	w1, #0
	bl	_write_dword_unknown
	add	x0, sp, #16
	mov	w1, #0
	bl	_write_dword_unknown
	add	x0, sp, #16
	mov	w1, #0
	bl	_write_dword_unknown
	add	x0, sp, #16
	mov	w1, #1
	bl	_write_dword_unknown
	add	x0, sp, #16
	mov	x1, x21
	bl	_write_dword
	ldr	w1, [x20]
	add	x0, sp, #16
	bl	_write_dword
	ldr	w8, [x20]
	cbz	w8, LBB0_17
; %bb.12:
	mov	x22, #0
	mov	x24, #0
	lsl	w8, w23, #2
	add	w21, w8, #32
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #16
	mov	x1, x21
	bl	_write_dword
	ldr	x8, [x20, #8]
	ldr	w9, [x8, x22]
	add	w9, w21, w9
	add	w21, w9, #8
	add	x24, x24, #1
	ldr	w9, [x20]
	add	x22, x22, #12
	cmp	x24, x9
	b.lo	LBB0_13
; %bb.14:
	cbz	w9, LBB0_17
; %bb.15:
	mov	x21, #0
	mov	x22, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x21
	ldr	w1, [x8, #4]
	add	x0, sp, #16
	bl	_write_dword
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x21]
	add	x0, sp, #16
	bl	_write_dword
	ldr	x0, [sp, #16]
	ldr	x8, [x20, #8]
	add	x8, x8, x21
	ldr	w1, [x8, #8]
	ldr	w2, [x8]
	bl	_memcpy
	ldr	x8, [x20, #8]
	ldrsw	x9, [x8, x21]
	ldr	x10, [sp, #16]
	add	x9, x10, x9
	str	x9, [sp, #16]
	add	x22, x22, #1
	ldr	w9, [x20]
	add	x21, x21, #12
	cmp	x22, x9
	b.lo	LBB0_16
LBB0_17:
	ldr	x1, [sp, #24]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	ldr	x8, [sp, #24]
	str	x8, [x19]
Lloh11:
	adrp	x8, _S_OK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
LBB0_18:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dxbc %p, blob %p.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to create blob\n"

	.comm	_TAG_DXBC,4,2                   ; @TAG_DXBC
l_.str.2:                               ; @.str.2
	.asciz	"Created ID3DBlob %p\n"

	.comm	_S_OK,4,2                       ; @S_OK
.subsections_via_symbols
