	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bin_to_res_fontdir
_bin_to_res_fontdir:                    ## @bin_to_res_fontdir
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	cmpl	$1, %edx
	jg	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_toosmall
LBB0_2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_windres_get_16
	movq	$0, -48(%rbp)
	xorl	%r12d, %r12d
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_18
## %bb.3:
	leaq	-48(%rbp), %r13
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.3(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_toosmall
	movl	%r15d, %r12d
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	addl	$2, %r12d
	movl	%r12d, (%r13)
	movq	%r14, 8(%r13)
	movq	$0, 16(%r13)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	addq	$16, %r13
	addq	%r12, %r14
	subl	%r12d, %ebx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	incl	%r12d
	cmpl	-64(%rbp), %r12d                ## 4-byte Folded Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_17
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	cmpl	$55, %ebx
	jg	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_toosmall
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$32, %edi
	callq	_res_alloc
	movq	%rax, %r13
	movq	(%r14), %rsi
	movq	%r15, %rdi
	movl	$2, %edx
	callq	_windres_get_16
	movq	%rax, 24(%r13)
	movl	$56, %r12d
	cmpl	$57, %ebx
	jb	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$56, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %eax
	cmpb	$0, (%r14,%rax)
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	incl	%r12d
	cmpl	%r12d, %ebx
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %r12d
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_toosmall
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%r12), %r15d
	cmpl	%r15d, %ebx
	cmoval	%ebx, %r15d
	decl	%r15d
	decl	%r12d
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	2(%r12), %eax
	cmpl	%ebx, %eax
	jae	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	%eax, %eax
	incl	%r12d
	cmpb	$0, (%r14,%rax)
	jne	LBB0_13
	jmp	LBB0_16
LBB0_17:
	movq	-48(%rbp), %r12
LBB0_18:
	movl	$16, %edi
	callq	_res_alloc
	movq	_RES_TYPE_FONTDIR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	%r12, (%rax)
	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	"fontdir header"

L_.str.1:                               ## @.str.1
	.asciz	"fontdir"

L_.str.2:                               ## @.str.2
	.asciz	"fontdir device name"

L_.str.3:                               ## @.str.3
	.asciz	"fontdir face name"

	.comm	_RES_TYPE_FONTDIR,4,2           ## @RES_TYPE_FONTDIR
	.no_dead_strip	_bin_to_res_fontdir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bin_to_res_fontdir
_bin_to_res_fontdir:                    ; @bin_to_res_fontdir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
	cmp	w2, #1
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	bl	_toosmall
LBB0_2:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #2
	bl	_windres_get_16
	mov	x22, x0
	str	xzr, [sp, #8]
	cmp	w22, #1
	b.lt	LBB0_17
; %bb.3:
	mov	w27, #0
	add	x28, sp, #8
Lloh2:
	adrp	x25, l_.str.2@PAGE
Lloh3:
	add	x25, x25, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
Lloh4:
	adrp	x0, l_.str.3@PAGE
Lloh5:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__
	bl	_toosmall
	mov	x8, x24
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w8, #2
	str	w8, [x26]
	str	x20, [x26, #8]
	mov	x9, x26
	str	xzr, [x9, #16]!
	str	x26, [x28]
	add	x20, x20, x8
	sub	w23, w23, w8
	add	w27, w27, #1
	mov	x28, x9
	cmp	w27, w22
	b.eq	LBB0_16
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_14 Depth 2
	cmp	w23, #55
	b.gt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	bl	_toosmall
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #32
	bl	_res_alloc
	mov	x26, x0
	ldr	x1, [x20]
	mov	x0, x21
	mov	w2, #2
	bl	_windres_get_16
	str	x0, [x26, #24]
	mov	w19, #56
	cmp	w23, #57
	b.lo	LBB0_12
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w8, [x20, w19, uxtw]
	cbz	w8, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	w19, w19, #1
	cmp	w23, w19
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x19, x23
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	bl	__
	bl	_toosmall
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w19, #1
	cmp	w23, w8
	csinc	w8, w23, w19, hi
	sub	w24, w8, #1
	sub	w8, w19, #1
LBB0_14:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w9, w8, #2
	cmp	w9, w23
	b.hs	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldrb	w9, [x20, w9, uxtw]
	add	w8, w8, #1
	cbnz	w9, LBB0_14
	b	LBB0_5
LBB0_16:
	ldr	x19, [sp, #8]
	b	LBB0_18
LBB0_17:
	mov	x19, #0
LBB0_18:
	mov	w0, #16
	bl	_res_alloc
Lloh8:
	adrp	x8, _RES_TYPE_FONTDIR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RES_TYPE_FONTDIR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	x19, [x0]
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fontdir header"

l_.str.1:                               ; @.str.1
	.asciz	"fontdir"

l_.str.2:                               ; @.str.2
	.asciz	"fontdir device name"

l_.str.3:                               ; @.str.3
	.asciz	"fontdir face name"

	.comm	_RES_TYPE_FONTDIR,4,2           ; @RES_TYPE_FONTDIR
	.no_dead_strip	_bin_to_res_fontdir
.subsections_via_symbols
