// File: /workspace/github_c_makefile_star2_O0/blasphemy[P]mmc-utils/lsmmc.c
// Function: print_sd_scr
void print_sd_scr(struct config *config, char *scr)
{
	unsigned int scr_structure;
	unsigned int sd_spec;
	unsigned int data_stat_after_erase;
	unsigned int sd_security;
	unsigned int sd_bus_widths;
	unsigned int sd_spec3;
	unsigned int ex_security;
	unsigned int cmd_support;

	parse_bin(scr, "4u4u1u3u4u1u4u9r2u32r",
		&scr_structure, &sd_spec, &data_stat_after_erase,
		&sd_security, &sd_bus_widths, &sd_spec3,
		&ex_security, &cmd_support);

	if (config->verbose) {
		printf("======SD/SCR======\n");

		printf("\tSCR_STRUCTURE: 0x%01x (", scr_structure);
		switch (scr_structure) {
		case 0:
			printf("SCR v1.0)\n");
			break;
		default:
			printf("reserved)\n");
			break;
		}

		printf("\tSD_SPEC: 0x%01x (", sd_spec);
		switch (sd_spec) {
		case 0:
			printf("SD v1.0/1.01)\n");
			break;
		case 1:
			printf("SD v1.10)\n");
			break;
		case 2:
			printf("SD v2.00/v3.0x)\n");
			break;
		case 3:
			printf("SD v4.00)\n");
			break;
		default:
			printf("reserved)\n");
			break;
		}

		printf("\tDATA_STAT_AFTER_ERASE: 0x%01x\n",
		       data_stat_after_erase);

		printf("\tSD_SECURITY: 0x%01x (", sd_security);
		switch (sd_security) {
		case 0:
			printf("no security)\n");
			break;
		case 1:
			printf("not used)\n");
			break;
		case 2:
			printf("SDSC card/security v1.01)\n");
			break;
		case 3:
			printf("SDHC card/security v2.00)\n");
			break;
		case 4:
			printf("SDXC card/security v3.xx)\n");
			break;
		default:
			printf("reserved)\n");
			break;
		}

		printf("\tSD_BUS_WIDTHS: 0x%01x (", sd_bus_widths);
		if (BITS(sd_bus_widths, 2, 2))
			printf("4bit, ");
		if (BITS(sd_bus_widths, 0, 0))
			printf("1bit, ");
		printf(" bus)\n");

		printf("\tSD_SPEC3: 0x%01x (", sd_spec3);
		if (sd_spec >= 2) {
			switch (sd_spec3) {
			case 0:
				printf("SD v2.00)\n");
				break;
			case 1:
				printf("SD v3.0x)\n");
				break;
			}
		} else {
			printf("SD 1.xx)\n");
		}

		printf("\tEX_SECURITY: 0x%01x\n", ex_security);

		printf("\tCMD_SUPPORT: 0x%01x (", cmd_support);
		if (BITS(cmd_support, 1, 1))
			printf("CMD23 ");
		if (BITS(cmd_support, 0, 0))
			printf("CMD20 ");
		printf(" )\n");
	} else {
		printf("version: ");
		switch (sd_spec) {
		case 0:
			printf("SD 1.0/1.01\n");
			break;
		case 1:
			printf("SD 1.10\n");
			break;
		case 2:
			switch (sd_spec3) {
			case 0:
				printf("SD 2.00\n");
				break;
			case 1:
				printf("SD 3.0x\n");
				break;
			default:
				printf("unknown\n");
				break;
			}
			break;
		case 3:
			printf("SD 4.00\n");
			break;
		default:
			printf("unknown\n");
			break;
		}

		printf("bus widths: ");
		if (BITS(sd_bus_widths, 2, 2))
			printf("4bit, ");
		if (BITS(sd_bus_widths, 0, 0))
			printf("1bit, ");
		printf("\b\b\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x948a(%rip), %rsi      # 0x18489
leaq -0x1c(%rbp), %rdx
leaq -0x20(%rbp), %rcx
leaq -0x24(%rbp), %r8
leaq -0x28(%rbp), %r9
leaq -0x2c(%rbp), %rbx
leaq -0x30(%rbp), %r11
leaq -0x34(%rbp), %r10
leaq -0x38(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0xab80
movq -0x10(%rbp), %rax
testb $0x1, 0x10(%rax)
je 0xf2e0
leaq 0x9451(%rip), %rdi      # 0x1849f
xorl %eax, %eax
movb %al, -0x39(%rbp)
callq 0x30c0
movb -0x39(%rbp), %al
movl -0x1c(%rbp), %esi
leaq 0x944e(%rip), %rdi      # 0x184b3
callq 0x30c0
movl -0x1c(%rbp), %eax
testl %eax, %eax
jne 0xf083
jmp 0xf073
leaq 0x9452(%rip), %rdi      # 0x184cc
movb $0x0, %al
callq 0x30c0
jmp 0xf091
leaq 0x82f4(%rip), %rdi      # 0x1737e
movb $0x0, %al
callq 0x30c0
movl -0x20(%rbp), %esi
leaq 0x943c(%rip), %rdi      # 0x184d7
xorl %eax, %eax
callq 0x30c0
movl -0x20(%rbp), %eax
movq %rax, -0x48(%rbp)
subq $0x3, %rax
ja 0xf103
movq -0x48(%rbp), %rax
leaq 0x7c9e(%rip), %rcx      # 0x16d58
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x9420(%rip), %rdi      # 0x184ea
movb $0x0, %al
callq 0x30c0
jmp 0xf111
leaq 0x941f(%rip), %rdi      # 0x184f9
movb $0x0, %al
callq 0x30c0
jmp 0xf111
leaq 0x941a(%rip), %rdi      # 0x18504
movb $0x0, %al
callq 0x30c0
jmp 0xf111
leaq 0x941b(%rip), %rdi      # 0x18515
movb $0x0, %al
callq 0x30c0
jmp 0xf111
leaq 0x8274(%rip), %rdi      # 0x1737e
movb $0x0, %al
callq 0x30c0
movl -0x24(%rbp), %esi
leaq 0x9405(%rip), %rdi      # 0x18520
xorl %eax, %eax
movb %al, -0x51(%rbp)
callq 0x30c0
movb -0x51(%rbp), %al
movl -0x28(%rbp), %esi
leaq 0x940e(%rip), %rdi      # 0x18540
callq 0x30c0
movl -0x28(%rbp), %eax
movq %rax, -0x50(%rbp)
subq $0x4, %rax
ja 0xf1a8
movq -0x50(%rbp), %rax
leaq 0x7c19(%rip), %rcx      # 0x16d68
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x93f8(%rip), %rdi      # 0x18557
movb $0x0, %al
callq 0x30c0
jmp 0xf1b6
leaq 0x93f6(%rip), %rdi      # 0x18565
movb $0x0, %al
callq 0x30c0
jmp 0xf1b6
leaq 0x93f1(%rip), %rdi      # 0x18570
movb $0x0, %al
callq 0x30c0
jmp 0xf1b6
leaq 0x93fc(%rip), %rdi      # 0x1858b
movb $0x0, %al
callq 0x30c0
jmp 0xf1b6
leaq 0x9407(%rip), %rdi      # 0x185a6
movb $0x0, %al
callq 0x30c0
jmp 0xf1b6
leaq 0x81cf(%rip), %rdi      # 0x1737e
movb $0x0, %al
callq 0x30c0
movl -0x2c(%rbp), %esi
leaq 0x9401(%rip), %rdi      # 0x185c1
movb $0x0, %al
callq 0x30c0
movl -0x2c(%rbp), %eax
andq $0x4, %rax
shrq $0x2, %rax
cmpq $0x0, %rax
je 0xf1e6
leaq 0x93fb(%rip), %rdi      # 0x185da
movb $0x0, %al
callq 0x30c0
movl -0x2c(%rbp), %eax
andq $0x1, %rax
shrq $0x0, %rax
cmpq $0x0, %rax
je 0xf205
leaq 0x93e3(%rip), %rdi      # 0x185e1
movb $0x0, %al
callq 0x30c0
leaq 0x93dc(%rip), %rdi      # 0x185e8
movb $0x0, %al
callq 0x30c0
movl -0x30(%rbp), %esi
leaq 0x93d2(%rip), %rdi      # 0x185ef
movb $0x0, %al
callq 0x30c0
cmpl $0x2, -0x20(%rbp)
jb 0xf260
movl -0x30(%rbp), %eax
movl %eax, -0x58(%rbp)
testl %eax, %eax
je 0xf240
jmp 0xf236
movl -0x58(%rbp), %eax
subl $0x1, %eax
je 0xf250
jmp 0xf25e
leaq 0x93bc(%rip), %rdi      # 0x18603
movb $0x0, %al
callq 0x30c0
jmp 0xf25e
leaq 0x93b7(%rip), %rdi      # 0x1860e
movb $0x0, %al
callq 0x30c0
jmp 0xf26e
leaq 0x93b2(%rip), %rdi      # 0x18619
movb $0x0, %al
callq 0x30c0
movl -0x34(%rbp), %esi
leaq 0x93ab(%rip), %rdi      # 0x18623
movb $0x0, %al
callq 0x30c0
movl -0x38(%rbp), %esi
leaq 0x93b0(%rip), %rdi      # 0x18639
movb $0x0, %al
callq 0x30c0
movl -0x38(%rbp), %eax
andq $0x2, %rax
shrq %rax
cmpq $0x0, %rax
je 0xf2ae
leaq 0x93a9(%rip), %rdi      # 0x18650
movb $0x0, %al
callq 0x30c0
movl -0x38(%rbp), %eax
andq $0x1, %rax
shrq $0x0, %rax
cmpq $0x0, %rax
je 0xf2cd
leaq 0x9391(%rip), %rdi      # 0x18657
movb $0x0, %al
callq 0x30c0
leaq 0x835f(%rip), %rdi      # 0x17633
movb $0x0, %al
callq 0x30c0
jmp 0xf3f1
leaq 0x8f81(%rip), %rdi      # 0x18268
xorl %eax, %eax
callq 0x30c0
movl -0x20(%rbp), %eax
movq %rax, -0x60(%rbp)
subq $0x3, %rax
ja 0xf389
movq -0x60(%rbp), %rax
leaq 0x7a3e(%rip), %rcx      # 0x16d48
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x9344(%rip), %rdi      # 0x1865e
movb $0x0, %al
callq 0x30c0
jmp 0xf397
leaq 0x9341(%rip), %rdi      # 0x1866b
movb $0x0, %al
callq 0x30c0
jmp 0xf397
movl -0x30(%rbp), %eax
movl %eax, -0x64(%rbp)
testl %eax, %eax
je 0xf349
jmp 0xf33f
movl -0x64(%rbp), %eax
subl $0x1, %eax
je 0xf359
jmp 0xf369
leaq 0x9324(%rip), %rdi      # 0x18674
movb $0x0, %al
callq 0x30c0
jmp 0xf377
leaq 0x931d(%rip), %rdi      # 0x1867d
movb $0x0, %al
callq 0x30c0
jmp 0xf377
leaq 0x9316(%rip), %rdi      # 0x18686
movb $0x0, %al
callq 0x30c0
jmp 0xf397
leaq 0x930f(%rip), %rdi      # 0x1868f
movb $0x0, %al
callq 0x30c0
jmp 0xf397
leaq 0x92f6(%rip), %rdi      # 0x18686
movb $0x0, %al
callq 0x30c0
leaq 0x92fa(%rip), %rdi      # 0x18698
movb $0x0, %al
callq 0x30c0
movl -0x2c(%rbp), %eax
andq $0x4, %rax
shrq $0x2, %rax
cmpq $0x0, %rax
je 0xf3c4
leaq 0x921d(%rip), %rdi      # 0x185da
movb $0x0, %al
callq 0x30c0
movl -0x2c(%rbp), %eax
andq $0x1, %rax
shrq $0x0, %rax
cmpq $0x0, %rax
je 0xf3e3
leaq 0x9205(%rip), %rdi      # 0x185e1
movb $0x0, %al
callq 0x30c0
leaq 0x89ae(%rip), %rdi      # 0x17d98
movb $0x0, %al
callq 0x30c0
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax,%rax)