	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgzf_seek                      ## -- Begin function bgzf_seek
	.p2align	4, 0x90
_bgzf_seek:                             ## @bgzf_seek
	.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	%rdi, %rbx
	cmpb	$114, (%rdi)
	jne	LBB0_2
## %bb.1:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_2
## %bb.4:
	movl	%esi, %r14d
	movl	%esi, %r15d
	sarl	$16, %r15d
	movl	28(%rbx), %edi
	movl	%r15d, %esi
	callq	__bgzf_seek
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movzwl	%r14w, %eax
	movq	$0, 16(%rbx)
	movl	%r15d, 4(%rbx)
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_2:
	movq	_BGZF_ERR_MISUSE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_BGZF_ERR_IO@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
	movl	$-1, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_BGZF_ERR_MISUSE,4,2            ## @BGZF_ERR_MISUSE
	.comm	_BGZF_ERR_IO,4,2                ## @BGZF_ERR_IO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgzf_seek                      ; -- Begin function bgzf_seek
	.p2align	2
_bgzf_seek:                             ; @bgzf_seek
	.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
	mov	x19, x0
	ldrb	w8, [x0]
Lloh0:
	adrp	x9, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, #114
	ccmp	w9, w2, #0, eq
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _BGZF_ERR_MISUSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BGZF_ERR_MISUSE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x20, x1
	asr	w21, w1, #16
	ldr	w0, [x19, #28]
	mov	x1, x21
	bl	__bgzf_seek
	tbnz	x0, #63, LBB0_4
; %bb.3:
	mov	w0, #0
	str	xzr, [x19, #16]
	and	w8, w20, #0xffff
	stp	w21, w8, [x19, #4]
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _BGZF_ERR_IO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BGZF_ERR_IO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
	mov	w0, #-1
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_BGZF_ERR_MISUSE,4,2            ; @BGZF_ERR_MISUSE
	.comm	_BGZF_ERR_IO,4,2                ; @BGZF_ERR_IO
.subsections_via_symbols
