	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_add_resource
_update_add_resource:                   ## @update_add_resource
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movq	%r8, %r13
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	%esi, %edi
	callq	_debugstr_w
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	movq	%rbx, %r15
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %r8
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	%r12d, %r9d
	callq	_TRACE
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_find_resource_dir_entry
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_HeapAlloc
	movq	%rax, %rbx
	movl	%r14d, %edi
	callq	_res_strdupW
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_list_init
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_add_resource_dir_entry
LBB0_2:
	movq	%rbx, %rdi
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_find_resource_dir_entry
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_HeapAlloc
	movq	%rax, %r15
	movl	%r14d, %edi
	callq	_res_strdupW
	movq	%rax, 8(%r15)
	movq	%r15, %rdi
	callq	_list_init
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_add_resource_dir_entry
LBB0_4:
	movq	%r15, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_find_resource_data
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_6
## %bb.7:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_list_remove
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_HeapFree
LBB0_8:
	movq	_TRUE@GOTPCREL(%rip), %rbx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_add_resource_data_entry
	jmp	LBB0_10
LBB0_6:
	movq	_FALSE@GOTPCREL(%rip), %rbx
LBB0_10:
	movl	(%rbx), %eax
	addq	$24, %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 %s %s %p %d\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_update_add_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_add_resource
_update_add_resource:                   ; @update_add_resource
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x5
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x25, x1
	mov	x24, x0
	mov	x0, x1
	bl	_debugstr_w
	mov	x23, x0
	mov	x0, x22
	bl	_debugstr_w
	mov	x3, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x24
	mov	x2, x23
	mov	x4, x19
	mov	x5, x20
	bl	_TRACE
	mov	x0, x24
	mov	x1, x25
	bl	_find_resource_dir_entry
	mov	x23, x0
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	w2, #16
	bl	_HeapAlloc
	mov	x23, x0
	mov	x0, x25
	bl	_res_strdupW
	str	x0, [x23, #8]
	mov	x0, x23
	bl	_list_init
	mov	x0, x24
	mov	x1, x23
	bl	_add_resource_dir_entry
LBB0_2:
	mov	x0, x23
	mov	x1, x22
	bl	_find_resource_dir_entry
	mov	x24, x0
	cbnz	x0, LBB0_4
; %bb.3:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	w2, #16
	bl	_HeapAlloc
	mov	x24, x0
	mov	x0, x22
	bl	_res_strdupW
	str	x0, [x24, #8]
	mov	x0, x24
	bl	_list_init
	mov	x0, x23
	mov	x1, x24
	bl	_add_resource_dir_entry
LBB0_4:
	mov	x0, x24
	mov	x1, x21
	bl	_find_resource_data
	cbz	x0, LBB0_7
; %bb.5:
	cbz	w20, LBB0_10
; %bb.6:
	mov	x21, x0
	bl	_list_remove
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x21
	bl	_HeapFree
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	mov	x0, x24
	mov	x1, x19
	bl	_add_resource_data_entry
LBB0_9:
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh4:
	adrp	x8, _FALSE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p %s %s %p %d\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_update_add_resource
.subsections_via_symbols
