	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dxbc_parse                     ## -- Begin function dxbc_parse
	.p2align	4, 0x90
_dxbc_parse:                            ## @dxbc_parse
	.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
	movq	%rdi, -56(%rbp)
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rdx, %r12
	leaq	-56(%rbp), %rdi
	leaq	-104(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_read_dword
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_debugstr_an
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-104(%rbp), %rax
	movq	_TAG_DXBC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_skip_dword_unknown
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_skip_dword_unknown
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_read_dword
	movl	-80(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	cmpq	%r15, -80(%rbp)
	jne	LBB0_10
## %bb.3:
	leaq	-56(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_read_dword
	movl	-48(%rbp), %esi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-48(%rbp), %rsi
	movq	%r12, %rbx
	movq	%r12, %rdi
	callq	_dxbc_init
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	leaq	L_.str.6(%rip), %rdi
	callq	_WARN
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
LBB0_7:
	callq	_WARN
	movq	_E_FAIL@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
	callq	_WARN
	movq	_D3DERR_INVALIDCALL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_11:
	cmpq	$0, -48(%rbp)
	jle	LBB0_9
## %bb.12:
	leaq	-72(%rbp), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leaq	-56(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_read_dword
	movq	-64(%rbp), %rdx
	leaq	L_.str.7(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-64(%rbp), %rax
	addq	%r14, %rax
	movq	%rax, -72(%rbp)
	movq	%r15, %rdi
	leaq	-96(%rbp), %rsi
	callq	_read_dword
	movq	%r15, %rdi
	leaq	-88(%rbp), %rsi
	callq	_read_dword
	movq	-96(%rbp), %rsi
	movq	-72(%rbp), %rdx
	movq	-88(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_dxbc_add_section
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	incl	%r12d
	cmpq	%r12, -48(%rbp)
	jg	LBB0_13
	jmp	LBB0_9
LBB0_15:
	leaq	L_.str.8(%rip), %rdi
	callq	_WARN
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No data supplied.\n"

	.comm	_E_FAIL,4,2                     ## @E_FAIL
L_.str.1:                               ## @.str.1
	.asciz	"tag: %s.\n"

	.comm	_TAG_DXBC,8,3                   ## @TAG_DXBC
L_.str.2:                               ## @.str.2
	.asciz	"Wrong tag.\n"

L_.str.3:                               ## @.str.3
	.asciz	"total size: %#x\n"

L_.str.4:                               ## @.str.4
	.asciz	"Wrong size supplied.\n"

	.comm	_D3DERR_INVALIDCALL,4,2         ## @D3DERR_INVALIDCALL
L_.str.5:                               ## @.str.5
	.asciz	"chunk count: %#x\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to init dxbc\n"

L_.str.7:                               ## @.str.7
	.asciz	"chunk %u at offset %#x\n"

L_.str.8:                               ## @.str.8
	.asciz	"Failed to add section to dxbc\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dxbc_parse                     ; -- Begin function dxbc_parse
	.p2align	2
_dxbc_parse:                            ; @dxbc_parse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	stur	x0, [x29, #-56]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	sub	x0, x29, #56
	add	x1, sp, #64
	bl	_read_dword
	add	x0, sp, #64
	mov	w1, #4
	bl	_debugstr_an
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	x8, [sp, #64]
Lloh2:
	adrp	x9, _TAG_DXBC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TAG_DXBC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	sub	x0, x29, #56
	mov	w1, #4
	bl	_skip_dword_unknown
	sub	x0, x29, #56
	mov	w1, #1
	bl	_skip_dword_unknown
	sub	x0, x29, #56
	add	x1, sp, #56
	bl	_read_dword
	ldr	w1, [sp, #56]
Lloh5:
	adrp	x0, l_.str.3@PAGE
Lloh6:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_TRACE
	ldr	x8, [sp, #56]
	cmp	x8, x21
	b.ne	LBB0_10
; %bb.3:
	sub	x0, x29, #56
	add	x1, sp, #48
	bl	_read_dword
	ldr	w1, [sp, #48]
Lloh7:
	adrp	x0, l_.str.5@PAGE
Lloh8:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_TRACE
	ldr	x1, [sp, #48]
	mov	x0, x19
	bl	_dxbc_init
	mov	x22, x0
	bl	_FAILED
	cbz	x0, LBB0_11
; %bb.4:
Lloh9:
	adrp	x0, l_.str.6@PAGE
Lloh10:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_WARN
	b	LBB0_9
LBB0_5:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	bl	_WARN
Lloh15:
	adrp	x8, _E_FAIL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _E_FAIL@GOTPAGEOFF]
LBB0_8:
	ldr	w22, [x8]
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_10:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_WARN
Lloh19:
	adrp	x8, _D3DERR_INVALIDCALL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _D3DERR_INVALIDCALL@GOTPAGEOFF]
	b	LBB0_8
LBB0_11:
	ldr	x8, [sp, #48]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.12:
	mov	w21, #0
Lloh21:
	adrp	x23, l_.str.7@PAGE
Lloh22:
	add	x23, x23, l_.str.7@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	x0, x29, #56
	add	x1, sp, #16
	bl	_read_dword
	ldr	x8, [sp, #16]
	str	x8, [sp]
	mov	x0, x23
	mov	x1, x21
	bl	_TRACE
	ldr	x8, [sp, #16]
	add	x8, x20, x8
	str	x8, [sp, #24]
	add	x0, sp, #24
	add	x1, sp, #40
	bl	_read_dword
	add	x0, sp, #24
	add	x1, sp, #32
	bl	_read_dword
	ldp	x3, x1, [sp, #32]
	ldr	x2, [sp, #24]
	mov	x0, x19
	bl	_dxbc_add_section
	mov	x22, x0
	bl	_FAILED
	cbnz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	w21, w21, #1
	ldr	x8, [sp, #48]
	cmp	x8, x21
	b.gt	LBB0_13
	b	LBB0_9
LBB0_15:
Lloh23:
	adrp	x0, l_.str.8@PAGE
Lloh24:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_WARN
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No data supplied.\n"

	.comm	_E_FAIL,4,2                     ; @E_FAIL
l_.str.1:                               ; @.str.1
	.asciz	"tag: %s.\n"

	.comm	_TAG_DXBC,8,3                   ; @TAG_DXBC
l_.str.2:                               ; @.str.2
	.asciz	"Wrong tag.\n"

l_.str.3:                               ; @.str.3
	.asciz	"total size: %#x\n"

l_.str.4:                               ; @.str.4
	.asciz	"Wrong size supplied.\n"

	.comm	_D3DERR_INVALIDCALL,4,2         ; @D3DERR_INVALIDCALL
l_.str.5:                               ; @.str.5
	.asciz	"chunk count: %#x\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to init dxbc\n"

l_.str.7:                               ; @.str.7
	.asciz	"chunk %u at offset %#x\n"

l_.str.8:                               ; @.str.8
	.asciz	"Failed to add section to dxbc\n"

.subsections_via_symbols
