	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_str2bin                        ## -- Begin function str2bin
	.p2align	4, 0x90
_str2bin:                               ## @str2bin
	.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	%rsi, %r14
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movl	$2, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	movl	$2, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	%r12, %rdi
	callq	_strlen
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_28
## %bb.3:
	movq	%rax, %r15
	movb	(%r12), %al
	testb	%al, %al
	je	LBB0_26
## %bb.4:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movb	%al, (%r15,%rcx)
	movzbl	1(%r12,%rcx), %eax
	incq	%rcx
	testb	%al, %al
	jne	LBB0_5
	jmp	LBB0_26
LBB0_6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	2(%r12), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movl	%eax, %r14d
	leal	1(%r14), %eax
	shrl	$31, %eax
	leal	(%r14,%rax), %edi
	incl	%edi
	sarl	%edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_28
## %bb.7:
	movq	%rax, %r15
	movq	%rax, %r13
	testb	$1, %r14b
	je	LBB0_9
## %bb.8:
	movsbl	2(%r12), %edi
	addq	$3, %r12
	callq	_c2b
	movq	%r15, %r13
	incq	%r13
	movb	%al, (%r15)
	movq	%r12, %rbx
LBB0_9:
	movb	(%rbx), %al
	testb	%al, %al
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_12
## %bb.10:
	addq	$2, %rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %edi
	callq	_c2b
	shlb	$4, %al
	movb	%al, (%r13)
	movsbl	-1(%rbx), %edi
	callq	_c2b
	orb	%al, (%r13)
	incq	%r13
	movzbl	(%rbx), %eax
	addq	$2, %rbx
	testb	%al, %al
	jne	LBB0_11
LBB0_12:
	subl	%r15d, %r13d
	jmp	LBB0_26
LBB0_13:
	leaq	2(%r12), %rbx
	movq	%rbx, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	leal	(%rcx,%rcx,2), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_28
## %bb.14:
	movq	%rax, %r15
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movb	(%rbx), %al
	movq	%r15, %r13
	testb	%al, %al
	je	LBB0_25
## %bb.15:
	xorl	%ebx, %ebx
	leaq	LJTI0_0(%rip), %r14
	movq	%r15, %r13
	jmp	LBB0_19
LBB0_28:
	xorl	%r13d, %r13d
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%eax, %ecx
	shrb	$4, %cl
	orb	%cl, (%r13)
	shlb	$4, %al
LBB0_17:                                ##   in Loop: Header=BB0_19 Depth=1
	movb	%al, 1(%r13)
	incq	%r13
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=1
	movzbl	3(%r12,%rbx), %eax
	incq	%rbx
	testb	%al, %al
	je	LBB0_25
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %edi
	callq	_c64tobin
	cmpb	$64, %al
	je	LBB0_25
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ebx, %ecx
	andl	$3, %ecx
	movslq	(%r14,%rcx,4), %rcx
	addq	%r14, %rcx
	jmpq	*%rcx
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	shlb	$2, %al
	movb	%al, (%r13)
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%eax, %ecx
	shrb	$2, %cl
	orb	%cl, (%r13)
	shlb	$6, %al
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	orb	%al, (%r13)
	incq	%r13
	jmp	LBB0_18
LBB0_25:
	subl	%r15d, %r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_26:
	movq	%r15, (%r14)
LBB0_27:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
LJTI0_0:
	.long	L0_0_set_21
	.long	L0_0_set_16
	.long	L0_0_set_22
	.long	L0_0_set_23
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0x"

L_.str.1:                               ## @.str.1
	.asciz	"0b"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_str2bin                        ; -- Begin function str2bin
	.p2align	2
_str2bin:                               ; @str2bin
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	w2, #2
	bl	_strncasecmp
	cbz	x0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	w2, #2
	bl	_strncasecmp
	cbz	x0, LBB0_13
; %bb.2:
	mov	x0, x21
	bl	_strlen
	mov	x22, x0
	bl	_malloc
	cbz	x0, LBB0_16
; %bb.3:
	mov	x20, x0
	ldrb	w8, [x21]
	cbz	w8, LBB0_26
; %bb.4:
	mov	x9, #0
	add	x10, x21, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	strb	w8, [x20, x9]
	ldrb	w8, [x10, x9]
	add	x9, x9, #1
	cbnz	w8, LBB0_5
	b	LBB0_26
LBB0_6:
	add	x22, x21, #2
	mov	x0, x22
	bl	_strlen
	mov	x23, x0
	add	w8, w0, #1
	add	w9, w0, #2
	cmp	w8, #0
	csinc	w8, w9, w0, lt
	asr	w0, w8, #1
	bl	_malloc
	cbz	x0, LBB0_16
; %bb.7:
	mov	x20, x0
	mov	x24, x0
	tbz	w23, #0, LBB0_9
; %bb.8:
	add	x22, x21, #3
	ldrsb	w0, [x21, #2]
	bl	_c2b
	mov	x24, x20
	strb	w0, [x24], #1
LBB0_9:
	ldrb	w8, [x22]
	cbz	w8, LBB0_12
; %bb.10:
	add	x21, x22, #2
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	sxtb	w0, w8
	bl	_c2b
	lsl	w8, w0, #4
	strb	w8, [x24]
	ldursb	w0, [x21, #-1]
	bl	_c2b
	ldrb	w8, [x24]
	orr	w8, w8, w0
	strb	w8, [x24], #1
	ldrb	w8, [x21], #2
	cbnz	w8, LBB0_11
LBB0_12:
	sub	w22, w24, w20
	b	LBB0_26
LBB0_13:
	add	x22, x21, #2
	mov	x0, x22
	bl	_strlen
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #2
	add	w0, w8, w8, lsl #1
	bl	_malloc
	cbz	x0, LBB0_16
; %bb.14:
	mov	x20, x0
	ldrb	w8, [x22]
	mov	x22, x0
	cbz	w8, LBB0_25
; %bb.15:
	mov	x23, #0
	add	x21, x21, #3
	mov	x22, x20
Lloh4:
	adrp	x24, lJTI0_0@PAGE
Lloh5:
	add	x24, x24, lJTI0_0@PAGEOFF
	b	LBB0_20
LBB0_16:
	mov	w22, #0
	b	LBB0_27
LBB0_17:                                ;   in Loop: Header=BB0_20 Depth=1
	lsl	w8, w0, #4
	ldrb	w9, [x22]
	orr	w9, w9, w0, lsr #4
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	strb	w9, [x22]
	strb	w8, [x22, #1]!
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	ldrb	w8, [x21, x23]
	add	x23, x23, #1
	cbz	w8, LBB0_25
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	sxtb	w0, w8
	bl	_c64tobin
	cmp	w0, #64
	b.eq	LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	and	w8, w23, #0x3
	adr	x9, LBB0_17
	ldrb	w10, [x24, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_22:                                ;   in Loop: Header=BB0_20 Depth=1
	lsl	w8, w0, #2
	strb	w8, [x22]
	b	LBB0_19
LBB0_23:                                ;   in Loop: Header=BB0_20 Depth=1
	lsl	w8, w0, #6
	ldrb	w9, [x22]
	orr	w9, w9, w0, lsr #2
	b	LBB0_18
LBB0_24:                                ;   in Loop: Header=BB0_20 Depth=1
	ldrb	w8, [x22]
	orr	w8, w8, w0
	strb	w8, [x22], #1
	b	LBB0_19
LBB0_25:
	sub	w22, w22, w20
LBB0_26:
	str	x20, [x19]
LBB0_27:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_22-LBB0_17)>>2
	.byte	(LBB0_17-LBB0_17)>>2
	.byte	(LBB0_23-LBB0_17)>>2
	.byte	(LBB0_24-LBB0_17)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0x"

l_.str.1:                               ; @.str.1
	.asciz	"0b"

.subsections_via_symbols
