	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_pack_file
_open_pack_file:                        ## @open_pack_file
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_from_stdin@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movq	_input_fd@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.3:
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_EXCL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$384, %edx                      ## imm = 0x180
	xorl	%eax, %eax
	callq	_open
	movq	_output_fd@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_die_errno
	jmp	LBB0_5
LBB0_6:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_open
	movq	_input_fd@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_die_errno
	movq	(%r14), %rax
LBB0_8:
	movq	_output_fd@GOTPCREL(%rip), %rcx
	movl	$-1, (%rcx)
	jmp	LBB0_9
LBB0_2:
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-24(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_odb_mkstemp
	movq	_output_fd@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movq	%rax, %rbx
LBB0_5:
	movq	_output_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	movq	_nothread_data@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_the_hash_algo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_input_ctx@GOTPCREL(%rip), %rdi
	callq	*(%rax)
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_from_stdin,8,3                 ## @from_stdin
	.comm	_input_fd,8,3                   ## @input_fd
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pack/tmp_pack_XXXXXX"

	.comm	_output_fd,4,2                  ## @output_fd
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.1:                               ## @.str.1
	.asciz	"unable to create '%s'"

	.comm	_nothread_data,4,2              ## @nothread_data
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.2:                               ## @.str.2
	.asciz	"cannot open packfile '%s'"

	.comm	_the_hash_algo,8,3              ## @the_hash_algo
	.comm	_input_ctx,4,2                  ## @input_ctx
	.no_dead_strip	_open_pack_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_pack_file
_open_pack_file:                        ; @open_pack_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _from_stdin@GOTPAGE
Lloh1:
	ldr	x8, [x8, _from_stdin@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _input_fd@GOTPAGE
Lloh4:
	ldr	x8, [x8, _input_fd@GOTPAGEOFF]
Lloh5:
	str	xzr, [x8]
Lloh6:
	adrp	x20, _output_fd@GOTPAGE
Lloh7:
	ldr	x20, [x20, _output_fd@GOTPAGEOFF]
	cbz	x19, LBB0_7
; %bb.2:
Lloh8:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w8, #384
	str	x8, [sp]
	mov	x0, x19
	bl	_open
	str	w0, [x20]
	tbz	w0, #31, LBB0_8
; %bb.3:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_die_errno
	b	LBB0_8
LBB0_4:
Lloh19:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
Lloh22:
	adrp	x20, _input_fd@GOTPAGE
Lloh23:
	ldr	x20, [x20, _input_fd@GOTPAGEOFF]
	str	x0, [x20]
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_die_errno
	ldr	x0, [x20]
LBB0_6:
Lloh26:
	adrp	x8, _output_fd@GOTPAGE
Lloh27:
	ldr	x8, [x8, _output_fd@GOTPAGEOFF]
	mov	w9, #-1
Lloh28:
	str	w9, [x8]
	b	LBB0_9
LBB0_7:
Lloh29:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_odb_mkstemp
	str	w0, [x20]
	add	x0, sp, #8
	mov	x1, #0
	bl	_strbuf_detach
	mov	x19, x0
LBB0_8:
	ldr	w0, [x20]
LBB0_9:
Lloh34:
	adrp	x8, _nothread_data@GOTPAGE
Lloh35:
	ldr	x8, [x8, _nothread_data@GOTPAGEOFF]
Lloh36:
	str	w0, [x8]
Lloh37:
	adrp	x8, _the_hash_algo@GOTPAGE
Lloh38:
	ldr	x8, [x8, _the_hash_algo@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh40:
	adrp	x0, _input_ctx@GOTPAGE
Lloh41:
	ldr	x0, [x0, _input_ctx@GOTPAGEOFF]
	blr	x8
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotStr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_from_stdin,8,3                 ; @from_stdin
	.comm	_input_fd,8,3                   ; @input_fd
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pack/tmp_pack_XXXXXX"

	.comm	_output_fd,4,2                  ; @output_fd
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.1:                               ; @.str.1
	.asciz	"unable to create '%s'"

	.comm	_nothread_data,4,2              ; @nothread_data
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.2:                               ; @.str.2
	.asciz	"cannot open packfile '%s'"

	.comm	_the_hash_algo,8,3              ; @the_hash_algo
	.comm	_input_ctx,4,2                  ; @input_ctx
	.no_dead_strip	_open_pack_file
.subsections_via_symbols
