	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_unistring
_read_unistring:                        ## @read_unistring
	.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, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rsi), %eax
	movl	%eax, -60(%rbp)
	leaq	-60(%rbp), %r14
	leaq	-56(%rbp), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movq	%r13, %rcx
	movl	$8, %r8d
	callq	_read_res_data
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$2, %edx
	callq	_windres_get_16
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	-60(%rbp), %edi
	subl	(%r15), %edi
	movl	%edi, -64(%rbp)                 ## 4-byte Spill
	andl	$-8, %edi
	callq	_xmalloc
	movq	%rax, %r13
	leaq	-56(%rbp), %r14
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	movq	%r14, %rcx
	movl	$8, %r8d
	callq	_read_res_data
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_windres_get_16
	movq	%rax, (%r13)
	addq	$8, %r13
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	sarl	$3, %ecx
	decl	%ecx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_read_unistring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_unistring
_read_unistring:                        ; @read_unistring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w8, [x1]
	str	w8, [sp, #12]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	add	x3, sp, #16
	mov	x0, x22
	mov	x2, x20
	mov	w4, #8
	bl	_read_res_data
	add	x1, sp, #16
	mov	x0, x22
	mov	w2, #2
	bl	_windres_get_16
	cbnz	x0, LBB0_1
; %bb.2:
	ldr	w8, [sp, #12]
	ldr	w9, [x21]
	sub	w24, w8, w9
	and	w0, w24, #0xfffffff8
	bl	_xmalloc
	mov	x23, x0
	mov	x25, x0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #16
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	w4, #8
	bl	_read_res_data
	add	x1, sp, #16
	mov	x0, x22
	mov	w2, #2
	bl	_windres_get_16
	str	x0, [x25], #8
	cbnz	x0, LBB0_3
; %bb.4:
	asr	w8, w24, #3
	sub	w8, w8, #1
	str	w8, [x19]
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_read_unistring
.subsections_via_symbols
