	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_filetype
_get_filetype:                          ## @get_filetype
	.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
	movl	$16400, %eax                    ## imm = 0x4010
	callq	____chkstk_darwin
	subq	%rax, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-16432(%rbp), %rdi
	movl	$16384, %esi                    ## imm = 0x4000
	callq	___bzero
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_r_magic_new
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	_R2_SDB_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_r_magic_load
	xorl	%r14d, %r14d
	leaq	-16432(%rbp), %r12
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	movl	$16384, %ecx                    ## imm = 0x4000
	callq	_r_buf_read_at
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$16384, %edx                    ## imm = 0x4000
	callq	_r_magic_buffer
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %rdi
	callq	_strdup
	movq	%rax, %r14
LBB0_3:
	movq	%rbx, %rdi
	callq	_r_magic_free
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rax
	addq	$16400, %rsp                    ## imm = 0x4010
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_R2_SDB_MAGIC,4,2               ## @R2_SDB_MAGIC
	.no_dead_strip	_get_filetype
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_filetype
_get_filetype:                          ; @get_filetype
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	mov	w9, #16400
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #4, lsl #12             ; =16384
	sub	sp, sp, #16
	mov	x20, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x0, sp, #8
	mov	w1, #16384
	bl	_bzero
	mov	w0, #0
	bl	_r_magic_new
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh5:
	adrp	x8, _R2_SDB_MAGIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R2_SDB_MAGIC@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_r_magic_load
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #0
	mov	w3, #16384
	bl	_r_buf_read_at
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #16384
	bl	_r_magic_buffer
	cbz	x0, LBB0_4
; %bb.2:
	bl	_strdup
	mov	x20, x0
	b	LBB0_5
LBB0_3:
	mov	x20, #0
	b	LBB0_6
LBB0_4:
	mov	x20, #0
LBB0_5:
	mov	x0, x19
	bl	_r_magic_free
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	add	sp, sp, #4, lsl #12             ; =16384
	add	sp, sp, #16
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_R2_SDB_MAGIC,4,2               ; @R2_SDB_MAGIC
	.no_dead_strip	_get_filetype
.subsections_via_symbols
