	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_res_directory
_write_res_directory:                   ## @write_res_directory
	.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	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %r14
	testq	%r14, %r14
	je	LBB0_18
## %bb.1:
	movq	%r9, %r15
	movq	%rcx, %r13
	movl	16(%rbp), %ebx
	leal	1(%rbx), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rdx
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r13, %rcx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r15, %r9
	callq	_write_res_directory
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r12d
	movq	40(%r14), %r14
	testq	%r14, %r14
	je	LBB0_18
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$3, %ebx
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %ebx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, %ebx
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	24(%r14), %r13
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	24(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 32(%r14)
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r14), %rax
	cmpq	$65535, %rax                    ## imm = 0xFFFF
	ja	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r15), %rcx
	cmpq	%rcx, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, (%r15)
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 16(%r14)
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$3, %ebx
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %r8d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r13, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_fprintf
	movl	(%r14), %r8d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %r9
	callq	_write_res_resource
	jmp	LBB0_17
LBB0_18:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"// Resource at unexpected level %d\n"

	.no_dead_strip	_write_res_directory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_res_directory
_write_res_directory:                   ; @write_res_directory
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x26, x1
	ldr	x27, [x2]
	cbz	x27, LBB0_14
; %bb.1:
	mov	x19, x6
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x0
	add	w24, w6, #1
Lloh0:
	adrp	x28, _stderr@GOTPAGE
Lloh1:
	ldr	x28, [x28, _stderr@GOTPAGEOFF]
Lloh2:
	adrp	x25, l_.str@PAGE
Lloh3:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x2, [x27, #8]
	mov	x0, x23
	mov	x1, x26
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	mov	x6, x24
	bl	_write_res_directory
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x0
	ldr	x27, [x27, #40]
	cbz	x27, LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w19, #3
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x27, #24
	cmp	w19, #1
	csel	x9, x22, x8, ne
	cmp	w19, #2
	csel	x21, x8, x21, eq
	csel	x22, x22, x9, eq
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x27, #16]
	cbnz	x8, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w19, #3
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w4, [x27]
	mov	x0, x23
	mov	x1, x26
	mov	x2, x22
	mov	x3, x21
	b	LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x27, #32]
	cbnz	w8, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x27, #24]
	ldrsw	x9, [x20]
	lsr	x10, x8, #16
	cmp	x10, #0
	ccmp	x8, x9, #4, eq
	b.eq	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x20]
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x28]
	mov	x1, x25
	mov	x2, x19
	bl	_fprintf
	ldr	w4, [x27]
	mov	x0, x23
	mov	x1, x26
	mov	x2, x22
	mov	x3, #0
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x5, x20
	bl	_write_res_resource
	b	LBB0_3
LBB0_14:
	mov	x0, x26
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"// Resource at unexpected level %d\n"

	.no_dead_strip	_write_res_directory
.subsections_via_symbols
