	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isdn_gethex
_isdn_gethex:                           ## @isdn_gethex
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_DEBUG_TRANSCMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_gig_dbg
	movb	(%rbx), %dl
	testb	%dl, %dl
	je	LBB0_9
## %bb.1:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	addl	$-15, %ecx
	cmovsl	%eax, %ecx
	sarl	$4, %ecx
	incq	%rbx
	xorl	%eax, %eax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movsbl	%dl, %edx
	addl	%esi, %edx
	shll	$4, %eax
	addl	%edx, %eax
	movzbl	(%rbx), %edx
	incq	%rbx
	testb	%dl, %dl
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, %eax
	jg	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-48(%rdx), %edi
	movl	$-48, %esi
	cmpb	$10, %dil
	jb	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-97(%rdx), %edi
	movl	$-87, %esi
	cmpb	$6, %dil
	jb	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-65(%rdx), %edi
	movl	$-55, %esi
	cmpb	$5, %dil
	jbe	LBB0_2
LBB0_9:
	movl	$-1, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_TRANSCMD,4,2             ## @DEBUG_TRANSCMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"string: %s"

	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_isdn_gethex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isdn_gethex
_isdn_gethex:                           ; @isdn_gethex
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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, _DEBUG_TRANSCMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_TRANSCMD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_gig_dbg
	ldrb	w8, [x19]
	cbz	w8, LBB0_10
; %bb.1:
	mov	w0, #0
Lloh5:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	sub	w10, w9, #15
	cmp	w10, #0
	csel	w9, w9, w10, lt
	asr	w9, w9, #4
	add	x10, x19, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w11, #-48
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sxtb	w8, w8
	add	w8, w11, w8
	add	w0, w8, w0, lsl #4
	ldrb	w8, [x10], #1
	cbz	w8, LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w0, w9
	b.gt	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w11, w8, #48
	and	w11, w11, #0xff
	cmp	w11, #10
	b.lo	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w11, w8, #97
	and	w11, w11, #0xff
	cmp	w11, #6
	b.hs	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w11, #-87
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w11, w8, #65
	and	w11, w11, #0xff
	cmp	w11, #5
	b.hi	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w11, #-55
	b	LBB0_3
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_TRANSCMD,4,2             ; @DEBUG_TRANSCMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"string: %s"

	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_isdn_gethex
.subsections_via_symbols
