LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/./datagrama.h
// Function: demuxDatagrama
Datagrama *demuxDatagrama(char *buffer){
	int res;
	Datagrama *novo = (Datagrama *) malloc(sizeof(struct segmento));
	res = sscanf(buffer, "%d %d %d %d %d %d %[^ ]", &novo->seq, &novo->ack, &novo->len, &novo->win_size, &novo->flags, &novo->cksum,novo->data);
	if(res< 7){ 
		free(novo); 
		return NULL;
	}
	else {
		int i, diff = (strlen(buffer)) - novo->len;
		for(i = 0; i < novo->len && i< TAM; i++) novo->data[i] = buffer[diff + i];
		novo->data[i] = '\0';
		return novo;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x4(%rax), %rcx
leaq 0x8(%rax), %r15
leaq 0xc(%rax), %r9
leaq 0x10(%rax), %r10
leaq 0x14(%rax), %r11
leaq 0x18(%rax), %r12
subq $0x8, %rsp
leaq 0x17ae(%rip), %rsi      # 0x3023
movq %r14, %rdi
movq %rax, %rdx
movq %r15, %r8
xorl %eax, %eax
pushq %r12
pushq %r11
pushq %r10
callq 0x1130
addq $0x20, %rsp
cmpl $0x6, %eax
jg 0x18a0
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
jmp 0x18e5
movl (%r15), %r15d
testl %r15d, %r15d
jle 0x18dd
movq %r14, %rdi
callq 0x1070
subl %r15d, %eax
decl %r15d
movl $0xc7, %ecx
cmpl %ecx, %r15d
cmovael %ecx, %r15d
cltq
incl %r15d
addq %r14, %rax
xorl %ecx, %ecx
movb (%rax,%rcx), %dl
movb %dl, (%r12,%rcx)
incq %rcx
cmpq %rcx, %r15
jne 0x18cc
jmp 0x18e0
xorl %r15d, %r15d
movb $0x0, (%r12,%r15)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/./datagrama.h
// Function: muxDatagrama
char *muxDatagrama(Datagrama *novo){
	if(novo){
	char *buffer = (char *)malloc(sizeof(char)*(TAM+24));
	sprintf(buffer, "%d %d %d %d %d %d %s", novo->seq, novo->ack, novo->len, novo->win_size, novo->flags, novo->cksum, novo->data);
	return buffer;
	}
	else return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1949
movq %rdi, %r14
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
movl (%r14), %edx
movl 0x4(%r14), %ecx
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
movl 0x10(%r14), %r10d
movl 0x14(%r14), %r11d
addq $0x18, %r14
subq $0x8, %rsp
leaq 0x1708(%rip), %rsi      # 0x303b
movq %rax, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x11a0
addq $0x20, %rsp
jmp 0x194b
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/./datagrama.h
// Function: mostraFlagsActivas
void mostraFlagsActivas(int flags){
	if(flags & FL_SYN) printf("FL_SYN\n");
	if(flags & FL_ACK) printf("FL_ACK\n");
	if(flags & FL_FIN) printf("FL_FIN\n");
	if(flags & FL_GET) printf("FL_GET\n");
	if(flags & FL_ERRO) printf("FL_ERRO\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
testb $0x1, %bl
je 0x196c
leaq 0x17c0(%rip), %rdi      # 0x3127
callq 0x1060
testb $0x2, %bl
je 0x197d
leaq 0x17b6(%rip), %rdi      # 0x312e
callq 0x1060
testb $0x4, %bl
je 0x198e
leaq 0x17ac(%rip), %rdi      # 0x3135
callq 0x1060
testb $0x8, %bl
je 0x199f
leaq 0x17a2(%rip), %rdi      # 0x313c
callq 0x1060
testb $0x10, %bl
jne 0x19ab
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1791(%rip), %rdi      # 0x3143
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/./datagrama.h
// Function: mostraDatagrama
void mostraDatagrama(Datagrama *data){
if(data){
	printf("Ack: %d\n", data->ack);
	printf("Seq: %d\n", data->seq);
	printf("Len: %d\n", data->len);
	printf("Win_size: %d\n", data->win_size);
	printf("checksum: %d\n", data->cksum);
	mostraFlagsActivas(data->flags);
	printf("Data:%s", data->data);
	}
	else printf("Formato desconhecido");
}

// Assembly:
testq %rdi, %rdi
je 0x1a46
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %esi
leaq 0x1677(%rip), %rdi      # 0x3050
xorl %eax, %eax
callq 0x1080
movl (%rbx), %esi
leaq 0x1670(%rip), %rdi      # 0x3059
xorl %eax, %eax
callq 0x1080
movl 0x8(%rbx), %esi
leaq 0x1668(%rip), %rdi      # 0x3062
xorl %eax, %eax
callq 0x1080
movl 0xc(%rbx), %esi
leaq 0x1660(%rip), %rdi      # 0x306b
xorl %eax, %eax
callq 0x1080
movl 0x14(%rbx), %esi
leaq 0x165d(%rip), %rdi      # 0x3079
xorl %eax, %eax
callq 0x1080
movl 0x10(%rbx), %edi
callq 0x1953
addq $0x18, %rbx
leaq 0x1651(%rip), %rdi      # 0x3087
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1080
leaq 0x1642(%rip), %rdi      # 0x308f
xorl %eax, %eax
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/./datagrama.h
// Function: readFile
int readFile(int file, int nbytes, char *buffer){
	int n, i = 0;
	n = 1;
	while(i < nbytes && n > 0){
	n = read(file, &(buffer[i]), 1);
	i++;
	}
	buffer[i] = '\0';
	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
testl %esi, %esi
jle 0x1a8e
movl %edi, %r15d
movl %esi, %r12d
xorl %r14d, %r14d
leaq (%rbx,%r14), %rsi
movl $0x1, %edx
movl %r15d, %edi
callq 0x10d0
incq %r14
testl %eax, %eax
jle 0x1a91
cmpq %r12, %r14
jb 0x1a6f
jmp 0x1a91
xorl %r14d, %r14d
movl %r14d, %eax
movb $0x0, (%rbx,%rax)
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/./datagrama.h
// Function: parteFicheiro
Datagrama *parteFicheiro(int fich, int nbytes, int seq){
	int length, bytesRead = 0;
	Datagrama *novo = initDatagrama();
	
	if(nbytes < TAM){
		length = nbytes;
	}else length = TAM;
		
	bytesRead = readFile(fich, length, novo->data);
	
	if(bytesRead == length){
	//numero de bytes lidos
		novo->seq = seq + bytesRead;
		novo->ack = 0;
		novo->len = strlen(novo->data);
		novo->win_size = 1;
		return novo;
	}
	else {
		novo->seq = seq + bytesRead;
		if(strlen(novo->data)==1) strcpy(novo->data,"c");
		novo->len = strlen(novo->data);
		novo->flags = FL_FIN;
		return novo;
		}
			
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %r13d
movl %edi, %r12d
movl $0xe0, %edi
callq 0x1120
leaq 0x18(%rax), %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, -0x38(%rbp)
movw $0x63, 0x18(%rax)
movl $0xc8, %r15d
cmpl %r15d, %r13d
cmovll %r13d, %r15d
testl %r13d, %r13d
jle 0x1b20
movl %ebx, -0x2c(%rbp)
movl %r15d, %ebx
xorl %r13d, %r13d
leaq (%r14,%r13), %rsi
movl $0x1, %edx
movl %r12d, %edi
callq 0x10d0
incq %r13
cmpq %rbx, %r13
jae 0x1b1b
testl %eax, %eax
jg 0x1afe
movl -0x2c(%rbp), %ebx
jmp 0x1b23
xorl %r13d, %r13d
movl %r13d, %eax
movb $0x0, (%r14,%rax)
cmpl %r15d, %r13d
movq -0x38(%rbp), %r12
jne 0x1b51
addl %ebx, %r15d
movl %r15d, (%r12)
movl $0x0, 0x4(%r12)
movl $0x1, %ebx
movl $0xc, %r15d
jmp 0x1b77
addl %ebx, %r13d
movl %r13d, (%r12)
movq %r14, %rdi
callq 0x1070
movl $0x4, %ebx
movl $0x10, %r15d
cmpq $0x1, %rax
jne 0x1b77
movw $0x63, (%r14)
movq %r14, %rdi
callq 0x1070
movl %eax, 0x8(%r12)
movl %ebx, (%r12,%r15)
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/clientec2.c
// Function: transfereFich
int transfereFich(int te, int tp, int sock, char *file, int destBuffer, ConState *con ,struct sockaddr_in *from, int fromlen){
	int trans, f, fin,  seq = 0;
	char *buffer;
	Datagrama *enviar;
	if((f = open(file, O_RDONLY))< 0){ //Ocorreu um erro na abertura do ficheiro. Possivelmente não existe
		enviar = initDatagrama();
		enviar->flags = (FL_ERRO | FL_FIN);
		buffer = muxDatagrama(enviar);
		free(enviar);
		sendto(sock,buffer,strlen(buffer), 0, (struct sockaddr *)from, fromlen);
		free(buffer);
		perror("open");
		return -1;
	}
	else {
		fin  = 0;
		trans = 1;
		while(!fin && trans){
			enviar = parteFicheiro(f, destBuffer, seq); //Segmento com atenção ao buffer do cliente
			enviar->cksum = checksum(enviar->data);     //Calcula o cksum da informação e junta ao segmento
			seq = enviar->seq;
			
			fin = (enviar->flags & FL_FIN);
			buffer = muxDatagrama(enviar);
			
			trans = sendMsg(te, tp, sock, buffer, con, seq, from, &fromlen);
			free(enviar);
			free(buffer);
		}
	return fin;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, -0x48(%rbp)
movl %r8d, -0x3c(%rbp)
movl %edx, -0x2c(%rbp)
movl %esi, -0x38(%rbp)
movl %edi, -0x34(%rbp)
movl 0x18(%rbp), %r14d
xorl %r15d, %r15d
movq %rcx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1150
movl %eax, -0x30(%rbp)
testl %eax, %eax
js 0x1e4c
movl -0x30(%rbp), %edi
movl -0x3c(%rbp), %esi
movl %r15d, %edx
callq 0x1aa4
movq %rax, %r12
leaq 0x18(%rax), %rdi
callq 0x1539
movl %eax, 0x14(%r12)
movl (%r12), %r15d
movl 0x10(%r12), %r14d
movq %r12, %rdi
callq 0x18f1
movq %rax, %rbx
movl -0x34(%rbp), %edi
movl -0x38(%rbp), %esi
movl -0x2c(%rbp), %edx
movq %rax, %rcx
movq -0x48(%rbp), %r8
movl %r15d, %r9d
leaq 0x18(%rbp), %rax
pushq %rax
pushq 0x10(%rbp)
callq 0x1b9a
addq $0x10, %rsp
movl %eax, %r13d
movq %r12, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
andl $0x4, %r14d
jne 0x1e3a
testl %r13d, %r13d
jne 0x1dc5
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0x2c(%rbp), %edi
movq 0x10(%rbp), %rsi
movl %r14d, %edx
callq 0x1237
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x1e3a
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/clientec2.c
// Function: trataPedido
Datagrama* trataPedido(char *pedido){
	if(strstr(pedido, "dir") && strstr(pedido, "get")==NULL){
	Datagrama *novo = initDatagrama();
	novo->flags = (FL_DIR);
	//strcpy(novo->data, "dir.cmd");
	novo->len = strlen("dir.cmd");
	novo->win_size = 1;
	return novo;
	}
	if(strstr(pedido, "get")){
	Datagrama *novo = initDatagrama();
	char ptr[5];
	novo->flags = (FL_GET);
	sscanf(pedido, "%s %s", ptr, novo->data);
	novo->len = strlen(novo->data);
	novo->win_size = 1;
	return novo;
	}
	if(strstr(pedido, "wait")){
	Datagrama *novo = initDatagrama();
	novo->flags = (FL_GET);
	strcpy(novo->data, "wait");
	novo->len = strlen(novo->data);
	novo->win_size = 1;
	return novo;
	}
	if(strstr(pedido, "put")){
	Datagrama *novo = initDatagrama();
	char ptr[5];
	novo->flags = (FL_PUT);
	sscanf(pedido, "%s %s", ptr, novo->data);
	novo->len = strlen(novo->data);
	novo->win_size = 1;
	return novo;
	}
	
	else return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0xd18(%rip), %rsi       # 0x30e5
callq 0x11e0
testq %rax, %rax
je 0x23ef
leaq 0xd0b(%rip), %rsi       # 0x30e9
movq %r14, %rdi
callq 0x11e0
testq %rax, %rax
je 0x24a6
leaq 0xcf3(%rip), %rsi       # 0x30e9
movq %r14, %rdi
callq 0x11e0
testq %rax, %rax
je 0x244c
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x18(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0x63, 0x18(%rax)
movl $0x8, 0x10(%rax)
leaq 0xcb7(%rip), %rsi       # 0x30ed
leaq -0x22(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1130
movq %r15, %rdi
jmp 0x2495
leaq 0xca0(%rip), %rsi       # 0x30f3
movq %r14, %rdi
callq 0x11e0
testq %rax, %rax
je 0x24ea
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x18(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movl $0x8, 0x10(%rax)
movl $0x74696177, 0x18(%rax) # imm = 0x74696177
movb $0x0, 0x1c(%rax)
callq 0x1070
movl %eax, 0x8(%rbx)
movl $0x1, 0xc(%rbx)
jmp 0x24dc
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0x63, 0x18(%rax)
movl $0x20, 0x10(%rax)
movabsq $0x100000007, %rax      # imm = 0x100000007
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc07(%rip), %rsi       # 0x30f8
movq %r14, %rdi
callq 0x11e0
testq %rax, %rax
je 0x253a
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x18(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0x63, 0x18(%rax)
movl $0x40, 0x10(%rax)
leaq 0xbbc(%rip), %rsi       # 0x30ed
leaq -0x1d(%rbp), %rdx
jmp 0x243a
xorl %ebx, %ebx
jmp 0x24dc
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/clientec2.c
// Function: enviaPedido
int enviaPedido(int sock, char *buffer, struct sockaddr_in *servidor,int te, int tp){
	if(!buffer){
		printf("erro no comando\n");
		return 0;
	}else {
		n = sendto(sock,buffer, strlen(buffer),0,(struct sockaddr *)servidor ,(socklen_t)length);
              	if (n < 0) { 
              		perror("Sendto");
              		exit(1);
              	}
            	return 1;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x258f
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
movq %rsi, %rdi
callq 0x1070
movl 0x309b(%rip), %r9d      # 0x5600
movl %r15d, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x10b0
movq %rax, %rcx
movl %ecx, 0x3093(%rip)      # 0x5614
movl $0x1, %eax
testl %ecx, %ecx
jns 0x259d
callq 0x13c4
leaq 0xbd4(%rip), %rdi       # 0x316a
callq 0x1060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/clientec2.c
// Function: contem
Flag *contem(char **argv, char *token) {
        Flag *flag = NULL;
        int i;

        for(i=0; argv[i]!=NULL; i++) {
                if(strcasecmp(argv[i], token) == 0) { /* encontrei */
                        flag = (Flag *) malloc(sizeof(Flag));
                        flag->bool = 1;
                        flag->pos = i;
                        return flag;
                }
        }
        return flag;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x279b
movq %rsi, %r14
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %r14, %rsi
callq 0x1040
testl %eax, %eax
je 0x279f
movq 0x8(%r15,%r12,8), %rdi
incq %r12
testq %rdi, %rdi
jne 0x2780
jmp 0x27b6
xorl %ebx, %ebx
jmp 0x27b6
movl $0x8, %edi
callq 0x1120
movq %rax, %rbx
movl $0x1, (%rax)
movl %r12d, 0x4(%rax)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ulisses[P]ftp-client-server/clientec2.c
// Function: main
int main(int args, char **argv) {
        Flag *tp = NULL;
        Flag *te = NULL;

        if((tp = contem(argv,"-tp"))==NULL) {
                errorMsg();
                exit(2);
        }

        if((te = contem(argv,"-te"))==NULL) {
                errorMsg();
                exit(3);
        }

        if(tp->bool && te->bool && args >5) {//a alterar aquando da programação da camada da aplicação
                cliente(atoi(argv[te->pos+1]),atoi(argv[tp->pos+1]), argv[5], argv[4]);
                /*Datagrama *teste = trataPedido(pedido);
                if(teste) mostraDatagrama(teste);
                free(teste);*/
        }
        return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r15d
leaq 0x946(%rip), %rsi       # 0x311f
movq %rbx, %rdi
callq 0x2762
testq %rax, %rax
je 0x284c
movq %rax, %r14
leaq 0x933(%rip), %rsi       # 0x3123
movq %rbx, %rdi
callq 0x2762
testq %rax, %rax
je 0x285b
cmpl $0x0, (%r14)
je 0x283f
cmpl $0x6, %r15d
jl 0x283f
cmpl $0x0, (%rax)
je 0x283f
movslq 0x4(%rax), %rax
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1180
movl %eax, %r15d
movslq 0x4(%r14), %rax
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1180
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
movl %r15d, %edi
movl %eax, %esi
callq 0x25a8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2751
movl $0x2, %edi
callq 0x11b0
callq 0x2751
movl $0x3, %edi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/tst/uint256.c
// Function: test_bits
void test_bits() {
    uint256_t a;
    clear256(&a);
    assert(bits256(&a) == 0);

    LOWER(LOWER(a)) = 1;
    assert(bits256(&a) == 1);

    LOWER(UPPER(a)) = 1;
    assert(bits128(&UPPER(a)) == 1);
    assert(bits256(&a) == 129);

    UPPER(UPPER(a)) = 0xff00000000000000;
    assert(bits128(&UPPER(a)) == 128);
    assert(bits256(&a) == 256);

    UPPER(UPPER(a)) = 0x7f00000000000000;
    assert(bits128(&UPPER(a)) == 127);
    assert(bits256(&a) == 255);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x33ce
movq %rbx, %rdi
callq 0x3adb
testl %eax, %eax
jne 0x1b4a
movq %rsp, %rdi
movq $0x1, 0x18(%rdi)
callq 0x3adb
cmpl $0x1, %eax
jne 0x1b69
movq %rsp, %rdi
movq $0x1, 0x8(%rdi)
callq 0x3aaf
cmpl $0x1, %eax
jne 0x1b88
movq %rsp, %rdi
callq 0x3adb
cmpl $0x81, %eax
jne 0x1ba7
movabsq $-0x100000000000000, %rax # imm = 0xFF00000000000000
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3aaf
cmpl $0x80, %eax
jne 0x1bc6
movq %rsp, %rdi
callq 0x3adb
cmpl $0x100, %eax            # imm = 0x100
jne 0x1be5
movabsq $0x7f00000000000000, %rax # imm = 0x7F00000000000000
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3aaf
cmpl $0x7f, %eax
jne 0x1c04
movq %rsp, %rdi
callq 0x3adb
cmpl $0xff, %eax
jne 0x1c23
addq $0x20, %rsp
popq %rbx
retq
leaq 0x4bb1(%rip), %rdi      # 0x6702
leaq 0x451f(%rip), %rsi      # 0x6077
leaq 0x4bb4(%rip), %rcx      # 0x6713
movl $0x58, %edx
callq 0x1030
leaq 0x4bb4(%rip), %rdi      # 0x6724
leaq 0x4500(%rip), %rsi      # 0x6077
leaq 0x4b95(%rip), %rcx      # 0x6713
movl $0x5b, %edx
callq 0x1030
leaq 0x4ba6(%rip), %rdi      # 0x6735
leaq 0x44e1(%rip), %rsi      # 0x6077
leaq 0x4b76(%rip), %rcx      # 0x6713
movl $0x5e, %edx
callq 0x1030
leaq 0x4b9f(%rip), %rdi      # 0x674d
leaq 0x44c2(%rip), %rsi      # 0x6077
leaq 0x4b57(%rip), %rcx      # 0x6713
movl $0x5f, %edx
callq 0x1030
leaq 0x4b93(%rip), %rdi      # 0x6760
leaq 0x44a3(%rip), %rsi      # 0x6077
leaq 0x4b38(%rip), %rcx      # 0x6713
movl $0x62, %edx
callq 0x1030
leaq 0x4b8e(%rip), %rdi      # 0x677a
leaq 0x4484(%rip), %rsi      # 0x6077
leaq 0x4b19(%rip), %rcx      # 0x6713
movl $0x63, %edx
callq 0x1030
leaq 0x4b82(%rip), %rdi      # 0x678d
leaq 0x4465(%rip), %rsi      # 0x6077
leaq 0x4afa(%rip), %rcx      # 0x6713
movl $0x66, %edx
callq 0x1030
leaq 0x4b7d(%rip), %rdi      # 0x67a7
leaq 0x4446(%rip), %rsi      # 0x6077
leaq 0x4adb(%rip), %rcx      # 0x6713
movl $0x67, %edx
callq 0x1030
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: shiftl256
void shiftl256(const uint256_t *number, uint32_t value, uint256_t *target) {
    if (value >= 256) {
        clear256(target);
    } else if (value == 128) {
        copy128(&UPPER_P(target), &LOWER_P(number));
        clear128(&LOWER_P(target));
    } else if (value == 0) {
        copy256(target, number);
    } else if (value < 128) {
        uint128_t tmp1;
        uint128_t tmp2;
        uint256_t result;
        shiftl128(&UPPER_P(number), value, &tmp1);
        shiftr128(&LOWER_P(number), (128 - value), &tmp2);
        add128(&tmp1, &tmp2, &UPPER(result));
        shiftl128(&LOWER_P(number), value, &LOWER(result));
        copy256(target, &result);
    } else if ((256 > value) && (value > 128)) {
        shiftl128(&LOWER_P(number), (value - 128), &UPPER_P(target));
        clear128(&LOWER_P(target));
    } else {
        clear256(target);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
cmpl $0x100, %esi            # imm = 0x100
jb 0x3478
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x3547
movl %esi, %ebp
movq %rdi, %r14
testb %bpl, %bpl
je 0x34a1
movzbl %bpl, %eax
cmpl $0x80, %eax
jne 0x34c4
movq 0x10(%r14), %rax
movq %rax, (%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x8(%rbx)
jmp 0x3540
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
jmp 0x3547
cmpl $0x7f, %ebp
ja 0x352c
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x33ec
addq $0x10, %r14
movl $0x80, %esi
subl %ebp, %esi
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x3554
movq 0x8(%r15), %rax
addq 0x8(%r12), %rax
movq (%r12), %rcx
adcq (%r15), %rcx
leaq 0x30(%rsp), %r15
movq %rcx, -0x10(%r15)
movq %rax, -0x8(%r15)
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x33ec
movaps -0x10(%r15), %xmm0
movups %xmm0, (%rbx)
movaps (%r15), %xmm0
jmp 0x3543
addq $0x10, %r14
addl $-0x80, %ebp
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x33ec
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: shiftr128
void shiftr128(const uint128_t *number, uint32_t value, uint128_t *target) {
    if (value >= 128) {
        clear128(target);
    } else if (value == 64) {
        UPPER_P(target) = 0;
        LOWER_P(target) = UPPER_P(number);
    } else if (value == 0) {
        copy128(target, number);
    } else if (value < 64) {
        uint128_t result;
        UPPER(result) = UPPER_P(number) >> value;
        LOWER(result) =
            (UPPER_P(number) << (64 - value)) + (LOWER_P(number) >> value);
        copy128(target, &result);
    } else if ((128 > value) && (value > 64)) {
        LOWER_P(target) = UPPER_P(number) >> (value - 64);
        UPPER_P(target) = 0;
    } else {
        clear128(target);
    }
}

// Assembly:
cmpl $0x80, %esi
jb 0x3563
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
retq
testl %esi, %esi
je 0x3578
cmpl $0x40, %esi
jne 0x3587
movq $0x0, (%rdx)
movq (%rdi), %rax
jmp 0x3582
movq (%rdi), %rax
movq %rax, (%rdx)
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rdx)
retq
movq (%rdi), %rax
jae 0x35ad
movq %rax, %r8
movl %esi, %ecx
shrq %cl, %r8
negb %cl
shlq %cl, %rax
movq 0x8(%rdi), %rdi
movl %esi, %ecx
shrq %cl, %rdi
addq %rax, %rdi
movq %r8, (%rdx)
movq %rdi, 0x8(%rdx)
retq
movl %esi, %ecx
shrq %cl, %rax
movq %rax, 0x8(%rdx)
movq $0x0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: add256
void add128(const uint128_t *number1, const uint128_t *number2, uint128_t *target) {
    UPPER_P(target) =
        UPPER_P(number1) + UPPER_P(number2) +
        ((LOWER_P(number1) + LOWER_P(number2)) < LOWER_P(number1));
    LOWER_P(target) = LOWER_P(number1) + LOWER_P(number2);
}

// Assembly:
pushq %rbx
movq 0x8(%rdi), %rax
addq 0x8(%rsi), %rax
movq (%rsi), %rax
adcq (%rdi), %rax
movq %rax, (%rdx)
movq 0x8(%rsi), %r9
addq 0x8(%rdi), %r9
movq %r9, 0x8(%rdx)
movq 0x10(%rdi), %r11
movq 0x18(%rdi), %rcx
movq 0x10(%rsi), %rbx
movq 0x18(%rsi), %r10
leaq (%rbx,%r11), %r8
notq %rcx
cmpq %r10, %rcx
adcq %r11, %rbx
cmpq %rbx, %r11
jne 0x3865
cmpq %rcx, %r10
jbe 0x3889
addq $0x1, %r9
adcq $0x0, %rax
movq %rax, (%rdx)
movq %r9, 0x8(%rdx)
movq 0x18(%rdi), %rcx
movq 0x10(%rsi), %r8
movq 0x18(%rsi), %r10
addq 0x10(%rdi), %r8
notq %rcx
cmpq %r10, %rcx
adcq $0x0, %r8
movq %r8, 0x10(%rdx)
movq 0x18(%rsi), %rax
addq 0x18(%rdi), %rax
movq %rax, 0x18(%rdx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: shiftl512
void shiftl512(const uint512_t *number, uint32_t value, uint512_t *target) {
    if (value >= 512) {
        clear512(target);
    } else if (value == 256) {
        copy256(&UPPER_P(target), &LOWER_P(number));
        clear256(&LOWER_P(target));
    } else if (value == 0) {
        copy512(target, number);
    } else if (value < 256) {
        uint256_t tmp1;
        uint256_t tmp2;
        uint512_t result;
        shiftl256(&UPPER_P(number), value, &tmp1);
        shiftr256(&LOWER_P(number), (256 - value), &tmp2);
        add256(&tmp1, &tmp2, &UPPER(result));
        shiftl256(&LOWER_P(number), value, &LOWER(result));
        copy512(target, &result);
    } else if ((512 > value) && (value > 256)) {
        shiftl256(&LOWER_P(number), (value - 256), &UPPER_P(target));
        clear256(&LOWER_P(target));
    } else {
        clear512(target);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %rbx
cmpl $0x200, %esi            # imm = 0x200
jb 0x360d
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x3721
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
je 0x3649
cmpl $0x100, %ebp            # imm = 0x100
jne 0x368c
movq 0x20(%r14), %rax
movq %rax, (%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
jmp 0x36f9
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x38(%rbx)
jmp 0x3721
jae 0x36ff
leaq 0x60(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x3452
addq $0x20, %r14
movl $0x100, %esi            # imm = 0x100
subl %ebp, %esi
leaq 0x40(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x3731
movq %rsp, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3822
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x3452
movaps -0x20(%r15), %xmm0
movups %xmm0, (%rbx)
movaps -0x10(%r15), %xmm0
movups %xmm0, 0x10(%rbx)
movaps (%r15), %xmm0
movups %xmm0, 0x20(%rbx)
movaps 0x10(%r15), %xmm0
movups %xmm0, 0x30(%rbx)
jmp 0x3721
addq $0x20, %r14
addl $0xffffff00, %ebp       # imm = 0xFFFFFF00
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x3452
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: shiftr256
void shiftr256(const uint256_t *number, uint32_t value, uint256_t *target) {
    if (value >= 256) {
        clear256(target);
    } else if (value == 128) {
        copy128(&LOWER_P(target), &UPPER_P(number));
        clear128(&UPPER_P(target));
    } else if (value == 0) {
        copy256(target, number);
    } else if (value < 128) {
        uint128_t tmp1;
        uint128_t tmp2;
        uint256_t result;
        shiftr128(&UPPER_P(number), value, &UPPER(result));
        shiftr128(&LOWER_P(number), value, &tmp1);
        shiftl128(&UPPER_P(number), (128 - value), &tmp2);
        add128(&tmp1, &tmp2, &LOWER(result));
        copy256(target, &result);
    } else if ((256 > value) && (value > 128)) {
        shiftr128(&UPPER_P(number), (value - 128), &LOWER_P(target));
        clear128(&UPPER_P(target));
    } else {
        clear256(target);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
cmpl $0x100, %esi            # imm = 0x100
jb 0x3756
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x3810
movl %esi, %ebp
movq %rdi, %r14
testb %bpl, %bpl
je 0x377f
movzbl %bpl, %eax
cmpl $0x80, %eax
jne 0x379b
movq (%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rbx)
jmp 0x380d
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
jmp 0x37f6
cmpl $0x7f, %ebp
ja 0x37fc
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x3554
leaq 0x10(%r14), %rdi
leaq 0x10(%rsp), %r12
movl %ebp, %esi
movq %r12, %rdx
callq 0x3554
movl $0x80, %esi
subl %ebp, %esi
movq %rsp, %r13
movq %r14, %rdi
movq %r13, %rdx
callq 0x33ec
movq 0x8(%r12), %rax
addq 0x8(%r13), %rax
movq (%r13), %rcx
adcq (%r12), %rcx
movaps (%r15), %xmm0
movups %xmm0, (%rbx)
movq %rcx, 0x10(%rbx)
movq %rax, 0x18(%rbx)
jmp 0x3813
addl $-0x80, %ebp
leaq 0x10(%rbx), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x3554
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: shiftr512
void shiftr512(const uint512_t *number, uint32_t value, uint512_t *target) {
    if (value >= 512) {
        clear512(target);
    } else if (value == 256) {
        copy256(&LOWER_P(target), &UPPER_P(number));
        clear256(&UPPER_P(target));
    } else if (value == 0) {
        copy512(target, number);
    } else if (value < 256) {
        uint256_t tmp1;
        uint256_t tmp2;
        uint512_t result;
        shiftr256(&UPPER_P(number), value, &UPPER(result));
        shiftr256(&LOWER_P(number), value, &tmp1);
        shiftl256(&UPPER_P(number), (256 - value), &tmp2);
        add256(&tmp1, &tmp2, &LOWER(result));
        copy512(target, &result);
    } else if ((512 > value) && (value > 256)) {
        shiftr256(&UPPER_P(number), (value - 256), &LOWER_P(target));
        clear256(&UPPER_P(target));
    } else {
        clear512(target);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %rbx
cmpl $0x200, %esi            # imm = 0x200
jb 0x38d3
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x39c0
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
je 0x3912
cmpl $0x100, %ebp            # imm = 0x100
jne 0x3952
movq (%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x38(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
jmp 0x39c0
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x38(%rbx)
jmp 0x39c0
jae 0x39d0
movq %rsp, %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x3731
leaq 0x20(%r14), %rdi
leaq 0x60(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x3731
movl $0x100, %esi            # imm = 0x100
subl %ebp, %esi
leaq 0x40(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x3452
leaq 0x20(%rsp), %r14
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3822
movaps -0x20(%r14), %xmm0
movups %xmm0, (%rbx)
movaps -0x10(%r14), %xmm0
movups %xmm0, 0x10(%rbx)
movaps (%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movaps 0x10(%r14), %xmm0
movups %xmm0, 0x30(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addl $0xffffff00, %ebp       # imm = 0xFFFFFF00
leaq 0x20(%rbx), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x3731
xorps %xmm0, %xmm0
jmp 0x38c7
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: shiftar256
void shiftar256(const uint256_t *number, uint32_t value, uint256_t *target) {
    bool positive = (UPPER(UPPER_P(number)) < 0x8000000000000000);
    shiftr256(number, value, target);
    if (positive) return;
    if (!value) return;
    if (value >= 64) {
        UPPER(UPPER_P(target)) = 0xffffffffffffffffllu;
        if (value >= 128) {
            LOWER(UPPER_P(target)) = 0xffffffffffffffffllu;
            if (value >= 192) {
                UPPER(LOWER_P(target)) = 0xffffffffffffffffllu;
                if (value >= 256) {
                    LOWER(LOWER_P(target)) = 0xffffffffffffffffllu;
                } else if (value > 192) {
                    LOWER(LOWER_P(target)) |= 0xffffffffffffffffllu - ((1llu << (256 - value)) - 1llu);
                }
            } else if (value > 128) {
                UPPER(LOWER_P(target)) |= 0xffffffffffffffffllu - ((1llu << (192 - value)) - 1llu);
            }
        } else if (value > 64) {
            LOWER(UPPER_P(target)) |= 0xffffffffffffffffllu - ((1llu << (128 - value)) - 1llu);
        }
    } else {
        UPPER(UPPER_P(target)) |= 0xffffffffffffffffllu - ((1llu << (64 - value)) - 1llu);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq (%rdi), %r14
callq 0x3731
testl %ebp, %ebp
je 0x3a56
testq %r14, %r14
jns 0x3a56
cmpl $0x40, %ebp
jb 0x3a44
movq $-0x1, (%rbx)
cmpl $0x80, %ebp
jb 0x3a5b
movq $-0x1, 0x8(%rbx)
cmpl $0xc0, %ebp
jb 0x3a75
movq $-0x1, 0x10(%rbx)
cmpl $0x100, %ebp            # imm = 0x100
jb 0x3a92
movq $-0x1, 0x18(%rbx)
jmp 0x3a56
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
orq %rax, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x40, %ebp
je 0x3a56
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
orq %rax, 0x8(%rbx)
jmp 0x3a56
cmpl $0x80, %ebp
je 0x3a56
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
orq %rax, 0x10(%rbx)
jmp 0x3a56
cmpl $0xc0, %ebp
je 0x3a56
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
orq %rax, 0x18(%rbx)
jmp 0x3a56
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: bits256
uint32_t bits256(const uint256_t *number) {
    if (!zero128(&UPPER_P(number))) {
        return 128 + bits128(&UPPER_P(number));
    } else {
        return bits128(&LOWER_P(number));
    }
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
je 0x3afb
xorl %eax, %eax
testq %rcx, %rcx
setne %al
cmoveq %rdx, %rcx
shll $0x6, %eax
addl $0x40, %eax
jmp 0x3b05
movl $0x80, %eax
testq %rcx, %rcx
je 0x3b12
bsrq %rcx, %rcx
xorl $0x3f, %ecx
subl %ecx, %eax
subl $-0x80, %eax
retq
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x3b28
bsrq %rax, %rax
xorl $-0x40, %eax
addl $0x81, %eax
retq
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x3b3c
bsrq %rax, %rax
xorl $-0x40, %eax
addl $0x41, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: sgt256
bool sgt256(const uint256_t *number1, const uint256_t *number2) {
    return (
        UPPER(UPPER_P(number1)) >= 0x8000000000000000 == UPPER(UPPER_P(number2)) >= 0x8000000000000000
        ? gt256(number1, number2)
        : gt256(number2, number1)
    );
}

// Assembly:
movq %rdi, %rax
movq (%rsi), %rcx
xorq (%rdi), %rcx
js 0x3d28
movq %rax, %rdi
jmp 0x3c19
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x3c19
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: add512
void add512(const uint512_t *number1, const uint512_t *number2, uint512_t *target) {
    uint256_t tmp;
    add256(&UPPER_P(number1), &UPPER_P(number2), &UPPER_P(target));
    add256(&LOWER_P(number1), &LOWER_P(number2), &tmp);
    if (gt256(&LOWER_P(number1), &tmp)) {
        uint256_t one;
        clear128(&UPPER(one));
        UPPER(LOWER(one)) = 0;
        LOWER(LOWER(one)) = 1;
        add256(&UPPER_P(target), &one, &UPPER_P(target));
    }
    copy256(&LOWER_P(target), &tmp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x3822
leaq 0x20(%r14), %rdi
addq $0x20, %r15
movq %rsp, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x3822
movq (%r12), %r15
cmpq %r15, 0x20(%r14)
jne 0x3d8b
movq 0x8(%rsp), %rax
cmpq %rax, 0x28(%r14)
jne 0x3d8b
movq 0x10(%rsp), %rax
cmpq %rax, 0x30(%r14)
jne 0x3d8b
movq 0x38(%r14), %rax
cmpq 0x18(%rsp), %rax
jbe 0x3db3
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq $0x1, 0x18(%rsi)
movq %rbx, %rdi
movq %rbx, %rdx
callq 0x3822
movq %r15, 0x20(%rbx)
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x28(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: minus512
void minus512(const uint512_t *number1, const uint512_t *number2, uint512_t *target) {
    uint256_t tmp;
    minus256(&UPPER_P(number1), &UPPER_P(number2), &UPPER_P(target));
    minus256(&LOWER_P(number1), &LOWER_P(number2), &tmp);
    if (gt256(&tmp, &LOWER_P(number1))) {
        uint256_t one;
        clear128(&UPPER(one));
        UPPER(LOWER(one)) = 0;
        LOWER(LOWER(one)) = 1;
        minus256(&UPPER_P(target), &one, &UPPER_P(target));
    }
    minus256(&LOWER_P(number1), &LOWER_P(number2), &LOWER_P(target));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
callq 0x3df3
leaq 0x20(%r12), %r15
addq $0x20, %r14
movq %rsp, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3df3
movq 0x20(%r12), %rax
cmpq %rax, (%r13)
jne 0x3eee
movq 0x28(%r12), %rax
cmpq %rax, 0x8(%rsp)
jne 0x3eee
movq 0x30(%r12), %rax
cmpq %rax, 0x10(%rsp)
jne 0x3eee
movq 0x18(%rsp), %rax
cmpq 0x38(%r12), %rax
jbe 0x3f16
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq $0x1, 0x18(%rsi)
movq %rbx, %rdi
movq %rbx, %rdx
callq 0x3df3
addq $0x20, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3df3
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: exp256
void exp256(const uint256_t *base, const uint256_t *power, uint256_t *target) {
    uint256_t remaining, result;
    copy256(&remaining, power);
    UPPER(UPPER(result)) = 0;
    LOWER(UPPER(result)) = 0;
    UPPER(LOWER(result)) = 0;
    LOWER(LOWER(result)) = 1;
    uint256_t multiplier;
    copy256(&multiplier, base);
    while (!zero256(&remaining)) {
        if (LOWER(LOWER(remaining)) & 1) {
            mul256(&result, &multiplier, &result);
        }
        mul256(&multiplier, &multiplier, &multiplier);
        shiftr256(&remaining, 1, &remaining);
    }
    copy256(target, &result);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movups (%rsi), %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq 0x10(%rsi), %rax
movq %rax, 0x10(%r14)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%r14)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq $0x1, 0x18(%r15)
movups (%rdi), %xmm0
leaq 0x40(%rsp), %r12
movaps %xmm0, (%r12)
movups 0x10(%rdi), %xmm0
movaps %xmm0, 0x10(%r12)
testq %rax, %rax
je 0x4809
testb $0x1, %al
je 0x4820
movq %r15, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x41b4
jmp 0x4820
cmpq $0x0, 0x10(%rsp)
jne 0x4820
cmpq $0x0, 0x8(%rsp)
jne 0x4820
cmpq $0x0, (%rsp)
je 0x4845
movq %r12, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x41b4
movq %r14, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x3731
movq 0x18(%rsp), %rax
jmp 0x47f0
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rbx)
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: divmod128
void divmod128(const uint128_t *l, const uint128_t *r, uint128_t *retDiv,
               uint128_t *retMod) {
    uint128_t copyd, adder, resDiv, resMod;
    uint128_t one;
    UPPER(one) = 0;
    LOWER(one) = 1;
    uint32_t diffBits = bits128(l) - bits128(r);
    clear128(&resDiv);
    copy128(&resMod, l);
    if (gt128(r, l)) {
        copy128(retMod, l);
        clear128(retDiv);
    } else {
        shiftl128(r, diffBits, &copyd);
        shiftl128(&one, diffBits, &adder);
        if (gt128(&copyd, &resMod)) {
            shiftr128(&copyd, 1, &copyd);
            shiftr128(&adder, 1, &adder);
        }
        while (gte128(&resMod, r)) {
            if (gte128(&resMod, &copyd)) {
                minus128(&resMod, &copyd, &resMod);
                or128(&resDiv, &adder, &resDiv);
            }
            shiftr128(&copyd, 1, &copyd);
            shiftr128(&adder, 1, &adder);
        }
        copy128(retDiv, &resDiv);
        copy128(retMod, &resMod);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r15
movq (%rdi), %r13
testq %r13, %r13
je 0x48b3
bsrq %r13, %rax
xorl $-0x40, %eax
addl $0x81, %eax
jmp 0x48ca
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x48c8
bsrq %rax, %rax
xorl $-0x40, %eax
addl $0x41, %eax
jmp 0x48ca
xorl %eax, %eax
movq (%r15), %rbp
testq %rbp, %rbp
je 0x48e0
bsrq %rbp, %r12
xorl $0x3f, %r12d
orl $-0x80, %r12d
jmp 0x48f9
movq 0x8(%r15), %rcx
testq %rcx, %rcx
je 0x48f6
bsrq %rcx, %r12
notl %r12d
orl $-0x40, %r12d
jmp 0x48f9
xorl %r12d, %r12d
movq 0x8(%rdi), %r14
cmpq %r13, %rbp
jne 0x4906
cmpq %r14, 0x8(%r15)
jbe 0x491e
movq %r13, (%rbx)
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
jmp 0x4a02
movq %rdx, (%rsp)
addl %eax, %r12d
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movl %r12d, %esi
callq 0x33ec
cmpl $0x7f, %r12d
jbe 0x493f
xorl %eax, %eax
jmp 0x4969
cmpl $0x40, %r12d
je 0x4951
testl %r12d, %r12d
jne 0x4958
movl $0x1, %eax
jmp 0x4969
movl $0x1, %edx
jmp 0x4978
cmpl $0x3f, %r12d
ja 0x496d
movl $0x1, %eax
movl %r12d, %ecx
shlq %cl, %rax
xorl %edx, %edx
jmp 0x497a
movl $0x1, %edx
movl %r12d, %ecx
shlq %cl, %rdx
xorl %eax, %eax
movq 0x8(%rsp), %rsi
cmpq %r13, %rsi
jne 0x4993
movq 0x10(%rsp), %rcx
cmpq %r14, %rcx
ja 0x499a
movq %r13, %rsi
jmp 0x49aa
movq 0x10(%rsp), %rcx
jbe 0x49aa
shrdq $0x1, %rsi, %rcx
shrq %rsi
shrdq $0x1, %rdx, %rax
shrq %rdx
xorl %edi, %edi
xorl %r8d, %r8d
cmpq %rbp, %r13
jne 0x49bc
cmpq 0x8(%r15), %r14
jae 0x49be
jmp 0x49ed
jbe 0x49f0
cmpq %rsi, %r13
jne 0x49cd
cmpq %rcx, %r14
jae 0x49cf
movq %rsi, %r13
jmp 0x49db
jbe 0x49db
subq %rcx, %r14
sbbq %rsi, %r13
orq %rdx, %rdi
orq %rax, %r8
shrdq $0x1, %rsi, %rcx
shrq %rsi
shrdq $0x1, %rdx, %rax
shrq %rdx
jmp 0x49af
movq %rbp, %r13
movq (%rsp), %rax
movq %rdi, (%rax)
movq %r8, 0x8(%rax)
movq %r13, (%rbx)
movq %r14, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: addmod256
void addmod256(const uint256_t *number1, const uint256_t *number2, const uint256_t *divisor, uint256_t *target) {
    uint512_t one, two, sum, three, result;
    clear256(&UPPER_P(&one));
    clear256(&UPPER_P(&two));
    clear256(&UPPER_P(&three));
    copy256(&LOWER_P(&one), number1);
    copy256(&LOWER_P(&two), number2);
    copy256(&LOWER_P(&three), divisor);
    add512(&one, &two, &sum);
    if (zero256(&UPPER(sum))) {
        divmod256(&LOWER(sum), divisor, &LOWER(one), target);
    } else {
        copy256(&LOWER(two), divisor);
        divmod512(&sum, &two, &one, &result);
        copy256(target, &LOWER(result));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %rbx
movq %rdx, %r14
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
leaq 0x80(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movups (%rdi), %xmm0
movaps %xmm0, 0x20(%rax)
movups 0x10(%rdi), %xmm0
movaps %xmm0, 0x30(%rax)
movups (%rsi), %xmm0
movaps %xmm0, 0x20(%rcx)
movups 0x10(%rsi), %xmm0
movaps %xmm0, 0x30(%rcx)
movq %rsp, %r15
movq %rax, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x3d33
cmpq $0x0, 0x18(%r15)
jne 0x4ff3
cmpq $0x0, 0x10(%rsp)
jne 0x4ff3
cmpq $0x0, 0x8(%rsp)
jne 0x4ff3
cmpq $0x0, (%rsp)
jne 0x4ff3
leaq 0x60(%rsp), %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x4a11
jmp 0x5035
movups (%r14), %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movups 0x10(%r14), %xmm0
movaps %xmm0, 0x30(%rsi)
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
leaq 0xc0(%rsp), %r14
movq %r14, %rcx
callq 0x4c3e
movups 0x20(%r14), %xmm0
movups %xmm0, (%rbx)
movups 0x30(%r14), %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: mulmod256
void mulmod256(const uint256_t *number1, const uint256_t *number2, const uint256_t *divisor, uint256_t *target) {
    uint512_t one, two, product, three, result;
    clear256(&UPPER_P(&one));
    clear256(&UPPER_P(&two));
    clear256(&UPPER_P(&three));
    copy256(&LOWER_P(&one), number1);
    copy256(&LOWER_P(&two), number2);
    copy256(&LOWER_P(&three), divisor);
    mul512(&one, &two, &product);
    if (zero256(&UPPER(product))) {
        divmod256(&LOWER(product), divisor, &LOWER(one), target);
    } else {
        copy256(&LOWER(two), divisor);
        divmod512(&product, &two, &one, &result);
        copy256(target, &LOWER(result));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %rbx
movq %rdx, %r14
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
leaq 0x80(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movups (%rdi), %xmm0
movaps %xmm0, 0x20(%rax)
movups 0x10(%rdi), %xmm0
movaps %xmm0, 0x30(%rax)
movups (%rsi), %xmm0
movaps %xmm0, 0x20(%rcx)
movups 0x10(%rsi), %xmm0
movaps %xmm0, 0x30(%rcx)
movq %rsp, %r15
movq %rax, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x43d0
cmpq $0x0, 0x18(%r15)
jne 0x50d6
cmpq $0x0, 0x10(%rsp)
jne 0x50d6
cmpq $0x0, 0x8(%rsp)
jne 0x50d6
cmpq $0x0, (%rsp)
jne 0x50d6
leaq 0x60(%rsp), %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x4a11
jmp 0x5118
movups (%r14), %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movups 0x10(%r14), %xmm0
movaps %xmm0, 0x30(%rsi)
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
leaq 0xc0(%rsp), %r14
movq %r14, %rcx
callq 0x4c3e
movups 0x20(%r14), %xmm0
movups %xmm0, (%rbx)
movups 0x30(%r14), %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/uint256.c
// Function: tostring128
bool tostring128(const uint128_t *number, uint32_t baseParam, char *out,
                 uint32_t outLength) {
    if ((baseParam < 2) || (baseParam > 36)) {
        return false;
    }
    uint128_t rDiv;
    uint128_t rMod;
    uint128_t base;
    copy128(&rDiv, number);
    clear128(&base);
    LOWER(base) = baseParam;
    uint32_t offset = 0;
    do {
        if (offset > (outLength - 1)) {
            return false;
        }
        divmod128(&rDiv, &base, &rDiv, &rMod);
        out[offset++] = HEXDIGITS[LOWER(rMod)];
    } while (!zero128(&rDiv));
    out[offset] = '\0';
    reverseString(out, offset);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leal -0x25(%rsi), %eax
cmpl $-0x23, %eax
jae 0x5142
xorl %ebp, %ebp
jmp 0x51df
movl %ecx, %r14d
movq %rdx, %rbx
movups (%rdi), %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
leaq 0x18(%rsp), %rcx
movq $0x0, (%rcx)
movl %esi, %eax
movq %rax, 0x8(%rcx)
decl %r14d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0x209c(%rip), %r13      # 0x7210
incl %r12d
cmpl %r14d, %r12d
setbe %bpl
ja 0x51df
movq %r15, %rdi
leaq 0x18(%rsp), %rsi
movq %r15, %rdx
leaq 0x28(%rsp), %rcx
callq 0x4889
movq 0x30(%rsp), %rax
movb (%rax,%r13), %cl
movl %r12d, %eax
movb %cl, (%rbx,%rax)
movq (%rsp), %rcx
orq 0x8(%rsp), %rcx
jne 0x5174
leal 0x1(%r12), %ecx
movb $0x0, (%rbx,%rcx)
testl %r12d, %r12d
je 0x51df
decq %rax
xorl %ecx, %ecx
movb (%rbx,%rcx), %dl
movb 0x1(%rbx,%rax), %sil
movb %sil, (%rbx,%rcx)
movb %dl, 0x1(%rbx,%rax)
incq %rcx
movl %eax, %edx
decq %rax
cmpq %rdx, %rcx
jb 0x51c2
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq