	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_getbuffer                 ## -- Begin function file_getbuffer
	.p2align	4, 0x90
_file_getbuffer:                        ## @file_getbuffer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 24(%rdi)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_2:
	movq	%rdi, %r15
	movq	_R_MAGIC_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	8(%rdi), %rax
	testl	%ecx, (%rdi)
	jne	LBB0_26
## %bb.3:
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rdi
	callq	_strlen
	movq	_SIZE_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	-1(%rcx), %edx
	addl	$2, %ecx
	testl	%edx, %edx
	cmovnsl	%edx, %ecx
	movq	%rax, %r14
	sarl	$2, %ecx
	movslq	%ecx, %rax
	cmpq	%rax, %r14
	jbe	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_eprintf
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_8:
	leaq	1(,%r14,4), %rbx
	movq	16(%r15), %rdi
	movq	%rbx, %rsi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, 16(%r15)
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	16(%r15), %r12
	testq	%r14, %r14
	jle	LBB0_17
## %bb.11:
	movq	8(%r15), %rbx
	addq	%rbx, %r14
	jmp	LBB0_12
LBB0_27:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_memcpy
	addq	%r13, %rbx
	addq	%r13, %r12
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpq	%r14, %rbx
	jae	LBB0_17
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	%r14, %rdx
	subq	%rbx, %rdx
	leaq	-44(%rbp), %rdi
	movq	%rbx, %rsi
	leaq	-48(%rbp), %rcx
	callq	_mbrtowc
	cmpq	$-3, %rax
	ja	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%rax, %r13
	movl	-44(%rbp), %edi
	callq	_iswprint
	testq	%rax, %rax
	jne	LBB0_27
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	testq	%r13, %r13
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_OCTALIFY
	decq	%r13
	jne	LBB0_15
	jmp	LBB0_16
LBB0_17:
	movb	$0, (%r12)
	jmp	LBB0_25
LBB0_9:
	movq	%r15, %rdi
	movq	%rbx, %rsi
LBB0_7:
	callq	_file_oomem
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_18:
	movb	$0, (%r12)
	movq	8(%r15), %rbx
	movq	16(%r15), %r14
	movb	(%rbx), %al
	jmp	LBB0_19
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_OCTALIFY
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movzbl	1(%rbx), %eax
	incq	%rbx
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	testb	%al, %al
	je	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movsbl	%al, %edi
	callq	_isprint
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movzbl	(%rbx), %eax
	movb	%al, (%r14)
	incq	%r14
	jmp	LBB0_23
LBB0_24:
	movb	$0, (%r14)
LBB0_25:
	movq	16(%r15), %rax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_MAGIC_RAW,4,2                ## @R_MAGIC_RAW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ms->o.buf = NULL\n"

	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_getbuffer                 ; -- Begin function file_getbuffer
	.p2align	2
_file_getbuffer:                        ; @file_getbuffer
	.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
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_23
LBB0_2:
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _R_MAGIC_RAW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _R_MAGIC_RAW@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	x0, [x0, #8]
	tst	w9, w8
	b.ne	LBB0_23
; %bb.3:
	cbz	x0, LBB0_6
; %bb.4:
	bl	_strlen
	mov	x22, x0
Lloh3:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w9, w8, #1
	add	w8, w8, #2
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w8, w8, #2
	cmp	x0, w8, sxtw
	b.ls	LBB0_7
; %bb.5:
	mov	x0, x19
	mov	x1, x22
	b	LBB0_17
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_eprintf
	mov	x0, #0
	b	LBB0_23
LBB0_7:
	mov	w20, #1
	bfi	x20, x22, #2, #62
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_realloc
	cbz	x0, LBB0_16
; %bb.8:
	str	x0, [x19, #16]
	add	x0, sp, #12
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x20, [x19, #16]
	cmp	x22, #1
	b.lt	LBB0_22
; %bb.9:
	ldr	x21, [x19, #8]
	add	x23, x21, x22
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	add	x21, x21, x22
	add	x20, x20, x22
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	x21, x23
	b.hs	LBB0_22
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	sub	x2, x23, x21
	add	x0, sp, #8
	add	x3, sp, #12
	mov	x1, x21
	bl	_mbrtowc
	cmn	x0, #3
	b.hi	LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x22, x0
	ldr	w0, [sp, #8]
	bl	_iswprint
	cbnz	x0, LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	cbz	x22, LBB0_11
LBB0_15:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	x22, x22, #1
	mov	x0, x20
	mov	x1, x21
	bl	_OCTALIFY
	cbnz	x22, LBB0_15
	b	LBB0_11
LBB0_16:
	mov	x0, x19
	mov	x1, x20
LBB0_17:
	bl	_file_oomem
	mov	x0, #0
	b	LBB0_23
LBB0_18:
	strb	wzr, [x20]
	ldp	x21, x20, [x19, #8]
	ldrb	w8, [x21]
	cbnz	w8, LBB0_20
	b	LBB0_22
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_OCTALIFY
	ldrb	w8, [x21, #1]!
	cbz	w8, LBB0_22
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	sxtb	w0, w8
	bl	_isprint
	cbz	x0, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldrb	w8, [x21]
	strb	w8, [x20], #1
	ldrb	w8, [x21, #1]!
	cbnz	w8, LBB0_20
LBB0_22:
	strb	wzr, [x20]
	ldr	x0, [x19, #16]
LBB0_23:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_R_MAGIC_RAW,4,2                ; @R_MAGIC_RAW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ms->o.buf = NULL\n"

	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
.subsections_via_symbols
