	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bzopen_or_bzdopen
_bzopen_or_bzdopen:                     ## @bzopen_or_bzdopen
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	%rsp, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BZ_MAX_UNUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movw	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	xorl	%ebx, %ebx
	testq	%r12, %r12
	je	LBB0_31
## %bb.1:
	movl	%r13d, -76(%rbp)                ## 4-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movb	(%r12), %cl
	testb	%cl, %cl
	je	LBB0_2
## %bb.3:
	movq	_BZ_HDR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incq	%r12
	movl	$9, %r13d
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %r15d
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movzbl	(%r12), %ecx
	incq	%r12
	testb	%cl, %cl
	je	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	%cl, %ecx
	cmpl	$114, %ecx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$115, %ecx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$119, %ecx
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	leal	-48(%rcx), %edx
	subl	%eax, %ecx
	cmpl	$10, %edx
	cmovbl	%ecx, %r13d
	jmp	LBB0_11
LBB0_2:
	movl	$9, %r13d
	xorl	%r15d, %r15d
LBB0_12:
	testl	%ebx, %ebx
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	callq	_strcat
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcat
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.20:
	leaq	-64(%rbp), %rsi
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	callq	_fdopen
LBB0_21:
	movq	%rax, %r14
	testq	%r14, %r14
	je	LBB0_23
LBB0_24:
	testl	%ebx, %ebx
	je	LBB0_26
## %bb.25:
	cmpl	$2, %r13d
	movl	$1, %eax
	cmovgel	%r13d, %eax
	cmpl	$9, %eax
	movl	$9, %edx
	cmovbl	%eax, %edx
	leaq	-80(%rbp), %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	movl	$30, %r8d
	callq	_BZ2_bzWriteOpen
	jmp	LBB0_27
LBB0_13:
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.19:
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_fopen
	jmp	LBB0_21
LBB0_26:
	leaq	-80(%rbp), %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	xorl	%r9d, %r9d
	callq	_BZ2_bzReadOpen
LBB0_27:
	movq	%rax, %rbx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_31
## %bb.28:
	movq	_stdin@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	(%rax), %r14
	je	LBB0_31
## %bb.29:
	movq	_stdout@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_31
## %bb.30:
	movq	%r14, %rdi
	callq	_fclose
	xorl	%ebx, %ebx
	jmp	LBB0_31
LBB0_15:
	testl	%ebx, %ebx
	jne	LBB0_16
## %bb.17:
	movq	_stdin@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_16:
	movq	_stdout@GOTPCREL(%rip), %rax
LBB0_18:
	movq	(%rax), %r14
	movq	%r14, %rdi
	callq	_SET_BINARY_MODE
	testq	%r14, %r14
	jne	LBB0_24
LBB0_23:
	xorl	%ebx, %ebx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_31:
	movq	%r15, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_33
## %bb.32:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BZ_MAX_UNUSED,4,2              ## @BZ_MAX_UNUSED
	.comm	_BZ_HDR_0,4,2                   ## @BZ_HDR_0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

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

L_.str.2:                               ## @.str.2
	.asciz	"b"

L_.str.3:                               ## @.str.3
	.space	1

	.comm	_stdout,8,3                     ## @stdout
	.comm	_stdin,8,3                      ## @stdin
	.no_dead_strip	_bzopen_or_bzdopen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bzopen_or_bzdopen
_bzopen_or_bzdopen:                     ; @bzopen_or_bzdopen
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #32
	mov	x23, x3
	mov	x22, x1
	mov	x21, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _BZ_MAX_UNUSED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BZ_MAX_UNUSED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	sturh	wzr, [x29, #-80]
	stur	xzr, [x29, #-88]
	cbz	x2, LBB0_18
; %bb.1:
	ldrb	w11, [x2]
	cbz	w11, LBB0_4
; %bb.2:
	mov	w20, #0
	mov	w26, #0
Lloh8:
	adrp	x8, _BZ_HDR_0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BZ_HDR_0@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	add	x9, x2, #1
	mov	w25, #9
	mov	w10, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sxtb	w12, w11
	and	w11, w11, #0xff
	sub	w13, w12, #48
	sub	w14, w12, w8
	cmp	w13, #10
	csel	w13, w14, w25, lo
	cmp	w12, #119
	csel	w14, w26, w10, ne
	csel	w13, w13, w25, ne
	cmp	w12, #115
	csel	w12, w26, w14, eq
	csel	w13, w25, w13, eq
	csel	w14, w10, w20, eq
	cmp	w11, #114
	csel	w26, wzr, w12, eq
	csel	w25, w25, w13, eq
	csel	w20, w20, w14, eq
	ldrb	w11, [x9], #1
	cbnz	w11, LBB0_3
	b	LBB0_5
LBB0_4:
	mov	w26, #0
	mov	w20, #0
	mov	w25, #9
LBB0_5:
Lloh11:
	adrp	x8, l_.str@PAGE
Lloh12:
	add	x8, x8, l_.str@PAGEOFF
Lloh13:
	adrp	x9, l_.str.1@PAGE
Lloh14:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w26, #0
	csel	x1, x9, x8, eq
	sub	x0, x29, #88
	bl	_strcat
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	sub	x0, x29, #88
	bl	_strcat
	cbz	w23, LBB0_8
; %bb.6:
	sub	x1, x29, #88
	mov	x0, x22
	bl	_fdopen
LBB0_7:
	mov	x21, x0
	cbnz	x21, LBB0_12
	b	LBB0_18
LBB0_8:
	cbz	x21, LBB0_11
; %bb.9:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_11
; %bb.10:
	sub	x1, x29, #88
	mov	x0, x21
	bl	_fopen
	b	LBB0_7
LBB0_11:
Lloh19:
	adrp	x8, _stdout@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh21:
	adrp	x9, _stdin@GOTPAGE
Lloh22:
	ldr	x9, [x9, _stdin@GOTPAGEOFF]
	cmp	w26, #0
	csel	x8, x9, x8, eq
	ldr	x21, [x8]
	mov	x0, x21
	bl	_SET_BINARY_MODE
	cbz	x21, LBB0_18
LBB0_12:
	cbz	w26, LBB0_14
; %bb.13:
	cmp	w25, #1
	csinc	w8, w25, wzr, gt
	mov	w9, #9
	cmp	w8, #9
	csel	w2, w8, w9, lo
	sub	x0, x29, #92
	mov	x1, x21
	mov	w3, #0
	mov	w4, #30
	bl	_BZ2_bzWriteOpen
	cbnz	x0, LBB0_19
	b	LBB0_15
LBB0_14:
	sub	x0, x29, #92
	mov	x1, x21
	mov	w2, #0
	mov	x3, x20
	mov	x4, x19
	mov	w5, #0
	bl	_BZ2_bzReadOpen
	cbnz	x0, LBB0_19
LBB0_15:
Lloh23:
	adrp	x8, _stdin@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_19
; %bb.16:
Lloh26:
	adrp	x8, _stdout@GOTPAGE
Lloh27:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_19
; %bb.17:
	mov	x0, x21
	bl	_fclose
LBB0_18:
	mov	x0, #0
LBB0_19:
	mov	sp, x24
	ldur	x8, [x29, #-72]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_BZ_MAX_UNUSED,4,2              ; @BZ_MAX_UNUSED
	.comm	_BZ_HDR_0,4,2                   ; @BZ_HDR_0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

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

l_.str.2:                               ; @.str.2
	.asciz	"b"

l_.str.3:                               ; @.str.3
	.space	1

	.comm	_stdout,8,3                     ; @stdout
	.comm	_stdin,8,3                      ; @stdin
	.no_dead_strip	_bzopen_or_bzdopen
.subsections_via_symbols
