	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifolog_reader_open            ## -- Begin function fifolog_reader_open
	.p2align	4, 0x90
_fifolog_reader_open:                   ## @fifolog_reader_open
	.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
	movq	%rdi, %r15
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	movq	%r12, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_fifolog_int_open
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	movq	8(%r12), %r15
	movl	(%r15), %ebx
	movl	$16, %edi
	movl	%ebx, %esi
	callq	_calloc
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
	movq	(%r14), %r15
	movl	(%r15), %ebx
LBB0_6:
	shll	$4, %ebx
	movl	%ebx, (%r12)
	movl	4(%r15), %edi
	callq	_inflateInit
	movq	_Z_OK@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_assert
	movq	_FIFOLOG_READER_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot malloc"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_Z_OK,4,2                       ## @Z_OK
	.comm	_FIFOLOG_READER_MAGIC,4,2       ## @FIFOLOG_READER_MAGIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifolog_reader_open            ; -- Begin function fifolog_reader_open
	.p2align	2
_fifolog_reader_open:                   ; @fifolog_reader_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x0
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	add	x20, x19, #8
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_fifolog_int_open
	cbz	x0, LBB0_4
; %bb.3:
	str	x0, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	ldr	x22, [x19, #8]
	ldr	w21, [x22]
	mov	w0, #16
	mov	x1, x21
	bl	_calloc
	str	x0, [x19, #16]
	cbnz	x0, LBB0_6
; %bb.5:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
	ldr	x22, [x20]
	ldr	w21, [x22]
LBB0_6:
	lsl	w8, w21, #4
	str	w8, [x19]
	ldr	w0, [x22, #4]
	bl	_inflateInit
Lloh6:
	adrp	x8, _Z_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Z_OK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, eq
	bl	_assert
Lloh9:
	adrp	x8, _FIFOLOG_READER_MAGIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FIFOLOG_READER_MAGIC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot malloc"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_Z_OK,4,2                       ; @Z_OK
	.comm	_FIFOLOG_READER_MAGIC,4,2       ; @FIFOLOG_READER_MAGIC
.subsections_via_symbols
