xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ lirerr(int);
void split_one(void) { lirerr(999999); }


x86 assembly (clang, -O0):
<split_one>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf423f,%edi
call   1030 <lirerr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<split_one>:
mov    $0xf423f,%edi
jmp    1030 <lirerr@plt>

LLVM IR (-O0):
define void @split_one() {
%1 = call i32 @lirerr(i32 999999)
ret void
}

LLVM IR (-O2):
define void @split_one() {
%1 = tail call i32 @lirerr(i32 999999)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void yyerror(char *s) {
  extern int linecount;
  fprintf(stderr, "%s at line %d\n", s, linecount);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    0x2ea0(%rip),%rax
mov    (%rax),%ecx
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    0x2ead(%rip),%rax
mov    (%rax),%ecx
lea    0xed4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"%s at line %d\0A\00"
@linecount = external global i32
define void @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @linecount
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"%s at line %d\0A\00"
@linecount = external global i32
define void @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @linecount
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret void
}
int test_imm_38uint16_mem(unsigned short *val) {
  return ((*val) & (-0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffffc8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_38uint16_mem>:
movzwl (%rdi),%eax
test   $0xffc8,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_38uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -56
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_38uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -56
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *Cmd_Argv(int /*<<< orphan*/);
int /*<<< orphan*/ Com_Printf(char *, char *);
void Cmd_ForwardToServer(void) {
  char *cmd;
  cmd = Cmd_Argv(0);
  Com_Printf("Unknown command \"%s\"\n", cmd);
}


x86 assembly (clang, -O0):
<Cmd_ForwardToServer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <Cmd_Argv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <Com_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cmd_ForwardToServer>:
push   %rax
xor    %edi,%edi
call   1040 <Cmd_Argv@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <Com_Printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Unknown command \22%s\22\0A\00"
define void @Cmd_ForwardToServer() {
%1 = alloca i8*
%2 = call i8* @Cmd_Argv(i32 0)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @Com_Printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Unknown command \22%s\22\0A\00"
define void @Cmd_ForwardToServer() {
%1 = tail call i8* @Cmd_Argv(i32 0)
%2 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
void *find_node_by_prop_value_str(void const *, char *, char const *);
void *find_node_by_devtype(const void *prev, const char *type) {
  return find_node_by_prop_value_str(prev, "device_type", type);
}


x86 assembly (clang, -O0):
<find_node_by_devtype>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <find_node_by_prop_value_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_node_by_devtype>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <find_node_by_prop_value_str@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"device_type\00"
define i8* @find_node_by_devtype(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @find_node_by_prop_value_str(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i8* %7
}

LLVM IR (-O2):
@.str = [12 x i8] c"device_type\00"
define i8* @find_node_by_devtype(i8* %0, i8* %1) {
%3 = tail call i8* @find_node_by_prop_value_str(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i8* %3
}
int test_imm_E4uint16_reg(unsigned short val) {
  return ((val) & (-0xE4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E4uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff1c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E4uint16_reg>:
test   $0xff1c,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E4uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -228
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_E4uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -228
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *,
                      char const *);
void __func_le_sint(struct Var *avar, const char *areg, const char *lreg,
                    const char *rreg) {
  pA("if (%s <= %s) {%s = 1;} else {%s = 0;}", lreg, rreg, areg, areg);
}


x86 assembly (clang, -O0):
<__func_le_sint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xec1(%rip),%rdi
call   1030 <pA@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__func_le_sint>:
mov    %rsi,%r8
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
jmp    1030 <pA@plt>

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [39 x i8] c"if (%s <= %s) {%s = 1;} else {%s = 0;}\00"
define void @__func_le_sint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %7
%10 = load i8*, i8** %8
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @pA(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [39 x i8] c"if (%s <= %s) {%s = 1;} else {%s = 0;}\00"
define void @__func_le_sint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %1, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void message5(const char *a, const char *b, const char *c, const char *d,
              const char *e) {
  fprintf(stderr, "%s%s%s%s%s\n", a, b, c, d, e);
}


x86 assembly (clang, -O0):
<message5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x28(%rbp),%rax
lea    0xeb0(%rip),%rsi
mov    %rax,(%rsp)
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<message5>:
push   %rax
mov    %rcx,%r9
mov    %rdx,%rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebc(%rip),%rsi
mov    (%rsi),%edi
mov    %r8,(%rsp)
lea    0xecf(%rip),%rsi
mov    %rax,%r8
call   1030 <fprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"%s%s%s%s%s\0A\00"
define void @message5(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13, i8* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"%s%s%s%s%s\0A\00"
define void @message5(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("-3 mod 2 = %d\n", -3 % 2);
  printf("3 mod 2 = %d\n", 3 % 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"-3 mod 2 = %d\0A\00"
@.str.1 = [14 x i8] c"3 mod 2 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 -1)
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"-3 mod 2 = %d\0A\00"
@.str.1 = [14 x i8] c"3 mod 2 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, float);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float cp, sp;
  scanf("%f %f", &cp, &sp);
  printf("You made: %s of %f Rupees", cp > sp ? "loss" : "profit", sp - cp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xed8(%rip),%rsi
lea    0xecc(%rip),%rax
ucomiss %xmm1,%xmm0
cmova  %rax,%rsi
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm1
movss  (%rsp),%xmm0
ucomiss %xmm0,%xmm1
lea    0xed6(%rip),%rax
lea    0xed4(%rip),%rsi
cmova  %rax,%rsi
subss  %xmm1,%xmm0
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [26 x i8] c"You made: %s of %f Rupees\00"
@.str.2 = [5 x i8] c"loss\00"
@.str.3 = [7 x i8] c"profit\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fcmp ogt float %4, %5
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%9 = load float, float* %2
%10 = load float, float* %1
%11 = fsub float %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %8, float %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [26 x i8] c"You made: %s of %f Rupees\00"
@.str.2 = [5 x i8] c"loss\00"
@.str.3 = [7 x i8] c"profit\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fcmp ogt float %6, %7
%9 = select i1 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%10 = fsub float %7, %6
%11 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %9, float %10)
ret i32 0
}
/* Type definitions */
struct const_Matrix_T {
  int dummy;
};
struct Matrix_T {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_Matrix_T(struct Matrix_T const *);
void print_const_Matrix_T(const struct const_Matrix_T *const a) {
  print_Matrix_T((const struct Matrix_T *)a);
}


x86 assembly (clang, -O0):
<print_const_Matrix_T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <print_Matrix_T@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_const_Matrix_T>:
jmp    1030 <print_Matrix_T@plt>

LLVM IR (-O0):
%struct.const_Matrix_T = type { i32 }
%struct.Matrix_T = type { i32 }
define void @print_const_Matrix_T(%struct.const_Matrix_T* %0) {
%2 = alloca %struct.const_Matrix_T*
store %struct.const_Matrix_T* %0, %struct.const_Matrix_T** %2
%3 = load %struct.const_Matrix_T*, %struct.const_Matrix_T** %2
%4 = bitcast %struct.const_Matrix_T* %3 to %struct.Matrix_T*
%5 = call i32 @print_Matrix_T(%struct.Matrix_T* %4)
ret void
}

LLVM IR (-O2):
%struct.const_Matrix_T = type { i32 }
%struct.Matrix_T = type { i32 }
define void @print_const_Matrix_T(%struct.const_Matrix_T* %0) {
%2 = bitcast %struct.const_Matrix_T* %0 to %struct.Matrix_T*
%3 = tail call i32 @print_Matrix_T(%struct.Matrix_T* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PgUpHook();
int /*<<< orphan*/ StartShowBuf();
void DefPgUpHook() {
  StartShowBuf();
  PgUpHook();
}


x86 assembly (clang, -O0):
<DefPgUpHook>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <StartShowBuf@plt>
mov    $0x0,%al
call   1040 <PgUpHook@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DefPgUpHook>:
push   %rax
xor    %eax,%eax
call   1030 <StartShowBuf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <PgUpHook@plt>

LLVM IR (-O0):
define void @DefPgUpHook() {
%1 = call i32 (...) @StartShowBuf()
%2 = call i32 (...) @PgUpHook()
ret void
}

LLVM IR (-O2):
define void @DefPgUpHook() {
%1 = tail call i32 (...) @StartShowBuf()
%2 = tail call i32 (...) @PgUpHook()
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int /*<<< orphan*/, int, int /*<<< orphan*/);
extern struct SN_env *portuguese_ISO_8859_1_create_env(void) {
  return SN_create_env(0, 3, 0);
}


x86 assembly (clang, -O0):
<portuguese_ISO_8859_1_create_env>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x3,%esi
mov    %edx,%edi
call   1030 <SN_create_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<portuguese_ISO_8859_1_create_env>:
xor    %edi,%edi
mov    $0x3,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @portuguese_ISO_8859_1_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 0, i32 3, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @portuguese_ISO_8859_1_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 0, i32 3, i32 0)
ret %struct.SN_env* %1
}
int stop_counter_cpu(int cpu) { return 0; }


x86 assembly (clang, -O0):
<stop_counter_cpu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_counter_cpu>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @stop_counter_cpu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @stop_counter_cpu(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int dtoi(double const);
double itod(int);
double absd(const double x) {
  return itod(dtoi(x) & ((uint64_t)9223372036854775807ULL));
}


x86 assembly (clang, -O0):
<absd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
and    $0xffffffff,%edi
call   1040 <itod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<absd>:
push   %rax
call   1030 <dtoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <itod@plt>

LLVM IR (-O0):
define double @absd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @dtoi(double %3)
%5 = and i32 %4, -1
%6 = call double @itod(i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @absd(double %0) {
%2 = tail call i32 @dtoi(double %0)
%3 = tail call double @itod(i32 %2)
ret double %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t USBModeGet(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  return ((*((volatile uint8_t *)(ui32Base + 0x00000060))) &
          (0x00000080 | 0x00000004 | 0x00000001 | 0x00000018));
}


x86 assembly (clang, -O0):
<USBModeGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%eax
cltq
mov    (%rax),%eax
and    $0x9d,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBModeGet>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rcx
mov    $0x9d,%eax
and    0x60(%rcx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @USBModeGet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 96
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, 157
ret i32 %12
}

LLVM IR (-O2):
define i32 @USBModeGet(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 96
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 157
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t _uint64(uint64_t x) { return x; }


x86 assembly (clang, -O0):
<_uint64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_uint64>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @_uint64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @_uint64(i32 returned %0) {
ret i32 %0
}
void RTSemRWRequestWrite(void) {}


x86 assembly (clang, -O0):
<RTSemRWRequestWrite>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTSemRWRequestWrite>:
ret

LLVM IR (-O0):
define void @RTSemRWRequestWrite() {
ret void
}

LLVM IR (-O2):
define void @RTSemRWRequestWrite() {
ret void
}
int fun_base_0() { return 0; }


x86 assembly (clang, -O0):
<fun_base_0>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_base_0>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fun_base_0() {
ret i32 0
}

LLVM IR (-O2):
define i32 @fun_base_0() {
ret i32 0
}
/* Variables and functions */
scalar_t__ Char_3d_array(int, int, int);
unsigned char ***Uchar_3d_array(int i_size, int j_size, int k_size) {
  return ((unsigned char ***)Char_3d_array(i_size, j_size,
                                           k_size * sizeof(unsigned char)));
}


x86 assembly (clang, -O0):
<Uchar_3d_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edx
call   1030 <Char_3d_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Uchar_3d_array>:
jmp    1030 <Char_3d_array@plt>

LLVM IR (-O0):
define i8*** @Uchar_3d_array(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 1
%12 = trunc i64 %11 to i32
%13 = call i64 @Char_3d_array(i32 %7, i32 %8, i32 %12)
%14 = inttoptr i64 %13 to i8***
ret i8*** %14
}

LLVM IR (-O2):
define i8*** @Uchar_3d_array(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @Char_3d_array(i32 %0, i32 %1, i32 %2)
%5 = inttoptr i64 %4 to i8***
ret i8*** %5
}
unsigned int charToInt(char x) {
  if (x == 'r') {
    return 1;
  } else if (x == 'b') {
    return 2;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<charToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x72,%eax
jne    1123 <charToInt+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1143 <charToInt+0x43>
movsbl -0x5(%rbp),%eax
cmp    $0x62,%eax
jne    113c <charToInt+0x3c>
movl   $0x2,-0x4(%rbp)
jmp    1143 <charToInt+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charToInt>:
xor    %ecx,%ecx
cmp    $0x62,%dil
sete   %cl
add    %ecx,%ecx
cmp    $0x72,%dil
mov    $0x1,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @charToInt(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 114
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 98
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 2, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @charToInt(i8 signext %0) {
%2 = icmp eq i8 %0, 98
%3 = select i1 %2, i32 2, i32 0
%4 = icmp eq i8 %0, 114
%5 = select i1 %4, i32 1, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x12() {
  Assert_real((isdigit(18) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              95, ("isdigit should be 0 for 0x12"));
}


x86 assembly (clang, -O0):
<t_isdigit_0x12>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x5f,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x12>:
push   %rax
mov    $0x12,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x5f,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x12\00"
define void @t_isdigit_0x12() {
%1 = call i64 @isdigit(i32 18)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 95, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x12\00"
define void @t_isdigit_0x12() {
%1 = tail call i64 @isdigit(i32 18)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 95, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo245() {}


x86 assembly (clang, -O0):
<foo245>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo245>:
ret

LLVM IR (-O0):
define void @foo245() {
ret void
}

LLVM IR (-O2):
define void @foo245() {
ret void
}
extern unsigned long le32dec(const void *buf) {
  const unsigned char *p = (const unsigned char *)buf;
  return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]);
}


x86 assembly (clang, -O0):
<le32dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<le32dec>:
movzbl 0x3(%rdi),%eax
shl    $0x18,%eax
movzbl 0x2(%rdi),%ecx
shl    $0x10,%rcx
cltq
or     %rcx,%rax
movzbl 0x1(%rdi),%ecx
shl    $0x8,%rcx
or     %rax,%rcx
movzbl (%rdi),%eax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @le32dec(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 24
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 2
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 16
%15 = or i32 %9, %14
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = or i32 %15, %20
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = or i32 %21, %25
%27 = sext i32 %26 to i64
ret i64 %27
}

LLVM IR (-O2):
define i64 @le32dec(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw i32 %4, 24
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl nuw nsw i32 %8, 16
%10 = or i32 %9, %5
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = or i32 %10, %14
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
%19 = sext i32 %18 to i64
ret i64 %19
}
int multiple(int int1, int int2) {
  int remainder;
  remainder = int2 % int1;
  if (remainder == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<multiple>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    112a <multiple+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <multiple+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiple>:
mov    %esi,%eax
cltd
idiv   %edi
xor    %eax,%eax
test   %edx,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @multiple(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = srem i32 %7, %8
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @multiple(i32 %0, i32 %1) {
%3 = srem i32 %1, %0
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void __attribute__((cdecl)) ctest3() {}


x86 assembly (clang, -O0):
<ctest3>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctest3>:
ret

LLVM IR (-O0):
define void @ctest3() {
ret void
}

LLVM IR (-O2):
define void @ctest3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *, char *,
                          char *);
void ndb_unix_version_local() {
  static char CompiledWith[] = "Compiled with %s%s for %s%s%s%s.\n\n";
  printf(CompiledWith, "gcc ", "9.4.0", "Unix", "", " on ", "Mar 17 2022");
}


x86 assembly (clang, -O0):
<ndb_unix_version_local>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2f11(%rip),%rdi
lea    0xeda(%rip),%rsi
lea    0xed8(%rip),%rdx
lea    0xed7(%rip),%rcx
lea    0xec9(%rip),%r8
lea    0xece(%rip),%r9
lea    0xecc(%rip),%rax
mov    %rax,(%rsp)
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndb_unix_version_local>:
push   %rax
lea    0xefd(%rip),%rax
mov    %rax,(%rsp)
lea    0x2f0d(%rip),%rdi
lea    0xed6(%rip),%rsi
lea    0xed4(%rip),%rdx
lea    0xed3(%rip),%rcx
lea    0xec5(%rip),%r8
lea    0xeca(%rip),%r9
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@ndb_unix_version_local.CompiledWith = internal global [35 x i8] c"Compiled with %s%s for %s%s%s%s.\0A\0A\00"
@.str = [5 x i8] c"gcc \00"
@.str.1 = [6 x i8] c"9.4.0\00"
@.str.2 = [5 x i8] c"Unix\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [5 x i8] c" on \00"
@.str.5 = [12 x i8] c"Mar 17 2022\00"
define void @ndb_unix_version_local() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @ndb_unix_version_local.CompiledWith, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@ndb_unix_version_local.CompiledWith = internal global [35 x i8] c"Compiled with %s%s for %s%s%s%s.\0A\0A\00"
@.str = [5 x i8] c"gcc \00"
@.str.1 = [6 x i8] c"9.4.0\00"
@.str.2 = [5 x i8] c"Unix\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [5 x i8] c" on \00"
@.str.5 = [12 x i8] c"Mar 17 2022\00"
define void @ndb_unix_version_local() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @ndb_unix_version_local.CompiledWith, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
ret void
}
int test_imm_CBint8_reg(signed char val) {
  return ((val) & (0xCB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CBint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xcb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CBint8_reg>:
test   $0xcb,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_CBint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 203
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_CBint8_reg(i8 signext %0) {
%2 = and i8 %0, -53
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_VERIFY_PARAM;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ x509_verify_param_zero(int /*<<< orphan*/ *);
void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param) {
  x509_verify_param_zero(param);
  free(param);
}


x86 assembly (clang, -O0):
<X509_VERIFY_PARAM_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <x509_verify_param_zero@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_VERIFY_PARAM_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <x509_verify_param_zero@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @X509_VERIFY_PARAM_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @x509_verify_param_zero(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @X509_VERIFY_PARAM_free(i32* %0) {
%2 = tail call i32 @x509_verify_param_zero(i32* %0)
%3 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
char *getenv(char const *);
const char *redo_getenv_str(const char *k, const char *def) {
  const char *v = getenv(k);
  return v ? v : def;
}


x86 assembly (clang, -O0):
<redo_getenv_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1145 <redo_getenv_str+0x35>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    114d <redo_getenv_str+0x3d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redo_getenv_str>:
push   %rbx
mov    %rsi,%rbx
call   1030 <getenv@plt>
test   %rax,%rax
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @redo_getenv_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @getenv(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i8*, i8** %5
br label %14
12: ; preds = %2
%13 = load i8*, i8** %4
br label %14
14: ; preds = %12, %10
%15 = phi i8* [ %11, %10 ], [ %13, %12 ]
ret i8* %15
}

LLVM IR (-O2):
define i8* @redo_getenv_str(i8* nocapture %0, i8* readnone %1) {
%3 = tail call i8* @getenv(i8* %0)
%4 = icmp eq i8* %3, null
%5 = select i1 %4, i8* %1, i8* %3
ret i8* %5
}
double _bin(double t) { return t > 0.0 ? 1.0 : 0.0; }


x86 assembly (clang, -O0):
<_bin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeea(%rip),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bin>:
xorpd  %xmm1,%xmm1
cmpltsd %xmm0,%xmm1
movsd  0xeef(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @_bin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, double 1.000000e+00, double 0.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @_bin(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = select i1 %2, double 1.000000e+00, double 0.000000e+00
ret double %3
}
int field_char_test_func(const unsigned char c) {
  return (c > 0x0 && c < 0x09) || c == 0x0b || c == 0x0c || (c > 0x0e);
}


x86 assembly (clang, -O0):
<field_char_test_func>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jle    1129 <field_char_test_func+0x29>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
jl     115a <field_char_test_func+0x5a>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x2(%rbp)
je     115a <field_char_test_func+0x5a>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x2(%rbp)
je     115a <field_char_test_func+0x5a>
movzbl -0x1(%rbp),%eax
cmp    $0xe,%eax
setg   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<field_char_test_func>:
lea    -0x1(%rdi),%eax
cmp    $0xc,%al
jae    1119 <field_char_test_func+0x19>
movzbl %al,%ecx
mov    $0x1,%eax
mov    $0xcff,%edx
bt     %ecx,%edx
jb     1122 <field_char_test_func+0x22>
xor    %eax,%eax
cmp    $0xf,%dil
setae  %al
ret

LLVM IR (-O0):
define i32 @field_char_test_func(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp slt i32 %8, 9
br i1 %9, label %22, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 11
br i1 %13, label %22, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = zext i8 %15 to i32
%17 = icmp eq i32 %16, 12
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = zext i8 %19 to i32
%21 = icmp sgt i32 %20, 14
br label %22
22: ; preds = %18, %14, %10, %6
%23 = phi i1 [ true, %14 ], [ true, %10 ], [ true, %6 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @field_char_test_func(i8 zeroext %0) {
%2 = add i8 %0, -1
%3 = icmp ult i8 %2, 12
br i1 %3, label %7, label %4
4: ; preds = %7, %1
%5 = icmp ugt i8 %0, 14
%6 = zext i1 %5 to i32
br label %12
7: ; preds = %1
%8 = zext i8 %2 to i16
%9 = lshr i16 3327, %8
%10 = and i16 %9, 1
%11 = icmp eq i16 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %7, %4
%13 = phi i32 [ %6, %4 ], [ 1, %7 ]
ret i32 %13
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void AUXWUCClockFreqReq(uint32_t ui32ClockFreq) {

  ;
  (*((volatile unsigned long *)(0x400C6000 + 0x00000010))) = ui32ClockFreq;
}


x86 assembly (clang, -O0):
<AUXWUCClockFreqReq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400c6010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AUXWUCClockFreqReq>:
mov    %rdi,0x400c6010
40
ret

LLVM IR (-O0):
define void @AUXWUCClockFreqReq(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074552848 to i64*)
ret void
}

LLVM IR (-O2):
define void @AUXWUCClockFreqReq(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074552848 to i64*)
ret void
}
/* Variables and functions */
int mul8bit(int, int);
unsigned char pack_r3g3b2(int r, int g, int b) {
  return ((mul8bit(r, 7) << 5) | (mul8bit(g, 7) << 2) | (mul8bit(b, 3)));
}


x86 assembly (clang, -O0):
<pack_r3g3b2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
call   1030 <mul8bit@plt>
shl    $0x5,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x7,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x3,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_r3g3b2>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    $0x7,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ebx
shl    $0x5,%ebx
mov    %ebp,%edi
mov    $0x7,%esi
call   1030 <mul8bit@plt>
mov    %eax,%ebp
shl    $0x2,%ebp
or     %ebx,%ebp
mov    %r14d,%edi
mov    $0x3,%esi
call   1030 <mul8bit@plt>
or     %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @pack_r3g3b2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @mul8bit(i32 %7, i32 7)
%9 = shl i32 %8, 5
%10 = load i32, i32* %5
%11 = call i32 @mul8bit(i32 %10, i32 7)
%12 = shl i32 %11, 2
%13 = or i32 %9, %12
%14 = load i32, i32* %6
%15 = call i32 @mul8bit(i32 %14, i32 3)
%16 = or i32 %13, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @pack_r3g3b2(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @mul8bit(i32 %0, i32 7)
%5 = shl i32 %4, 5
%6 = tail call i32 @mul8bit(i32 %1, i32 7)
%7 = shl i32 %6, 2
%8 = or i32 %7, %5
%9 = tail call i32 @mul8bit(i32 %2, i32 3)
%10 = or i32 %8, %9
%11 = trunc i32 %10 to i8
ret i8 %11
}
/* Variables and functions */
int /*<<< orphan*/ a8(int);
void a7(int n) { a8(n); }


x86 assembly (clang, -O0):
<a7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <a8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a7>:
jmp    1030 <a8@plt>

LLVM IR (-O0):
define void @a7(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @a8(i32 %3)
ret void
}

LLVM IR (-O2):
define void @a7(i32 %0) {
%2 = tail call i32 @a8(i32 %0)
ret void
}
void yy_2_LinkTitle(char *yytext, int yyleng) {
  ;
  ;
}


x86 assembly (clang, -O0):
<yy_2_LinkTitle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<yy_2_LinkTitle>:
ret

LLVM IR (-O0):
define void @yy_2_LinkTitle(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_2_LinkTitle(i8* nocapture %0, i32 %1) {
ret void
}
unsigned char Diss_GetHexDigitAsChar(unsigned char HexDigit) {
  HexDigit &= 0x0f;
  HexDigit += '0';
  if (HexDigit >= ('0' + 10)) {
    HexDigit += 'A' - '0' - 10;
  }
  return HexDigit;
}


x86 assembly (clang, -O0):
<Diss_GetHexDigitAsChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x3a,%eax
jl     1135 <Diss_GetHexDigitAsChar+0x35>
movzbl -0x1(%rbp),%eax
add    $0x7,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Diss_GetHexDigitAsChar>:
and    $0xf,%dil
lea    0x30(%rdi),%eax
add    $0x37,%dil
cmp    $0x3a,%al
movzbl %dil,%ecx
movzbl %al,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @Diss_GetHexDigitAsChar(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 15
%6 = trunc i32 %5 to i8
store i8 %6, i8* %2
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = add nsw i32 %8, 48
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = icmp sge i32 %12, 58
br i1 %13, label %14, label %19
14: ; preds = %1
%15 = load i8, i8* %2
%16 = zext i8 %15 to i32
%17 = add nsw i32 %16, 7
%18 = trunc i32 %17 to i8
store i8 %18, i8* %2
br label %19
19: ; preds = %14, %1
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define zeroext i8 @Diss_GetHexDigitAsChar(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = or i8 %2, 48
%4 = icmp ugt i8 %3, 57
%5 = add nuw nsw i8 %2, 55
%6 = select i1 %4, i8 %5, i8 %3
ret i8 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
scalar_t__ isupper(int);
int tolower_l(int c, locale_t locale) {
  if (isupper(c)) {
    return c - 'A' + 'a';
  }
  return c;
}


x86 assembly (clang, -O0):
<tolower_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     1141 <tolower_l+0x31>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <tolower_l+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower_l>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower_l(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = call i64 @isupper(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 65
%12 = add nsw i32 %11, 97
store i32 %12, i32* %3
br label %15
13: ; preds = %2
%14 = load i32, i32* %4
store i32 %14, i32* %3
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @tolower_l(i32 %0, i32 %1) {
%3 = tail call i64 @isupper(i32 %0)
%4 = icmp eq i64 %3, 0
%5 = add nsw i32 %0, 32
%6 = select i1 %4, i32 %0, i32 %5
ret i32 %6
}