#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int desas2(int *codes, char *ligne) {
  int opc, te;
  char *mnemo[] = {"A=0   ", "B=0   ", "C=0   ", "ABEX  ", "B=A   ", "ACEX  ",
                   "C=B   ", "BCEX  ", "A=C   ", "A=A+B ", "A=A+C ", "A=A+1 ",
                   "A=A-B ", "A=A-1 ", "A=A-C ", "C=C+C ", "C=A+C ", "C=C+1 ",
                   "C=A-C ", "C=C-1 ", "C=-C  ", "C=-C-1", "?B#0  ", "?C#0  ",
                   "?A<C  ", "?A<B  ", "?A#0  ", "?A#C  ", "ASR   ", "BSR   ",
                   "CSR   ", "ASL   "};
  char *champ[] = {" PT", " X ", " WPT", " W ", " PQ", " XS", " M ", " S "};
  opc = (codes[0] >> 5) & 0x1f;
  te = (codes[0] >> 2) & 0x07;
  strcpy(ligne, mnemo[opc]);
  strcat(ligne, champ[te]);
  return (1);
}


x86 assembly (clang, -O0):
<desas2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x120(%rbp),%rdi
lea    0x2b8f(%rip),%rsi
mov    $0x100,%edx
call   1040 <memcpy@plt>
lea    -0x160(%rbp),%rdi
lea    0x2c77(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x5,%eax
and    $0x1f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x2,%eax
and    $0x7,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rax
mov    -0x120(%rbp,%rax,8),%rsi
ff
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
movslq -0x18(%rbp),%rax
mov    -0x160(%rbp,%rax,8),%rsi
ff
call   1050 <strcat@plt>
mov    $0x1,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<desas2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    (%rdi),%ebx
mov    %rbx,%rax
shr    $0x3,%rax
and    $0x7c,%eax
lea    0xfca(%rip),%rcx
movslq (%rax,%rcx,1),%rsi
add    %rcx,%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
and    $0x1c,%ebx
lea    0x1031(%rip),%rax
movslq (%rbx,%rax,1),%rsi
add    %rax,%rsi
mov    %r14,%rdi
call   1040 <strcat@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"A=0 \00"
@.str.1 = [7 x i8] c"B=0 \00"
@.str.2 = [7 x i8] c"C=0 \00"
@.str.3 = [7 x i8] c"ABEX \00"
@.str.4 = [7 x i8] c"B=A \00"
@.str.5 = [7 x i8] c"ACEX \00"
@.str.6 = [7 x i8] c"C=B \00"
@.str.7 = [7 x i8] c"BCEX \00"
@.str.8 = [7 x i8] c"A=C \00"
@.str.9 = [7 x i8] c"A=A+B \00"
@.str.10 = [7 x i8] c"A=A+C \00"
@.str.11 = [7 x i8] c"A=A+1 \00"
@.str.12 = [7 x i8] c"A=A-B \00"
@.str.13 = [7 x i8] c"A=A-1 \00"
@.str.14 = [7 x i8] c"A=A-C \00"
@.str.15 = [7 x i8] c"C=C+C \00"
@.str.16 = [7 x i8] c"C=A+C \00"
@.str.17 = [7 x i8] c"C=C+1 \00"
@.str.18 = [7 x i8] c"C=A-C \00"
@.str.19 = [7 x i8] c"C=C-1 \00"
@.str.20 = [7 x i8] c"C=-C \00"
@.str.21 = [7 x i8] c"C=-C-1\00"
@.str.22 = [7 x i8] c"?B \00"
@.str.23 = [7 x i8] c"?C \00"
@.str.24 = [7 x i8] c"?A<C \00"
@.str.25 = [7 x i8] c"?A<B \00"
@.str.26 = [7 x i8] c"?A \00"
@.str.27 = [7 x i8] c"?A#C \00"
@.str.28 = [7 x i8] c"ASR \00"
@.str.29 = [7 x i8] c"BSR \00"
@.str.30 = [7 x i8] c"CSR \00"
@.str.31 = [7 x i8] c"ASL \00"
@__const.desas2.mnemo = [32 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i32 0, i32 0)]
@.str.32 = [4 x i8] c" PT\00"
@.str.33 = [4 x i8] c" X \00"
@.str.34 = [5 x i8] c" WPT\00"
@.str.35 = [4 x i8] c" W \00"
@.str.36 = [4 x i8] c" PQ\00"
@.str.37 = [4 x i8] c" XS\00"
@.str.38 = [4 x i8] c" M \00"
@.str.39 = [4 x i8] c" S \00"
@__const.desas2.champ = [8 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.33, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.35, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.36, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.38, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.39, i32 0, i32 0)]
define i32 @desas2(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [32 x i8*]
%8 = alloca [8 x i8*]
store i32* %0, i32** %3
store i8* %1, i8** %4
%9 = bitcast [32 x i8*]* %7 to i8*
%10 = bitcast [8 x i8*]* %8 to i8*
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 0
%13 = load i32, i32* %12
%14 = ashr i32 %13, 5
%15 = and i32 %14, 31
store i32 %15, i32* %5
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 0
%18 = load i32, i32* %17
%19 = ashr i32 %18, 2
%20 = and i32 %19, 7
store i32 %20, i32* %6
%21 = load i8*, i8** %4
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [32 x i8*], [32 x i8*]* %7, i64 0, i64 %23
%25 = load i8*, i8** %24
%26 = call i32 @strcpy(i8* %21, i8* %25)
%27 = load i8*, i8** %4
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [8 x i8*], [8 x i8*]* %8, i64 0, i64 %29
%31 = load i8*, i8** %30
%32 = call i32 @strcat(i8* %27, i8* %31)
ret i32 1
}

LLVM IR (-O2):
@.str = [7 x i8] c"A=0 \00"
@.str.1 = [7 x i8] c"B=0 \00"
@.str.2 = [7 x i8] c"C=0 \00"
@.str.3 = [7 x i8] c"ABEX \00"
@.str.4 = [7 x i8] c"B=A \00"
@.str.5 = [7 x i8] c"ACEX \00"
@.str.6 = [7 x i8] c"C=B \00"
@.str.7 = [7 x i8] c"BCEX \00"
@.str.8 = [7 x i8] c"A=C \00"
@.str.9 = [7 x i8] c"A=A+B \00"
@.str.10 = [7 x i8] c"A=A+C \00"
@.str.11 = [7 x i8] c"A=A+1 \00"
@.str.12 = [7 x i8] c"A=A-B \00"
@.str.13 = [7 x i8] c"A=A-1 \00"
@.str.14 = [7 x i8] c"A=A-C \00"
@.str.15 = [7 x i8] c"C=C+C \00"
@.str.16 = [7 x i8] c"C=A+C \00"
@.str.17 = [7 x i8] c"C=C+1 \00"
@.str.18 = [7 x i8] c"C=A-C \00"
@.str.19 = [7 x i8] c"C=C-1 \00"
@.str.20 = [7 x i8] c"C=-C \00"
@.str.21 = [7 x i8] c"C=-C-1\00"
@.str.22 = [7 x i8] c"?B \00"
@.str.23 = [7 x i8] c"?C \00"
@.str.24 = [7 x i8] c"?A<C \00"
@.str.25 = [7 x i8] c"?A<B \00"
@.str.26 = [7 x i8] c"?A \00"
@.str.27 = [7 x i8] c"?A#C \00"
@.str.28 = [7 x i8] c"ASR \00"
@.str.29 = [7 x i8] c"BSR \00"
@.str.30 = [7 x i8] c"CSR \00"
@.str.31 = [7 x i8] c"ASL \00"
@reltable.desas2 = [32 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.3 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.4 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.5 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.6 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.7 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.8 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.9 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.10 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.11 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.12 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.13 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.14 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.15 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.16 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.17 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.18 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.19 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.20 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.21 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.22 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.23 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.24 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.25 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.26 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.27 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.28 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.29 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.30 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.31 to i64), i64 ptrtoint ([32 x i32]* @reltable.desas2 to i64)) to i32)]
@.str.32 = [4 x i8] c" PT\00"
@.str.33 = [4 x i8] c" X \00"
@.str.34 = [5 x i8] c" WPT\00"
@.str.35 = [4 x i8] c" W \00"
@.str.36 = [4 x i8] c" PQ\00"
@.str.37 = [4 x i8] c" XS\00"
@.str.38 = [4 x i8] c" M \00"
@.str.39 = [4 x i8] c" S \00"
@reltable.desas2.40 = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.32 to i64), i64 ptrtoint ([8 x i32]* @reltable.desas2.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.33 to i64), i64 ptrtoint ([8 x i32]* @reltable.desas2.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.34 to i64), i64 ptrtoint ([8 x i32]* @reltable.desas2.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.35 to i64), i64 ptrtoint ([8 x i32]* @reltable.desas2.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.36 to i64), i64 ptrtoint ([8 x i32]* @reltable.desas2.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.37 to i64), i64 ptrtoint ([8 x i32]* @reltable.desas2.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.38 to i64), i64 ptrtoint ([8 x i32]* @reltable.desas2.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.39 to i64), i64 ptrtoint ([8 x i32]* @reltable.desas2.40 to i64)) to i32)]
define i32 @desas2(i32* nocapture %0, i8* %1) {
%3 = load i32, i32* %0
%4 = lshr i32 %3, 5
%5 = and i32 %4, 31
%6 = lshr i32 %3, 2
%7 = and i32 %6, 7
%8 = zext i32 %5 to i64
%9 = shl i64 %8, 2
%10 = call i8* @llvm.load.relative.i64(i8* bitcast ([32 x i32]* @reltable.desas2 to i8*), i64 %9)
%11 = tail call i32 @strcpy(i8* %1, i8* %10)
%12 = zext i32 %7 to i64
%13 = shl i64 %12, 2
%14 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.desas2.40 to i8*), i64 %13)
%15 = tail call i32 @strcat(i8* %1, i8* %14)
ret i32 1
}