	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd_hash_impl                  ## -- Begin function cmd_hash_impl
	.p2align	4, 0x90
_cmd_hash_impl:                         ## @cmd_hash_impl
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	_GIT_MAX_HEXSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_hash_algos@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movslq	%ebx, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movb	$1, %al
	cmpl	$2, %r15d
	jne	LBB0_1
## %bb.2:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r14), %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$8192, %r14d                    ## imm = 0x2000
	jmp	LBB0_5
LBB0_1:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$8192, %r14d                    ## imm = 0x2000
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_strtoul
	movl	%eax, %ecx
	shll	$20, %ecx
	testl	%eax, %eax
	movl	$8192, %r14d                    ## imm = 0x2000
	cmovnel	%ecx, %r14d
LBB0_5:
	shlq	$5, -64(%rbp)                   ## 8-byte Folded Spill
	movl	%r14d, %edi
	callq	_malloc
	testq	%rax, %rax
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_6
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r13
	leaq	L_.str.2(%rip), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r14d, %edi
	callq	_malloc
	testq	%rax, %rax
	jne	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %ebx
	movl	(%r12), %edi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_fprintf
	shrl	%r14d
	cmpl	$2047, %ebx                     ## imm = 0x7FF
	ja	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	callq	_die
	jmp	LBB0_10
LBB0_6:
	movq	%rax, %rbx
	jmp	LBB0_12
LBB0_11:
	movq	%rax, %rbx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_12:
	leaq	-52(%rbp), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	callq	*24(%r13,%rax)
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	je	LBB0_20
## %bb.13:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	addq	$16, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movq	%rbx, %r12
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_xread
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%rax, %r13
	jns	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	leaq	L_.str.3(%rip), %rdi
	callq	_die_errno
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	addq	%r13, %r14
	addq	%r13, %r12
	subl	%r13d, %r15d
	jne	LBB0_14
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	testq	%r14, %r14
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=1
	leaq	-52(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r15d
	movq	%rbx, %r12
	movl	$0, %r14d
	testl	%eax, %eax
	jne	LBB0_14
LBB0_20:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %r14
	leaq	-52(%rbp), %rsi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	*8(%rax,%rcx)
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_21
## %bb.22:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_hash_to_hex_algop
	movl	%eax, %edi
	callq	_puts
	xorl	%edi, %edi
	callq	_exit
LBB0_21:
	movl	(%r14), %edx
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_fwrite
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_GIT_MAX_HEXSZ,4,2              ## @GIT_MAX_HEXSZ
	.comm	_hash_algos,8,3                 ## @hash_algos
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-b"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"bufsz %u is too big, halving...\n"

L_.str.2:                               ## @.str.2
	.asciz	"OOPS"

L_.str.3:                               ## @.str.3
	.asciz	"test-hash"

	.comm	_stdout,4,2                     ## @stdout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd_hash_impl                  ; -- Begin function cmd_hash_impl
	.p2align	2
_cmd_hash_impl:                         ; @cmd_hash_impl
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x21, x2
Lloh0:
	adrp	x8, _GIT_MAX_HEXSZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GIT_MAX_HEXSZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x9, x8
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh5:
	adrp	x8, _hash_algos@GOTPAGE
Lloh6:
	ldr	x8, [x8, _hash_algos@GOTPAGEOFF]
Lloh7:
	ldr	x24, [x8]
	cmp	w0, #2
	b.ne	LBB0_3
; %bb.1:
	ldr	x22, [x1, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_strcmp
	mov	w20, #8192
	cbnz	w0, LBB0_4
; %bb.2:
	mov	w22, #0
	b	LBB0_6
LBB0_3:
	mov	w20, #8192
	b	LBB0_5
LBB0_4:
	mov	x0, x22
	mov	x1, #0
	mov	w2, #10
	bl	_strtoul
	lsl	w8, w0, #20
	cmp	w0, #0
	csel	w20, w20, w8, eq
LBB0_5:
	mov	w22, #1
LBB0_6:
	sxtw	x25, w21
	mov	x0, x20
	bl	_malloc
	stur	w22, [x29, #-88]                ; 4-byte Folded Spill
	cbnz	x0, LBB0_11
; %bb.7:
Lloh10:
	adrp	x26, _stderr@GOTPAGE
Lloh11:
	ldr	x26, [x26, _stderr@GOTPAGEOFF]
Lloh12:
	adrp	x22, l_.str.1@PAGE
Lloh13:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh14:
	adrp	x23, l_.str.2@PAGE
Lloh15:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	lsr	w20, w20, #1
	mov	x0, x20
	bl	_malloc
	cbnz	x0, LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	mov	x1, x22
	mov	x2, x20
	bl	_fprintf
	cmp	w20, #2047
	b.hi	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x23
	bl	_die
	b	LBB0_8
LBB0_11:
	mov	x21, x0
	add	x8, x24, x25, lsl #5
	stur	x8, [x29, #-96]                 ; 8-byte Folded Spill
	add	x28, x24, x25, lsl #5
	ldr	x8, [x28, #24]
	sub	x0, x29, #84
	blr	x8
	cbz	w20, LBB0_19
; %bb.12:
	mov	x23, #0
	add	x22, x28, #16
	mov	x25, x20
	mov	x26, x21
Lloh16:
	adrp	x24, l_.str.3@PAGE
Lloh17:
	add	x24, x24, l_.str.3@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	mov	x1, x26
	mov	x2, x25
	bl	_xread
	cbz	x0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x27, x0
	tbz	x0, #63, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x24
	bl	_die_errno
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x23, x27, x23
	add	x26, x26, x27
	subs	w25, w25, w27
	b.ne	LBB0_13
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=1
	cbz	x23, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x22]
	sub	x0, x29, #84
	mov	x1, x21
	mov	x2, x23
	blr	x8
	mov	x23, #0
	mov	x25, x20
	mov	x26, x21
	cbnz	w20, LBB0_13
LBB0_19:
	ldr	x8, [x28, #8]
	sub	x1, x29, #84
	mov	x0, x19
	blr	x8
	ldur	w8, [x29, #-88]                 ; 4-byte Folded Reload
	tbz	w8, #0, LBB0_21
; %bb.20:
	mov	x0, x19
	ldur	x1, [x29, #-96]                 ; 8-byte Folded Reload
	bl	_hash_to_hex_algop
	bl	_puts
	mov	w0, #0
	bl	_exit
LBB0_21:
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	ldr	w2, [x8]
Lloh18:
	adrp	x8, _stdout@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_fwrite
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GIT_MAX_HEXSZ,4,2              ; @GIT_MAX_HEXSZ
	.comm	_hash_algos,8,3                 ; @hash_algos
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-b"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"bufsz %u is too big, halving...\n"

l_.str.2:                               ; @.str.2
	.asciz	"OOPS"

l_.str.3:                               ; @.str.3
	.asciz	"test-hash"

	.comm	_stdout,4,2                     ; @stdout
.subsections_via_symbols
