	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_region
_load_region:                           ## @load_region
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rsi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r13, %rdx
	movq	%r14, %rcx
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_TRACE
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.1:
	leaq	4(%r14), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	20(%r14), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	12(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	28(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	movl	$8, %edx
	callq	_read_from_stream
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_20
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_subtract_bytes
	movq	%rax, %r12
	movl	-48(%rbp), %edi
	cmpl	$128, %edi
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %edi
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$130, %edi
	jne	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	$8, %edx
	callq	_read_from_stream
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_subtract_bytes
	movq	%rax, %rbx
	xorl	%eax, %eax
	cmpl	$8, -44(%rbp)
	setne	%al
	movl	%eax, (%r14)
	je	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	$8, %edx
	callq	_read_from_stream
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	$8, %esi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$8, %edx
	callq	_read_from_stream
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_20
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	$8, %esi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_debugstr_fourcc
	movl	-44(%rbp), %edx
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_advance_stream
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_subtract_bytes
	movq	%rax, %rbx
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	testq	%rbx, %rbx
	jne	LBB0_2
LBB0_19:
	movq	_S_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$40, %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	"(%p, %p, %p, %u)\n"

L_.str.1:                               ## @.str.1
	.asciz	"RGNH chunk (region header): %u bytes\n"

L_.str.2:                               ## @.str.2
	.asciz	"WSMP chunk (wave sample): %u bytes\n"

L_.str.3:                               ## @.str.3
	.asciz	"WLNK chunk (wave link): %u bytes\n"

L_.str.4:                               ## @.str.4
	.asciz	"Unknown chunk %s (skipping): %u bytes\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_region
_load_region:                           ; @load_region
	.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
	mov	x25, x3
	mov	x19, x2
	mov	x20, x1
	mov	x1, x0
	stp	x2, x3, [sp, #8]
	str	x20, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_TRACE
	cbz	x25, LBB0_17
; %bb.1:
	add	x21, x19, #4
	add	x22, x19, #20
	add	x23, x19, #12
	add	x24, x19, #28
Lloh2:
	adrp	x27, l_.str.1@PAGE
Lloh3:
	add	x27, x27, l_.str.1@PAGEOFF
Lloh4:
	adrp	x28, l_.str.4@PAGE
Lloh5:
	add	x28, x28, l_.str.4@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	mov	x0, x20
	mov	w2, #8
	bl	_read_from_stream
	mov	x26, x0
	bl	_FAILED
	cbnz	x0, LBB0_18
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	w1, #8
	bl	_subtract_bytes
	mov	x25, x0
	ldr	w0, [sp, #24]
	cmp	w0, #128
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #129
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #130
	b.ne	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [sp, #28]
	mov	x0, x27
	bl	_TRACE
	mov	x0, x20
	mov	x1, x24
	b	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [sp, #28]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	mov	x0, x20
	mov	x1, x22
	mov	w2, #8
	bl	_read_from_stream
	mov	x26, x0
	bl	_FAILED
	cbnz	x0, LBB0_18
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	w1, #8
	bl	_subtract_bytes
	mov	x25, x0
	ldr	w8, [sp, #28]
	cmp	w8, #8
	cset	w8, ne
	str	w8, [x19]
	b.eq	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x23
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [sp, #28]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_TRACE
	mov	x0, x20
	mov	x1, x21
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w2, #8
	bl	_read_from_stream
	mov	x26, x0
	bl	_FAILED
	cbnz	x0, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	w1, #8
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_debugstr_fourcc
	mov	x1, x0
	ldr	w8, [sp, #28]
	str	x8, [sp]
	mov	x0, x28
	bl	_TRACE
	ldr	w1, [sp, #28]
	mov	x0, x20
	bl	_advance_stream
	mov	x26, x0
	bl	_FAILED
	cbnz	x0, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [sp, #28]
	mov	x0, x25
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_subtract_bytes
	mov	x25, x0
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	x25, LBB0_2
LBB0_17:
Lloh10:
	adrp	x8, _S_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh12:
	ldr	w26, [x8]
LBB0_18:
	mov	x0, x26
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p, %p, %p, %u)\n"

l_.str.1:                               ; @.str.1
	.asciz	"RGNH chunk (region header): %u bytes\n"

l_.str.2:                               ; @.str.2
	.asciz	"WSMP chunk (wave sample): %u bytes\n"

l_.str.3:                               ; @.str.3
	.asciz	"WLNK chunk (wave link): %u bytes\n"

l_.str.4:                               ; @.str.4
	.asciz	"Unknown chunk %s (skipping): %u bytes\n"

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