	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_tmp_ini_file
_create_tmp_ini_file:                   ## @create_tmp_ini_file
	.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
	movq	%rsi, %r12
	movl	%edi, %r14d
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %r13
	movq	(%r13), %r15
	movq	%rsi, %rdi
	callq	_get_temp_ini_path
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_REGINST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	%edx, %esi
	callq	_FindResourceW
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_SizeofResource
	movl	%r14d, %edi
	movl	%ebx, %esi
	movq	%rax, %rbx
	callq	_LoadResource
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_LockResource
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.7:
	movq	%rax, %r13
	movq	_GENERIC_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CREATE_ALWAYS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_FILE_ATTRIBUTE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	$0, (%rsp)
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_CreateFileW
	movq	%rax, %r15
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	jmp	LBB0_14
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
LBB0_9:
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	callq	_WriteFile
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	cmpq	-48(%rbp), %rbx
	jne	LBB0_11
## %bb.17:
	movq	%r14, %rdi
	callq	_FreeResource
	movq	_TRUE@GOTPCREL(%rip), %rbx
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
LBB0_12:
	callq	_ERR
	testq	%r14, %r14
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %r13
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_FreeResource
LBB0_14:
	movq	_FALSE@GOTPCREL(%rip), %rbx
	cmpq	(%r13), %r15
	je	LBB0_16
LBB0_15:
	movq	%r15, %rdi
	callq	_CloseHandle
LBB0_16:
	movl	(%rbx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't get temp ini file path\n"

	.comm	_REGINST,4,2                    ## @REGINST
L_.str.1:                               ## @.str.1
	.asciz	"Can't find REGINST resource\n"

L_.str.2:                               ## @.str.2
	.asciz	"Can't load REGINST resource\n"

	.comm	_GENERIC_WRITE,4,2              ## @GENERIC_WRITE
	.comm	_CREATE_ALWAYS,4,2              ## @CREATE_ALWAYS
	.comm	_FILE_ATTRIBUTE_NORMAL,4,2      ## @FILE_ATTRIBUTE_NORMAL
L_.str.3:                               ## @.str.3
	.asciz	"Unable to create temp ini file\n"

L_.str.4:                               ## @.str.4
	.asciz	"Write failed\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_tmp_ini_file
_create_tmp_ini_file:                   ; @create_tmp_ini_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
	ldr	x19, [x24]
	mov	x0, x1
	bl	_get_temp_ini_path
	cbz	w0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _REGINST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REGINST@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x1
	bl	_FindResourceW
	cbz	w0, LBB0_5
; %bb.2:
	mov	x23, x0
	mov	x0, x20
	mov	x1, x23
	bl	_SizeofResource
	mov	x22, x0
	mov	x0, x20
	mov	x1, x23
	bl	_LoadResource
	mov	x20, x0
	bl	_LockResource
	cmp	x0, #0
	ccmp	x22, #0, #4, ne
	b.ne	LBB0_6
; %bb.3:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
	cbnz	x20, LBB0_8
	b	LBB0_9
LBB0_4:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	b	LBB0_9
LBB0_5:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	b	LBB0_9
LBB0_6:
	mov	x23, x0
Lloh11:
	adrp	x8, _GENERIC_WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GENERIC_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _CREATE_ALWAYS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CREATE_ALWAYS@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
Lloh17:
	adrp	x8, _FILE_ATTRIBUTE_NORMAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FILE_ATTRIBUTE_NORMAL@GOTPAGEOFF]
Lloh19:
	ldr	w5, [x8]
	mov	x0, x21
	mov	w2, #0
	mov	x3, #0
	mov	x6, #0
	bl	_CreateFileW
	mov	x19, x0
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.7:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ERR
	cbz	x20, LBB0_9
LBB0_8:
	mov	x0, x20
	bl	_FreeResource
LBB0_9:
	ldr	x8, [x24]
Lloh22:
	adrp	x20, _FALSE@GOTPAGE
Lloh23:
	ldr	x20, [x20, _FALSE@GOTPAGEOFF]
	cmp	x19, x8
	b.eq	LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_CloseHandle
LBB0_11:
	ldr	w0, [x20]
	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
	add	sp, sp, #80
	ret
LBB0_12:
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	x4, #0
	bl	_WriteFile
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x22, x8, #0, ne
	b.eq	LBB0_14
; %bb.13:
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_ERR
	cbnz	x20, LBB0_8
	b	LBB0_9
LBB0_14:
	mov	x0, x20
	bl	_FreeResource
Lloh26:
	adrp	x20, _TRUE@GOTPAGE
Lloh27:
	ldr	x20, [x20, _TRUE@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't get temp ini file path\n"

	.comm	_REGINST,4,2                    ; @REGINST
l_.str.1:                               ; @.str.1
	.asciz	"Can't find REGINST resource\n"

l_.str.2:                               ; @.str.2
	.asciz	"Can't load REGINST resource\n"

	.comm	_GENERIC_WRITE,4,2              ; @GENERIC_WRITE
	.comm	_CREATE_ALWAYS,4,2              ; @CREATE_ALWAYS
	.comm	_FILE_ATTRIBUTE_NORMAL,4,2      ; @FILE_ATTRIBUTE_NORMAL
l_.str.3:                               ; @.str.3
	.asciz	"Unable to create temp ini file\n"

l_.str.4:                               ; @.str.4
	.asciz	"Write failed\n"

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