	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bfd_close                      ## -- Begin function bfd_close
	.p2align	4, 0x90
_bfd_close:                             ## @bfd_close
	.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
	callq	_bfd_write_p
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	__bfd_write_contents@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%rbx, %rdx
	callq	_BFD_SEND_FMT
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	__close_and_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%rbx, %rdx
	callq	_BFD_SEND
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	_BFD_IN_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.6:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	testq	%r14, %r14
	jne	LBB0_8
	jmp	LBB0_12
LBB0_2:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_13
LBB0_5:
	movq	24(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	%rax, %r14
	testq	%r14, %r14
	je	LBB0_12
LBB0_8:
	movq	8(%rbx), %rax
	movq	_write_direction@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	movq	_EXEC_P@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_12
## %bb.10:
	movl	16(%rbx), %edi
	leaq	-32(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	xorl	%edi, %edi
	callq	_umask
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_umask
	movl	16(%rbx), %edi
	movq	_S_IXUSR@GOTPCREL(%rip), %rax
	movq	_S_IXGRP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_S_IXOTH@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%r15d
	andl	%ecx, %r15d
	orl	-32(%rbp), %r15d
	andl	$511, %r15d                     ## imm = 0x1FF
	movl	%r15d, %esi
	callq	_chmod
LBB0_12:
	movq	%rbx, %rdi
	callq	__bfd_delete_bfd
LBB0_13:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__bfd_write_contents,4,2        ## @_bfd_write_contents
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	__close_and_cleanup,4,2         ## @_close_and_cleanup
	.comm	_BFD_IN_MEMORY,4,2              ## @BFD_IN_MEMORY
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_write_direction,8,3            ## @write_direction
	.comm	_EXEC_P,4,2                     ## @EXEC_P
	.comm	_S_IXUSR,4,2                    ## @S_IXUSR
	.comm	_S_IXGRP,4,2                    ## @S_IXGRP
	.comm	_S_IXOTH,4,2                    ## @S_IXOTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bfd_close                      ; -- Begin function bfd_close
	.p2align	2
_bfd_close:                             ; @bfd_close
	.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	x19, x0
	bl	_bfd_write_p
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, __bfd_write_contents@GOTPAGE
Lloh1:
	ldr	x8, [x8, __bfd_write_contents@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x19
	bl	_BFD_SEND_FMT
	cbz	w0, LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, __close_and_cleanup@GOTPAGE
Lloh4:
	ldr	x8, [x8, __close_and_cleanup@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x19
	bl	_BFD_SEND
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _BFD_IN_MEMORY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BFD_IN_MEMORY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
Lloh9:
	adrp	x8, _TRUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh11:
	ldr	x20, [x8]
	cbnz	x20, LBB0_7
	b	LBB0_11
LBB0_5:
Lloh12:
	adrp	x8, _FALSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh14:
	ldr	x20, [x8]
	b	LBB0_12
LBB0_6:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbz	x20, LBB0_11
LBB0_7:
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _write_direction@GOTPAGE
Lloh16:
	ldr	x9, [x9, _write_direction@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.8:
	ldr	w8, [x19]
Lloh18:
	adrp	x9, _EXEC_P@GOTPAGE
Lloh19:
	ldr	x9, [x9, _EXEC_P@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	ldr	w0, [x19, #16]
	add	x1, sp, #8
	bl	_stat
	cbnz	x0, LBB0_11
; %bb.10:
	bl	_umask
	mov	x21, x0
	bl	_umask
	ldr	w0, [x19, #16]
	ldr	w8, [sp, #8]
Lloh21:
	adrp	x9, _S_IXUSR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _S_IXUSR@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _S_IXGRP@GOTPAGE
Lloh25:
	ldr	x10, [x10, _S_IXGRP@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
Lloh27:
	adrp	x11, _S_IXOTH@GOTPAGE
Lloh28:
	ldr	x11, [x11, _S_IXOTH@GOTPAGEOFF]
	orr	w9, w10, w9
Lloh29:
	ldr	w10, [x11]
	orr	w9, w9, w10
	bic	w9, w9, w21
	orr	w8, w9, w8
	and	w1, w8, #0x1ff
	bl	_chmod
LBB0_11:
	mov	x0, x19
	bl	__bfd_delete_bfd
LBB0_12:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	__bfd_write_contents,4,2        ; @_bfd_write_contents
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	__close_and_cleanup,4,2         ; @_close_and_cleanup
	.comm	_BFD_IN_MEMORY,4,2              ; @BFD_IN_MEMORY
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_write_direction,8,3            ; @write_direction
	.comm	_EXEC_P,4,2                     ; @EXEC_P
	.comm	_S_IXUSR,4,2                    ; @S_IXUSR
	.comm	_S_IXGRP,4,2                    ; @S_IXGRP
	.comm	_S_IXOTH,4,2                    ; @S_IXOTH
.subsections_via_symbols
