	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ucl_fetch_file                 ## -- Begin function ucl_fetch_file
	.p2align	4, 0x90
_ucl_fetch_file:                        ## @ucl_fetch_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	leaq	-80(%rbp), %rsi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.1:
	movl	-72(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r14
	testq	%r14, %r14
	je	LBB0_5
## %bb.6:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %r15d
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rbx
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	movq	%r14, %rsi
	movl	%r15d, %r8d
	xorl	%r9d, %r9d
	callq	_ucl_mmap
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, (%rbx)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movl	%r15d, %edi
	callq	_close
	jmp	LBB0_11
LBB0_2:
	xorl	%r13d, %r13d
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_ucl_create_err
	jmp	LBB0_12
LBB0_5:
	movq	$0, (%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
LBB0_11:
	movl	$1, %r13d
	jmp	LBB0_12
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_ucl_create_err
	xorl	%r13d, %r13d
	jmp	LBB0_12
LBB0_9:
	movl	%r15d, %edi
	callq	_close
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_ucl_create_err
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
LBB0_12:
	movl	%r13d, %eax
	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	"cannot stat file %s: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"cannot open file %s: %s"

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.2:                               ## @.str.2
	.asciz	"cannot mmap file %s: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ucl_fetch_file                 ; -- Begin function ucl_fetch_file
	.p2align	2
_ucl_fetch_file:                        ; @ucl_fetch_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	x23, x4
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	mov	x1, sp
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.1:
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x23, [sp]
	cbz	x23, LBB0_10
; %bb.3:
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.4:
	mov	x24, x0
Lloh3:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x1, x23
	mov	x4, x24
	mov	w5, #0
	bl	_ucl_mmap
	str	x0, [x21]
Lloh9:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.5:
	str	x23, [x22]
	mov	x0, x24
	bl	_close
	b	LBB0_11
LBB0_6:
	cbz	w23, LBB0_9
; %bb.7:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
LBB0_8:
	mov	x0, x20
	mov	x2, x19
	bl	_ucl_create_err
LBB0_9:
	mov	w0, #0
	b	LBB0_14
LBB0_10:
	str	xzr, [x21]
	str	xzr, [x22]
LBB0_11:
	mov	w0, #1
	b	LBB0_14
LBB0_12:
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_13:
	mov	x0, x24
	bl	_close
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_ucl_create_err
	mov	w0, #0
	str	xzr, [x21]
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot stat file %s: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"cannot open file %s: %s"

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.2:                               ; @.str.2
	.asciz	"cannot mmap file %s: %s"

.subsections_via_symbols
