	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgzf_dopen                     ## -- Begin function bgzf_dopen
	.p2align	4, 0x90
_bgzf_dopen:                            ## @bgzf_dopen
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	movq	%rsi, %rdi
	movl	$114, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movl	$82, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	__bgzf_dopen
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_bgzf_read_init
LBB0_4:
	movq	%rbx, (%rax)
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	movl	$119, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	movl	$87, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_5
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_fdopen
	testq	%rax, %rax
	je	LBB0_5
## %bb.10:
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_mode2level
	movl	%eax, %edi
	callq	_bgzf_write_init
	jmp	LBB0_4
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgzf_dopen                     ; -- Begin function bgzf_dopen
	.p2align	2
_bgzf_dopen:                            ; @bgzf_dopen
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #114
	bl	_strchr
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #82
	bl	_strchr
	cbz	x0, LBB0_6
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	__bgzf_dopen
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	bl	_bgzf_read_init
LBB0_4:
	str	x20, [x0]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	mov	w1, #119
	bl	_strchr
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #87
	bl	_strchr
	cbz	x0, LBB0_5
LBB0_8:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_fdopen
	cbz	x0, LBB0_5
; %bb.9:
	mov	x20, x0
	mov	x0, x19
	bl	_mode2level
	bl	_bgzf_write_init
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

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

.subsections_via_symbols
