	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	leaq	L_.str(%rip), %rbx
	movq	_optarg@GOTPCREL(%rip), %r13
	movq	_changer_name@GOTPCREL(%rip), %r12
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rax
	movq	%rax, (%r12)
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_getopt
	cmpl	$102, %eax
	je	LBB0_28
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_usage
	jmp	LBB0_1
LBB0_4:
	movq	_optind@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	cmpl	%r15d, %r13d
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_usage
LBB0_6:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	jne	LBB0_9
## %bb.7:
	movq	_CHANGER_ENV_VAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getenv
	movq	%rax, %rdi
	movq	%rax, (%r12)
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	__PATH_CH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, (%r12)
LBB0_9:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	movq	_changer_fd@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	movq	(%r12), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_11:
	movq	_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atexit
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_13:
	leaq	(%r14,%r13,8), %r12
	movq	_commands@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rsi
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.14:
	movl	$16, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%r14
	movq	_commands@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rcx,%rbx), %rsi
	addq	$16, %rbx
	testq	%rsi, %rsi
	jne	LBB0_15
	jmp	LBB0_18
LBB0_16:
	movq	_commands@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_18:
	movl	%r14d, %ebx
	movq	%rbx, %rax
	shlq	$4, %rax
	movq	(%rcx,%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_27
LBB0_19:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r12
	testq	%r12, %r12
	jne	LBB0_21
## %bb.20:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_21:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	$16, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	incq	%r13
	movq	_commands@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rcx,%r14), %r12
	addq	$16, %r14
	testq	%r12, %r12
	jne	LBB0_22
	jmp	LBB0_25
LBB0_23:
	movq	_commands@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_25:
	movl	%r13d, %ebx
	movq	%rbx, %rax
	shlq	$4, %rax
	movq	(%rcx,%rax), %rdi
	testq	%rdi, %rdi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_27
LBB0_26:
	movq	(%r12), %rdx
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_errx
	movq	_commands@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, %rax
	shlq	$4, %rax
	movq	(%rcx,%rax), %rdi
LBB0_27:
	subl	%r13d, %r15d
	shlq	$4, %rbx
	movl	%r15d, %esi
	movq	%r12, %rdx
	callq	*8(%rcx,%rbx)
	movl	%eax, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"f:"

	.comm	_optarg,8,3                     ## @optarg
	.comm	_changer_name,8,3               ## @changer_name
	.comm	_optind,8,3                     ## @optind
	.comm	_CHANGER_ENV_VAR,4,2            ## @CHANGER_ENV_VAR
	.comm	__PATH_CH,8,3                   ## @_PATH_CH
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_changer_fd,4,2                 ## @changer_fd
L_.str.1:                               ## @.str.1
	.asciz	"%s: open"

	.comm	_cleanup,4,2                    ## @cleanup
L_.str.2:                               ## @.str.2
	.asciz	"can't register cleanup function"

	.comm	_commands,8,3                   ## @commands
L_.str.3:                               ## @.str.3
	.asciz	"unknown command: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _optarg@GOTPAGE
Lloh1:
	ldr	x23, [x23, _optarg@GOTPAGEOFF]
Lloh2:
	adrp	x22, _changer_name@GOTPAGE
Lloh3:
	ldr	x22, [x22, _changer_name@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23]
	str	x8, [x22]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_getopt
	cmp	w0, #102
	b.eq	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_usage
	b	LBB0_2
LBB0_5:
Lloh6:
	adrp	x8, _optind@GOTPAGE
Lloh7:
	ldr	x8, [x8, _optind@GOTPAGEOFF]
Lloh8:
	ldr	x23, [x8]
	cmp	w23, w19
	b.ne	LBB0_7
; %bb.6:
	bl	_usage
LBB0_7:
	ldr	x0, [x22]
	cbnz	x0, LBB0_10
; %bb.8:
Lloh9:
	adrp	x8, _CHANGER_ENV_VAR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CHANGER_ENV_VAR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_getenv
	str	x0, [x22]
	cbnz	x0, LBB0_10
; %bb.9:
Lloh12:
	adrp	x8, __PATH_CH@GOTPAGE
Lloh13:
	ldr	x8, [x8, __PATH_CH@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x8]
	str	x0, [x22]
LBB0_10:
Lloh15:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w2, #384
	bl	_open
Lloh18:
	adrp	x8, _changer_fd@GOTPAGE
Lloh19:
	ldr	x8, [x8, _changer_fd@GOTPAGEOFF]
Lloh20:
	str	w0, [x8]
	cmn	w0, #1
	b.ne	LBB0_12
; %bb.11:
	ldr	x8, [x22]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_12:
	add	x20, x20, x23, lsl #3
Lloh23:
	adrp	x8, _cleanup@GOTPAGE
Lloh24:
	ldr	x8, [x8, _cleanup@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_atexit
	cbz	x0, LBB0_14
; %bb.13:
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_14:
Lloh28:
	adrp	x24, _commands@GOTPAGE
Lloh29:
	ldr	x24, [x24, _commands@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x1, [x8]
	cbz	x1, LBB0_20
; %bb.15:
	mov	x21, #0
	mov	w22, #16
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	bl	_strcmp
	cbz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x21, x21, #1
	ldr	x8, [x24]
	ldr	x1, [x8, x22]
	add	x22, x22, #16
	cbnz	x1, LBB0_16
	b	LBB0_19
LBB0_18:
	ldr	x8, [x24]
LBB0_19:
	and	x21, x21, #0xffffffff
	lsl	x9, x21, #4
	ldr	x0, [x8, x9]
	cbnz	x0, LBB0_27
LBB0_20:
	ldr	x21, [x8]
	cbz	x21, LBB0_26
; %bb.21:
	mov	x25, #0
	mov	w26, #16
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x20]
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	bl	_strncmp
	cbz	x0, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x25, x25, #1
	ldr	x8, [x24]
	ldr	x21, [x8, x26]
	add	x26, x26, #16
	cbnz	x21, LBB0_22
	b	LBB0_25
LBB0_24:
	ldr	x8, [x24]
LBB0_25:
	and	x21, x25, #0xffffffff
	lsl	x9, x21, #4
	ldr	x0, [x8, x9]
	cbnz	x0, LBB0_27
LBB0_26:
	ldr	x2, [x20]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	x8, [x24]
	lsl	x9, x21, #4
	ldr	x0, [x8, x9]
LBB0_27:
	sub	w1, w19, w23
	add	x8, x8, x21, lsl #4
	ldr	x8, [x8, #8]
	mov	x2, x20
	blr	x8
	bl	_exit
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"f:"

	.comm	_optarg,8,3                     ; @optarg
	.comm	_changer_name,8,3               ; @changer_name
	.comm	_optind,8,3                     ; @optind
	.comm	_CHANGER_ENV_VAR,4,2            ; @CHANGER_ENV_VAR
	.comm	__PATH_CH,8,3                   ; @_PATH_CH
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_changer_fd,4,2                 ; @changer_fd
l_.str.1:                               ; @.str.1
	.asciz	"%s: open"

	.comm	_cleanup,4,2                    ; @cleanup
l_.str.2:                               ; @.str.2
	.asciz	"can't register cleanup function"

	.comm	_commands,8,3                   ; @commands
l_.str.3:                               ; @.str.3
	.asciz	"unknown command: %s"

.subsections_via_symbols
