	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_diskioctl                 ## -- Begin function test_diskioctl
	.p2align	4, 0x90
_test_diskioctl:                        ## @test_diskioctl
	.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	_disk_index@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	%rcx, %rbx
	movq	_disk_fd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%esi, %rcx
	movl	(%rax,%rcx,4), %edi
	cmpl	$-1, %edi
	je	LBB0_2
## %bb.3:
	cmpl	$129, %edx
	je	LBB0_6
## %bb.4:
	cmpl	$128, %edx
	jne	LBB0_8
## %bb.5:
	movl	$512, (%rbx)                    ## imm = 0x200
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_2:
	movq	_EBADF@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	leaq	-16(%rbp), %rsi
	callq	_fstat
	testl	%eax, %eax
	je	LBB0_7
LBB0_8:
	movq	_ENOTTY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movl	-16(%rbp), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_disk_index,4,2                 ## @disk_index
	.comm	_disk_fd,8,3                    ## @disk_fd
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_ENOTTY,4,2                     ## @ENOTTY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_diskioctl                 ; -- Begin function test_diskioctl
	.p2align	2
_test_diskioctl:                        ; @test_diskioctl
	.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
Lloh0:
	adrp	x8, _disk_index@GOTPAGE
Lloh1:
	ldr	x8, [x8, _disk_index@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _disk_fd@GOTPAGE
Lloh4:
	ldr	x8, [x8, _disk_fd@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w0, [x8, w1, sxtw #2]
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.2:
	mov	x19, x3
	cmp	w2, #129
	b.eq	LBB0_8
; %bb.3:
	cmp	w2, #128
	b.ne	LBB0_9
; %bb.4:
	mov	w0, #0
	mov	w8, #512
	str	w8, [x19]
	b	LBB0_7
LBB0_5:
Lloh6:
	adrp	x8, _EBADF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	add	x1, sp, #8
	bl	_fstat
	cbz	w0, LBB0_10
LBB0_9:
Lloh8:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
	b	LBB0_6
LBB0_10:
	ldr	w8, [sp, #8]
	str	w8, [x19]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_disk_index,4,2                 ; @disk_index
	.comm	_disk_fd,8,3                    ; @disk_fd
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_ENOTTY,4,2                     ; @ENOTTY
.subsections_via_symbols
