	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bfd_bwrite                     ## -- Begin function bfd_bwrite
	.p2align	4, 0x90
_bfd_bwrite:                            ## @bfd_bwrite
	.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
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_BFD_IN_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdx)
	je	LBB0_6
## %bb.1:
	movq	16(%r12), %r13
	movl	4(%r12), %eax
	leal	(%rax,%r14), %esi
	movl	(%r13), %ecx
	cmpl	%ecx, %esi
	jle	LBB0_5
## %bb.2:
	addl	$127, %ecx
	andl	$-128, %ecx
	movl	%esi, (%r13)
	addl	$127, %esi
	andl	$-128, %esi
	cmpl	%ecx, %esi
	jle	LBB0_5
## %bb.3:
	movq	8(%r13), %rdi
	callq	_bfd_realloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	movl	4(%r12), %eax
LBB0_5:
	movslq	%r14d, %rbx
	movslq	%eax, %rdi
	addq	8(%r13), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	addl	%ebx, 4(%r12)
	jmp	LBB0_14
LBB0_6:
	movq	8(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.9:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	*(%rcx)
	movq	%rax, %r15
	cmpq	$-1, %rax
	jne	LBB0_8
## %bb.10:
	movq	$-1, %r15
	jmp	LBB0_11
LBB0_7:
	xorl	%r15d, %r15d
LBB0_8:
	addl	%r15d, 4(%r12)
LBB0_11:
	movslq	%r14d, %rax
	cmpq	%rax, %r15
	je	LBB0_13
## %bb.12:
	movq	_bfd_error_system_call@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_bfd_set_error
LBB0_13:
	movl	%r15d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	$0, (%r13)
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_BFD_IN_MEMORY,4,2              ## @BFD_IN_MEMORY
	.comm	_bfd_error_system_call,4,2      ## @bfd_error_system_call
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bfd_bwrite                     ; -- Begin function bfd_bwrite
	.p2align	2
_bfd_bwrite:                            ; @bfd_bwrite
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _BFD_IN_MEMORY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BFD_IN_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	ldr	x22, [x20, #16]
	ldr	w8, [x20, #4]
	ldr	w10, [x22]
	add	w9, w8, w19
	cmp	w9, w10
	b.le	LBB0_5
; %bb.2:
	add	w10, w10, #127
	and	w10, w10, #0xffffff80
	str	w9, [x22]
	add	w9, w9, #127
	and	w1, w9, #0xffffff80
	cmp	w1, w10
	b.le	LBB0_5
; %bb.3:
	ldr	x0, [x22, #8]
	bl	_bfd_realloc
	str	x0, [x22, #8]
	cbz	x0, LBB0_14
; %bb.4:
	ldr	w8, [x20, #4]
LBB0_5:
	sxtw	x2, w19
	ldr	x9, [x22, #8]
	add	x0, x9, w8, sxtw
	mov	x1, x21
	bl	_memcpy
	ldr	w8, [x20, #4]
	add	w8, w8, w19
	str	w8, [x20, #4]
	b	LBB0_11
LBB0_6:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_12
; %bb.7:
	ldr	x8, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	blr	x8
	mov	x21, x0
	cmn	x0, #1
	b.ne	LBB0_13
; %bb.8:
	cmp	x21, w19, sxtw
	b.eq	LBB0_10
LBB0_9:
Lloh3:
	adrp	x8, _bfd_error_system_call@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bfd_error_system_call@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_bfd_set_error
LBB0_10:
	mov	x19, x21
LBB0_11:
	mov	x0, x19
	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
LBB0_12:
	mov	x21, #0
LBB0_13:
	ldr	w8, [x20, #4]
	add	w8, w8, w21
	str	w8, [x20, #4]
	cmp	x21, w19, sxtw
	b.ne	LBB0_9
	b	LBB0_10
LBB0_14:
	mov	w19, #0
	str	wzr, [x22]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BFD_IN_MEMORY,4,2              ; @BFD_IN_MEMORY
	.comm	_bfd_error_system_call,4,2      ; @bfd_error_system_call
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
