	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bfd_fopen                      ## -- Begin function bfd_fopen
	.p2align	4, 0x90
_bfd_fopen:                             ## @bfd_fopen
	.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
	pushq	%rax
	.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, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	__bfd_new_bfd
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_bfd_find_target
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_real_fopen
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%r12, (%rbx)
	movb	(%r15), %al
	leal	-97(%rax), %ecx
	cmpb	$22, %cl
	ja	LBB0_11
## %bb.4:
	movzbl	%cl, %ecx
	movl	$4325377, %edx                  ## imm = 0x420001
	btq	%rcx, %rdx
	jae	LBB0_11
## %bb.5:
	cmpb	$43, 1(%r15)
	jne	LBB0_9
## %bb.6:
	movq	_both_direction@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	movq	_bfd_error_system_call@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_bfd_set_error
	jmp	LBB0_15
LBB0_9:
	cmpb	$114, %al
	jne	LBB0_11
## %bb.10:
	movq	_read_direction@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_write_direction@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_bfd_cache_init
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 8(%rbx)
	cmpl	$-1, %r14d
	jne	LBB0_17
## %bb.14:
	movq	%rbx, %rdi
	callq	_bfd_set_cacheable
	jmp	LBB0_17
LBB0_15:
	movq	%rbx, %rdi
	callq	__bfd_delete_bfd
LBB0_16:
	xorl	%ebx, %ebx
LBB0_17:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bfd_error_system_call,4,2      ## @bfd_error_system_call
	.comm	_both_direction,4,2             ## @both_direction
	.comm	_read_direction,4,2             ## @read_direction
	.comm	_write_direction,4,2            ## @write_direction
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bfd_fopen                      ; -- Begin function bfd_fopen
	.p2align	2
_bfd_fopen:                             ; @bfd_fopen
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	bl	__bfd_new_bfd
	mov	x19, x0
	cbz	x0, LBB0_14
; %bb.1:
	mov	x0, x23
	mov	x1, x19
	bl	_bfd_find_target
	cbz	x0, LBB0_13
; %bb.2:
	mov	x0, x22
	mov	x1, x21
	bl	_real_fopen
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.3:
	str	x22, [x19]
	ldrb	w8, [x21]
	sub	w9, w8, #97
	cmp	w9, #22
	mov	w10, #1
	lsl	w9, w10, w9
	mov	w10, #1
	movk	w10, #66, lsl #16
	and	w9, w9, w10
	ccmp	w9, #0, #4, ls
	b.eq	LBB0_9
; %bb.4:
	ldrb	w9, [x21, #1]
	cmp	w9, #43
	b.ne	LBB0_7
; %bb.5:
Lloh0:
	adrp	x8, _both_direction@GOTPAGE
Lloh1:
	ldr	x8, [x8, _both_direction@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
Lloh2:
	adrp	x8, _bfd_error_system_call@GOTPAGE
Lloh3:
	ldr	x8, [x8, _bfd_error_system_call@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_bfd_set_error
	b	LBB0_13
LBB0_7:
	cmp	w8, #114
	b.ne	LBB0_9
; %bb.8:
Lloh5:
	adrp	x8, _read_direction@GOTPAGE
Lloh6:
	ldr	x8, [x8, _read_direction@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh7:
	adrp	x8, _write_direction@GOTPAGE
Lloh8:
	ldr	x8, [x8, _write_direction@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_bfd_cache_init
	cbz	w0, LBB0_13
; %bb.11:
Lloh9:
	adrp	x8, _TRUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	str	w1, [x19, #8]
	cmn	w20, #1
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_bfd_set_cacheable
	b	LBB0_14
LBB0_13:
	mov	x0, x19
	bl	__bfd_delete_bfd
	mov	x19, #0
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_bfd_error_system_call,4,2      ; @bfd_error_system_call
	.comm	_both_direction,4,2             ; @both_direction
	.comm	_read_direction,4,2             ; @read_direction
	.comm	_write_direction,4,2            ; @write_direction
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
