	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function otrx_extract_copy
_otrx_extract_copy:                     ## @otrx_extract_copy
	.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	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rcx, %rdi
	callq	_fopen
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_fseek
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movq	%rbx, %rcx
	callq	_fread
	cmpq	%r13, %rax
	jne	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_fwrite
	cmpq	%r13, %rax
	jne	LBB0_7
## %bb.8:
	leaq	L_.str.5(%rip), %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_printf
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_EACCES@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_trx_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movq	%r15, %rdi
	callq	_free
LBB0_10:
	movq	%r14, %rdi
	callq	_fclose
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't open %s\n"

	.comm	_EACCES,4,2                     ## @EACCES
L_.str.2:                               ## @.str.2
	.asciz	"Couldn't alloc %zu B buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.3:                               ## @.str.3
	.asciz	"Couldn't read %zu B of data from %s\n"

	.comm	_trx_path,8,3                   ## @trx_path
L_.str.4:                               ## @.str.4
	.asciz	"Couldn't write %zu B to %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"Extracted 0x%zx bytes into %s\n"

	.no_dead_strip	_otrx_extract_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function otrx_extract_copy
_otrx_extract_copy:                     ; @otrx_extract_copy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x3
	mov	x21, x2
	mov	x24, x1
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x3
	bl	_fopen
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
Lloh2:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x24
	bl	_fseek
	mov	x0, x20
	mov	w1, #1
	mov	x2, x21
	mov	x3, x23
	bl	_fread
	cmp	x0, x21
	b.ne	LBB0_7
; %bb.3:
	mov	x0, x20
	mov	w1, #1
	mov	x2, x21
	mov	x3, x19
	bl	_fwrite
	cmp	x0, x21
	b.ne	LBB0_8
; %bb.4:
Lloh5:
	adrp	x0, l_.str.5@PAGE
Lloh6:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	bl	_printf
	mov	w21, #0
	b	LBB0_10
LBB0_5:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
Lloh12:
	adrp	x8, _EACCES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_6:
Lloh15:
	adrp	x8, _stderr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_7:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x8, _trx_path@GOTPAGE
Lloh27:
	ldr	x8, [x8, _trx_path@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	stp	x21, x8, [sp]
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh31:
	adrp	x8, _stderr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	stp	x21, x22, [sp]
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_9:
	bl	_fprintf
Lloh36:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x20
	bl	_free
LBB0_11:
	mov	x0, x19
	bl	_fclose
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't open %s\n"

	.comm	_EACCES,4,2                     ; @EACCES
l_.str.2:                               ; @.str.2
	.asciz	"Couldn't alloc %zu B buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.3:                               ; @.str.3
	.asciz	"Couldn't read %zu B of data from %s\n"

	.comm	_trx_path,8,3                   ; @trx_path
l_.str.4:                               ; @.str.4
	.asciz	"Couldn't write %zu B to %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"Extracted 0x%zx bytes into %s\n"

	.no_dead_strip	_otrx_extract_copy
.subsections_via_symbols
