	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_buffer                    ## -- Begin function file_buffer
	.p2align	4, 0x90
_file_buffer:                           ## @file_buffer
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %eax
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.1:
	movq	%r8, %r12
	movq	%rcx, %r15
	movq	%rdi, %r14
	movl	(%rdi), %eax
	movq	_R_MAGIC_MIME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	%eax, %ebx
	cmpq	$1, %r8
	je	LBB0_6
## %bb.2:
	testq	%r12, %r12
	jne	LBB0_9
## %bb.3:
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.4:
	movq	_R_MAGIC_MIME_TYPE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_17
## %bb.5:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_16
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.7:
	movq	_R_MAGIC_MIME_TYPE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_17
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_16
LBB0_9:
	movq	_R_MAGIC_NO_CHECK_TAR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
LBB0_10:
	movq	_R_MAGIC_NO_CHECK_SOFT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_22
LBB0_11:
	movq	_R_MAGIC_NO_CHECK_ASCII@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_24
LBB0_12:
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.13:
	movq	_R_MAGIC_MIME_TYPE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_17
LBB0_14:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_file_printf
	movl	$-1, %eax
	jmp	LBB0_25
LBB0_15:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_16
LBB0_18:
	leaq	L_.str.3(%rip), %rsi
LBB0_16:
	movq	%r14, %rdi
	callq	_file_printf
	movl	%eax, %ecx
	movl	$-1, %eax
	cmpl	$-1, %ecx
	je	LBB0_25
LBB0_17:
	movl	$1, %eax
LBB0_25:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_file_is_tar
	testl	%eax, %eax
	jne	LBB0_25
## %bb.21:
	movl	(%r14), %eax
	jmp	LBB0_10
LBB0_22:
	movq	_BINTEST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_file_softmagic
	testl	%eax, %eax
	jne	LBB0_25
## %bb.23:
	movl	(%r14), %eax
	jmp	LBB0_11
LBB0_24:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_file_ascmagic
	testl	%eax, %eax
	jne	LBB0_25
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_R_MAGIC_MIME,4,2               ## @R_MAGIC_MIME
	.comm	_R_MAGIC_MIME_TYPE,4,2          ## @R_MAGIC_MIME_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"application/x-empty"

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

L_.str.2:                               ## @.str.2
	.asciz	"application/octet-stream"

L_.str.3:                               ## @.str.3
	.asciz	"very short file (no magic)"

	.comm	_R_MAGIC_NO_CHECK_TAR,4,2       ## @R_MAGIC_NO_CHECK_TAR
	.comm	_R_MAGIC_NO_CHECK_SOFT,4,2      ## @R_MAGIC_NO_CHECK_SOFT
	.comm	_BINTEST,4,2                    ## @BINTEST
	.comm	_R_MAGIC_NO_CHECK_ASCII,4,2     ## @R_MAGIC_NO_CHECK_ASCII
	.comm	_R_MAGIC_NO_CHECK_COMPRESS,4,2  ## @R_MAGIC_NO_CHECK_COMPRESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_buffer                    ; -- Begin function file_buffer
	.p2align	2
_file_buffer:                           ; @file_buffer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_15
; %bb.1:
	mov	x20, x4
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _R_MAGIC_MIME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _R_MAGIC_MIME@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w22, w9, w8
	cmp	x4, #1
	b.eq	LBB0_6
; %bb.2:
	cbnz	x20, LBB0_9
; %bb.3:
	cbz	w22, LBB0_16
; %bb.4:
Lloh3:
	adrp	x8, _R_MAGIC_MIME_TYPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R_MAGIC_MIME_TYPE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_19
; %bb.5:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_18
LBB0_6:
	cbz	w22, LBB0_17
; %bb.7:
Lloh8:
	adrp	x8, _R_MAGIC_MIME_TYPE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R_MAGIC_MIME_TYPE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_19
; %bb.8:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_9:
	mov	x21, x3
Lloh13:
	adrp	x9, _R_MAGIC_NO_CHECK_TAR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _R_MAGIC_NO_CHECK_TAR@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
LBB0_10:
Lloh16:
	adrp	x9, _R_MAGIC_NO_CHECK_SOFT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _R_MAGIC_NO_CHECK_SOFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
LBB0_11:
Lloh19:
	adrp	x9, _R_MAGIC_NO_CHECK_ASCII@GOTPAGE
Lloh20:
	ldr	x9, [x9, _R_MAGIC_NO_CHECK_ASCII@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_25
LBB0_12:
	cbz	w22, LBB0_14
; %bb.13:
Lloh22:
	adrp	x8, _R_MAGIC_MIME_TYPE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _R_MAGIC_MIME_TYPE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_19
LBB0_14:
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_file_printf
LBB0_15:
	mov	w0, #-1
	b	LBB0_20
LBB0_16:
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_17:
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_18:
	mov	x0, x19
	bl	_file_printf
	cmn	w0, #1
	b.eq	LBB0_20
LBB0_19:
	mov	w0, #1
LBB0_20:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_21:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_file_is_tar
	cbnz	w0, LBB0_20
; %bb.22:
	ldr	w8, [x19]
	b	LBB0_10
LBB0_23:
Lloh31:
	adrp	x8, _BINTEST@GOTPAGE
Lloh32:
	ldr	x8, [x8, _BINTEST@GOTPAGEOFF]
Lloh33:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_file_softmagic
	cbnz	w0, LBB0_20
; %bb.24:
	ldr	w8, [x19]
	b	LBB0_11
LBB0_25:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_file_ascmagic
	cbnz	w0, LBB0_20
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_R_MAGIC_MIME,4,2               ; @R_MAGIC_MIME
	.comm	_R_MAGIC_MIME_TYPE,4,2          ; @R_MAGIC_MIME_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"application/x-empty"

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

l_.str.2:                               ; @.str.2
	.asciz	"application/octet-stream"

l_.str.3:                               ; @.str.3
	.asciz	"very short file (no magic)"

	.comm	_R_MAGIC_NO_CHECK_TAR,4,2       ; @R_MAGIC_NO_CHECK_TAR
	.comm	_R_MAGIC_NO_CHECK_SOFT,4,2      ; @R_MAGIC_NO_CHECK_SOFT
	.comm	_BINTEST,4,2                    ; @BINTEST
	.comm	_R_MAGIC_NO_CHECK_ASCII,4,2     ; @R_MAGIC_NO_CHECK_ASCII
	.comm	_R_MAGIC_NO_CHECK_COMPRESS,4,2  ; @R_MAGIC_NO_CHECK_COMPRESS
.subsections_via_symbols
