xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ msgqueue_sendstring(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int, int);
void DrawPixel(int x, int y, int r, int g, int b) {
  static char buffer[56];
  sprintf(buffer, "5 %d %d %d %d %d", x, y, r, g, b);
  msgqueue_sendstring(buffer);
  return;
}


x86 assembly (clang, -O0):
<DrawPixel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0x14(%rbp),%eax
lea    0x2ef0(%rip),%rdi
lea    0xea9(%rip),%rsi
mov    %eax,(%rsp)
call   1040 <sprintf@plt>
lea    0x2eda(%rip),%rdi
call   1030 <msgqueue_sendstring@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawPixel>:
push   %rbx
sub    $0x10,%rsp
mov    %ecx,%r9d
mov    %edx,%eax
mov    %esi,%ecx
mov    %edi,%edx
mov    %r8d,(%rsp)
lea    0x2f07(%rip),%rbx
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%r8d
call   1040 <sprintf@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <msgqueue_sendstring@plt>

LLVM IR (-O0):
@DrawPixel.buffer = internal global [56 x i8] zeroinitializer
@.str = [17 x i8] c"5 %d %d %d %d %d\00"
define void @DrawPixel(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @sprintf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @DrawPixel.buffer, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
%17 = call i32 @msgqueue_sendstring(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @DrawPixel.buffer, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@DrawPixel.buffer = internal global [56 x i8] zeroinitializer
@.str = [17 x i8] c"5 %d %d %d %d %d\00"
define void @DrawPixel(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @DrawPixel.buffer, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
%7 = tail call i32 @msgqueue_sendstring(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @DrawPixel.buffer, i64 0, i64 0))
ret void
}
float fahr_to_celsius(float fahr) {
  float celsius;
  celsius = (5.0 / 9.0) * (fahr - 32.0);
  return celsius;
}


x86 assembly (clang, -O0):
<fahr_to_celsius>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahr_to_celsius>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @fahr_to_celsius(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 0x3FE1C71C71C71C72, %6
%8 = fptrunc double %7 to float
store float %8, float* %3
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
define float @fahr_to_celsius(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ cstrncat(char *, char *, int);
int main() {
  char *s1;
  char *s2;
  int n = __VERIFIER_nondet_int();
  cstrncat(s1, s2, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <cstrncat@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%edx
call   1030 <cstrncat@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %4
%6 = load i8*, i8** %2
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @cstrncat(i8* %6, i8* %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @cstrncat(i8* undef, i8* undef, i32 %1)
ret i32 0
}
int poll_BaseScreen(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @poll_BaseScreen() {
ret i32 0
}
/* Variables and functions */
int testExe2Func();
int testExe2lib();
int imp_mod1() { return testExe2Func() + testExe2lib(); }


x86 assembly (clang, -O0):
<imp_mod1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <testExe2Func@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <testExe2lib@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imp_mod1>:
push   %rbx
xor    %eax,%eax
call   1030 <testExe2Func@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <testExe2lib@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @imp_mod1() {
%1 = call i32 (...) @testExe2Func()
%2 = call i32 (...) @testExe2lib()
%3 = add nsw i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @imp_mod1() {
%1 = tail call i32 (...) @testExe2Func()
%2 = tail call i32 (...) @testExe2lib()
%3 = add nsw i32 %2, %1
ret i32 %3
}
void foo567(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo567(i32 %0) {
ret void
}
/* Variables and functions */
long snprintf(int /*<<< orphan*/ *, int /*<<< orphan*/, char *, long);
long abstract_text___Int_int_to_s_len___impl(long self) {
  return snprintf(NULL, 0, "%ld", self);
}


x86 assembly (clang, -O0):
<abstract_text___Int_int_to_s_len___impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
lea    0xed3(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abstract_text___Int_int_to_s_len___impl>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define i64 @abstract_text___Int_int_to_s_len___impl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i64 %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i64 @abstract_text___Int_int_to_s_len___impl(i64 %0) {
%2 = tail call i64 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ mapif_delete_pet_ack(int, int /*<<< orphan*/);
int /*<<< orphan*/ petdb_sql_delete(int);
int mapif_delete_pet(int fd, int pet_id) {
  mapif_delete_pet_ack(fd, petdb_sql_delete(pet_id));
  return 0;
}


x86 assembly (clang, -O0):
<mapif_delete_pet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <petdb_sql_delete@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <mapif_delete_pet_ack@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapif_delete_pet>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <petdb_sql_delete@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <mapif_delete_pet_ack@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mapif_delete_pet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @petdb_sql_delete(i32 %6)
%8 = call i32 @mapif_delete_pet_ack(i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @mapif_delete_pet(i32 %0, i32 %1) {
%3 = tail call i32 @petdb_sql_delete(i32 %1)
%4 = tail call i32 @mapif_delete_pet_ack(i32 %0, i32 %3)
ret i32 0
}
int test_imm_24int16_reg(short val) {
  return ((val) & (-0x24 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_24int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -36
%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_24int16_reg(i16 signext %0) {
%2 = and i16 %0, -36
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void first_Abs2Conc(_loc, _Base_Abs2Conc) int *_loc, *_Base_Abs2Conc;
{ Abs2Conc_FIRST_FNC_OBJ(_loc, _Base_Abs2Conc); }


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

x86 assembly (clang, -O2):
<first_Abs2Conc>:
xor    %eax,%eax
jmp    1030 <Abs2Conc_FIRST_FNC_OBJ@plt>

LLVM IR (-O0):
define void @first_Abs2Conc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @Abs2Conc_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @first_Abs2Conc(i32* %0, i32* %1) {
%3 = tail call i32 (i32*, i32*, ...) bitcast (i32 (...)* @Abs2Conc_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %0, i32* %1)
ret void
}
int COORD_XY(int x, int y) { return x + (y << 4); }


x86 assembly (clang, -O0):
<COORD_XY>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<COORD_XY>:
shl    $0x4,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @COORD_XY(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %6, 4
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @COORD_XY(i32 %0, i32 %1) {
%3 = shl i32 %1, 4
%4 = add nsw i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void send_back_noexist() { error("%%%%stat;not_exist=1;\n"); }


x86 assembly (clang, -O0):
<send_back_noexist>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_back_noexist>:
lea    0xee9(%rip),%rdi
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"%%%%stat;not_exist=1;\0A\00"
define void @send_back_noexist() {
%1 = call i32 @error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%%%%stat;not_exist=1;\0A\00"
define void @send_back_noexist() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *BTSHASP_ParseTokenBasicAltn(char *, char *);
char *btshas_rstrdup(char *);
char *BTSHASP_ParseTokenAlt(char *cs, char **rstr) {
  char tb[256];
  cs = BTSHASP_ParseTokenBasicAltn(cs, tb);
  *rstr = btshas_rstrdup(tb);
  return (cs);
}


x86 assembly (clang, -O0):
<BTSHASP_ParseTokenAlt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1030 <BTSHASP_ParseTokenBasicAltn@plt>
mov    %rax,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
call   1040 <btshas_rstrdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BTSHASP_ParseTokenAlt>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%r15
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <BTSHASP_ParseTokenBasicAltn@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <btshas_rstrdup@plt>
mov    %rax,(%r15)
mov    %rbx,%rax
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @BTSHASP_ParseTokenAlt(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%8 = call i8* @BTSHASP_ParseTokenBasicAltn(i8* %6, i8* %7)
store i8* %8, i8** %3
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%10 = call i8* @btshas_rstrdup(i8* %9)
%11 = load i8**, i8*** %4
store i8* %10, i8** %11
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @BTSHASP_ParseTokenAlt(i8* %0, i8** nocapture writeonly %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i8* @BTSHASP_ParseTokenBasicAltn(i8* %0, i8* %4)
%6 = call i8* @btshas_rstrdup(i8* %4)
store i8* %6, i8** %1
ret i8* %5
}
void _set_tp(void *tp) {}


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

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

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

LLVM IR (-O2):
define void @_set_tp(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endpoint();
void endpoi_() { endpoint(); }


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

x86 assembly (clang, -O2):
<endpoi_>:
xor    %eax,%eax
jmp    1030 <endpoint@plt>

LLVM IR (-O0):
define void @endpoi_() {
%1 = call i32 (...) @endpoint()
ret void
}

LLVM IR (-O2):
define void @endpoi_() {
%1 = tail call i32 (...) @endpoint()
ret void
}
/* Variables and functions */
int wl_iovar_get(char *, char *, int *, int);
int wl_iovar_getint(char *ifname, char *iovar, int *val) {
  return wl_iovar_get(ifname, iovar, val, sizeof(int));
}


x86 assembly (clang, -O0):
<wl_iovar_getint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x4,%ecx
call   1030 <wl_iovar_get@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_iovar_getint>:
mov    $0x4,%ecx
jmp    1030 <wl_iovar_get@plt>

LLVM IR (-O0):
define i32 @wl_iovar_getint(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32*, i32** %6
%10 = call i32 @wl_iovar_get(i8* %7, i8* %8, i32* %9, i32 4)
ret i32 %10
}

LLVM IR (-O2):
define i32 @wl_iovar_getint(i8* %0, i8* %1, i32* %2) {
%4 = tail call i32 @wl_iovar_get(i8* %0, i8* %1, i32* %2, i32 4)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __vlink_init();
int /*<<< orphan*/ putCMD(unsigned char);
void putCMD_init(unsigned char c) {
  __vlink_init();
  putCMD(c);
}


x86 assembly (clang, -O0):
<putCMD_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <__vlink_init@plt>
movzbl -0x1(%rbp),%edi
call   1040 <putCMD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putCMD_init>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <__vlink_init@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <putCMD@plt>

LLVM IR (-O0):
define void @putCMD_init(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @__vlink_init()
%4 = load i8, i8* %2
%5 = call i32 @putCMD(i8 zeroext %4)
ret void
}

LLVM IR (-O2):
define void @putCMD_init(i8 zeroext %0) {
%2 = tail call i32 (...) @__vlink_init()
%3 = tail call i32 @putCMD(i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DebugBreak();
void debugstr(const char *text) { DebugBreak(); }


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

x86 assembly (clang, -O2):
<debugstr>:
xor    %eax,%eax
jmp    1030 <DebugBreak@plt>

LLVM IR (-O0):
define void @debugstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @DebugBreak()
ret void
}

LLVM IR (-O2):
define void @debugstr(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @DebugBreak()
ret void
}
void av_samples_set_silence() {}


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

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

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

LLVM IR (-O2):
define void @av_samples_set_silence() {
ret void
}
unsigned int perfctr_cstatus_nrctrs(unsigned int cstatus) {
  return ((cstatus >> 8) & 0x7F);
}


x86 assembly (clang, -O0):
<perfctr_cstatus_nrctrs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0x7f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<perfctr_cstatus_nrctrs>:
mov    %edi,%eax
shr    $0x8,%eax
and    $0x7f,%eax
ret

LLVM IR (-O0):
define i32 @perfctr_cstatus_nrctrs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 8
%5 = and i32 %4, 127
ret i32 %5
}

LLVM IR (-O2):
define i32 @perfctr_cstatus_nrctrs(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 127
ret i32 %3
}
/* Variables and functions */
int ENOSYS;
int cl_usb_hub_init(int gpio, const char *label) { return -ENOSYS; }


x86 assembly (clang, -O0):
<cl_usb_hub_init>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ed4(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl_usb_hub_init>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @cl_usb_hub_init(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @cl_usb_hub_init(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ convmaiuscula(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char palavra[11];
  printf("Digite uma palavra: ");
  scanf("%s10", palavra);
  convmaiuscula(palavra);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    -0xb(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xb(%rbp),%rdi
call   1040 <convmaiuscula@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x5(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <convmaiuscula@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Digite uma palavra: \00"
@.str.1 = [5 x i8] c"%s10\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%6 = call i32 @convmaiuscula(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Digite uma palavra: \00"
@.str.1 = [5 x i8] c"%s10\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @convmaiuscula(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int nl_sendgetlink_do(int, int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/);
int nl_sendgetlinks(int fd, uint32_t seq) {
  return nl_sendgetlink_do(fd, seq, 0, 0);
}


x86 assembly (clang, -O0):
<nl_sendgetlinks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <nl_sendgetlink_do@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nl_sendgetlinks>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <nl_sendgetlink_do@plt>

LLVM IR (-O0):
define i32 @nl_sendgetlinks(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @nl_sendgetlink_do(i32 %5, i32 %6, i32 0, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @nl_sendgetlinks(i32 %0, i32 %1) {
%3 = tail call i32 @nl_sendgetlink_do(i32 %0, i32 %1, i32 0, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printify(char *, ...);
void hr() {
  int i;
  for (i = 0; i < 76; ++i)
    printify("%s", "\u2500");
  printify("\n");
}


x86 assembly (clang, -O0):
<hr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x4c,-0x4(%rbp)
jge    114c <hr+0x3c>
lea    0xed0(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <printify@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <hr+0xf>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printify@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hr>:
push   %rbp
push   %r14
push   %rbx
mov    $0x4c,%ebp
lea    0xee0(%rip),%r14
lea    0xedc(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printify@plt>
add    $0xffffffff,%ebp
jne    1130 <hr+0x20>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printify@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"\E2\94\80\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @hr() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 76
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 (i8*, ...) @printify(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = call i32 (i8*, ...) @printify(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"\E2\94\80\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @hr() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (i8*, ...) @printify(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 76
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printify(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ch_storage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ch_storage *);
struct ch_storage *raw_ch_data(struct ch_storage *);
void raw_ch_free(struct ch_storage *chns) {
  free(raw_ch_data(chns));
  free(chns);
}


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

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

LLVM IR (-O0):
%struct.ch_storage = type { i32 }
define void @raw_ch_free(%struct.ch_storage* %0) {
%2 = alloca %struct.ch_storage*
store %struct.ch_storage* %0, %struct.ch_storage** %2
%3 = load %struct.ch_storage*, %struct.ch_storage** %2
%4 = call %struct.ch_storage* @raw_ch_data(%struct.ch_storage* %3)
%5 = call i32 @free(%struct.ch_storage* %4)
%6 = load %struct.ch_storage*, %struct.ch_storage** %2
%7 = call i32 @free(%struct.ch_storage* %6)
ret void
}

LLVM IR (-O2):
%struct.ch_storage = type { i32 }
define void @raw_ch_free(%struct.ch_storage* %0) {
%2 = tail call %struct.ch_storage* @raw_ch_data(%struct.ch_storage* %0)
%3 = tail call i32 @free(%struct.ch_storage* %2)
%4 = tail call i32 @free(%struct.ch_storage* %0)
ret void
}
int test_imm_17uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x17 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_17uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x17,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_17uint64_highword_reg>:
movabs $0x1700000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_17uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 23
%6 = icmp ne i64 %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_17uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 98784247808
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ strchr(char const *, int);
int RA_is_member(const char *chargroup, char c) {
  if (strchr(chargroup, (int)c))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<RA_is_member>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1145 <RA_is_member+0x35>
movl   $0x1,-0x4(%rbp)
jmp    114c <RA_is_member+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RA_is_member>:
push   %rax
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @RA_is_member(i8* %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = tail call i64 @strchr(i8* %0, i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int hpsa_get_linkerrors(struct sas_phy *phy) { return 0; }


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

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

LLVM IR (-O0):
%struct.sas_phy = type opaque
define i32 @hpsa_get_linkerrors(%struct.sas_phy* %0) {
%2 = alloca %struct.sas_phy*
store %struct.sas_phy* %0, %struct.sas_phy** %2
ret i32 0
}

LLVM IR (-O2):
%struct.sas_phy = type opaque
define i32 @hpsa_get_linkerrors(%struct.sas_phy* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
void *test_ptr_alloc_align(int);
void *align15() { return test_ptr_alloc_align(15); }


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

x86 assembly (clang, -O2):
<align15>:
mov    $0xf,%edi
jmp    1030 <test_ptr_alloc_align@plt>

LLVM IR (-O0):
define i8* @align15() {
%1 = call i8* @test_ptr_alloc_align(i32 15)
ret i8* %1
}

LLVM IR (-O2):
define i8* @align15() {
%1 = tail call i8* @test_ptr_alloc_align(i32 15)
ret i8* %1
}
char *hash_plugin_detailed(void) {
  return ("mssql-2000 - Microsoft SQL Server 2000 plugin\n"
          "------------------------\n"
          "Use this module to crack MS-SQL 2000 pwdencrypt() hashes\n"
          "Input should be in form: \'user:hash\' or just \'hash\'\n"
          "Known software that uses this password hashing method:\n"
          "Microsoft SQL Server 2000\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


x86 assembly (clang, -O0):
<hash_plugin_detailed>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_detailed>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [307 x i8] c"mssql-2000 - Microsoft SQL Server 2000 plugin\0A------------------------\0AUse this module to crack MS-SQL 2000 pwdencrypt() hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AMicrosoft SQL Server 2000\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [307 x i8] c"mssql-2000 - Microsoft SQL Server 2000 plugin\0A------------------------\0AUse this module to crack MS-SQL 2000 pwdencrypt() hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AMicrosoft SQL Server 2000\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ echo(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sum(int);
main() { echo("*** ", sum(100)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x64,%edi
call   1040 <sum@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <echo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1040 <sum@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <echo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"*** \00"
define i32 @main() {
%1 = call i32 @sum(i32 100)
%2 = call i32 @echo(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"*** \00"
define i32 @main() {
%1 = tail call i32 @sum(i32 100)
%2 = tail call i32 @echo(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
char *strtok(int /*<<< orphan*/ *, char *);
int strtol(char *, int /*<<< orphan*/ *, int);
int getparam(void) {
  char *param;
  param = strtok(NULL, " ");
  if (!param)
    return -1;
  return strtol(param, NULL, 10);
}


x86 assembly (clang, -O0):
<getparam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
lea    0xecd(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1153 <getparam+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <getparam+0x48>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getparam>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edi,%edi
call   1040 <strtok@plt>
test   %rax,%rax
je     1144 <getparam+0x24>
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xa,%edx
pop    %rax
jmp    1030 <strtol@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define i32 @getparam() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %0
store i32 -1, i32* %1
br label %10
7: ; preds = %0
%8 = load i8*, i8** %2
%9 = call i32 @strtol(i8* %8, i32* null, i32 10)
store i32 %9, i32* %1
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define i32 @getparam() {
%1 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @strtol(i8* nocapture %1, i32* null, i32 10)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ -1, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void myexit(void) { exit(1); }


x86 assembly (clang, -O0):
<myexit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<myexit>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @myexit() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @myexit() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
void show_read_res(int r, char c) {
  if (r > 0)
    printf("read(%d): 0x%x\n", r, c);
  else
    printf("read(%d)\n", r);
}


x86 assembly (clang, -O0):
<show_read_res>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1145 <show_read_res+0x35>
mov    -0x4(%rbp),%esi
movsbl -0x5(%rbp),%edx
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1156 <show_read_res+0x46>
mov    -0x4(%rbp),%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_read_res>:
mov    %edi,%eax
test   %edi,%edi
jle    112a <show_read_res+0x1a>
movsbl %sil,%edx
lea    0xedf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"read(%d): 0x%x\0A\00"
@.str.1 = [10 x i8] c"read(%d)\0A\00"
define void @show_read_res(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
br label %15
12: ; preds = %2
%13 = load i32, i32* %3
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %12, %7
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"read(%d): 0x%x\0A\00"
@.str.1 = [10 x i8] c"read(%d)\0A\00"
define void @show_read_res(i32 %0, i8 signext %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = sext i8 %1 to i32
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %5)
br label %9
7: ; preds = %2
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %9
9: ; preds = %7, %4
ret void
}
void __set_iter_shift(struct radix_tree_iter *iter, unsigned int shift) {}


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

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

LLVM IR (-O0):
%struct.radix_tree_iter = type opaque
define void @__set_iter_shift(%struct.radix_tree_iter* %0, i32 %1) {
%3 = alloca %struct.radix_tree_iter*
%4 = alloca i32
store %struct.radix_tree_iter* %0, %struct.radix_tree_iter** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.radix_tree_iter = type opaque
define void @__set_iter_shift(%struct.radix_tree_iter* nocapture %0, i32 %1) {
ret void
}
int differ(const void *a, const void *b) { return a != b; }


x86 assembly (clang, -O0):
<differ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<differ>:
xor    %eax,%eax
cmp    %rsi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @differ(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 = icmp ne i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @differ(i8* readnone %0, i8* readnone %1) {
%3 = icmp ne i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void hdl(int signo) {}


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

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

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

LLVM IR (-O2):
define void @hdl(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void mouse_init(void) { outb(0xffe1, (1 << 7)); }


x86 assembly (clang, -O0):
<mouse_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffe1,%edi
mov    $0x80,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mouse_init>:
mov    $0xffe1,%edi
mov    $0x80,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @mouse_init() {
%1 = call i32 @outb(i32 65505, i32 128)
ret void
}

LLVM IR (-O2):
define void @mouse_init() {
%1 = tail call i32 @outb(i32 65505, i32 128)
ret void
}
int armthumb_length(unsigned int ins) {
  if ((ins & ((14 << 12) | (8 << 8) | (0 << 4) | (0))) ==
      ((14 << 12) | (0 << 8) | (0 << 4) | (0)))
    if (ins & ((1 << 12) | (8 << 8) | (0 << 4) | (0)))
      return 4;
  return 2;
}


x86 assembly (clang, -O0):
<armthumb_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xe800,%eax
cmp    $0xe000,%eax
jne    113c <armthumb_length+0x3c>
mov    -0x8(%rbp),%eax
and    $0x1800,%eax
cmp    $0x0,%eax
je     1137 <armthumb_length+0x37>
movl   $0x4,-0x4(%rbp)
jmp    1143 <armthumb_length+0x43>
jmp    113c <armthumb_length+0x3c>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<armthumb_length>:
and    $0xf800,%edi
xor    %eax,%eax
cmp    $0xf000,%edi
sete   %al
add    %eax,%eax
add    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @armthumb_length(i32 %0) {
%2 = and i32 %0, 63488
%3 = icmp eq i32 %2, 61440
%4 = select i1 %3, i32 4, i32 2
ret i32 %4
}
int fun_03(char *x) { return x[0] + x[1]; }


x86 assembly (clang, -O0):
<fun_03>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_03>:
movsbl (%rdi),%ecx
movsbl 0x1(%rdi),%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fun_03(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = add nsw i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @fun_03(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void fistp_m64(unsigned long long int *m64) {
  put8(0xDF);
  put8(0x3D);
  put32((unsigned long)(m64));
}


x86 assembly (clang, -O0):
<fistp_m64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xdf,%edi
call   1030 <put8@plt>
mov    $0x3d,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fistp_m64>:
push   %rbx
mov    %rdi,%rbx
mov    $0xdf,%edi
call   1030 <put8@plt>
mov    $0x3d,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @fistp_m64(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i32 @put8(i32 223)
%4 = call i32 @put8(i32 61)
%5 = load i64*, i64** %2
%6 = ptrtoint i64* %5 to i64
%7 = call i32 @put32(i64 %6)
ret void
}

LLVM IR (-O2):
define void @fistp_m64(i64* %0) {
%2 = tail call i32 @put8(i32 223)
%3 = tail call i32 @put8(i32 61)
%4 = ptrtoint i64* %0 to i64
%5 = tail call i32 @put32(i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_src(char *);
void sqrt_handler(void) { write_src("PUSH(sqrt(POP()));\n"); }


x86 assembly (clang, -O0):
<sqrt_handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <write_src@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt_handler>:
lea    0xee9(%rip),%rdi
jmp    1030 <write_src@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"PUSH(sqrt(POP()));\0A\00"
define void @sqrt_handler() {
%1 = call i32 @write_src(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"PUSH(sqrt(POP()));\0A\00"
define void @sqrt_handler() {
%1 = tail call i32 @write_src(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
int main() {
  signed char i;
  unsigned char j;
  i = 255;
  j = 255;
  printf("i的值是%hhd \n", i);
  printf("j的值是%hhu \n", j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0xff,-0x1(%rbp)
movb   $0xff,-0x2(%rbp)
lea    0xed9(%rip),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
movzbl -0x2(%rbp),%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    $0xff,%esi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"i\E7\9A\84\E5\80\BC\E6\98\AF%hhd \0A\00"
@.str.1 = [17 x i8] c"j\E7\9A\84\E5\80\BC\E6\98\AF%hhu \0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
store i8 -1, i8* %1
store i8 -1, i8* %2
%3 = load i8, i8* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 zeroext %3)
%5 = load i8, i8* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"i\E7\9A\84\E5\80\BC\E6\98\AF%hhd \0A\00"
@.str.1 = [17 x i8] c"j\E7\9A\84\E5\80\BC\E6\98\AF%hhu \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 zeroext -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8 zeroext -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void wc_help(int err) {
  fprintf(stderr, "-h help\n-l lines\n-w words\n-c chars\n");
  exit(err);
}


x86 assembly (clang, -O0):
<wc_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<wc_help>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"-h help\0A-l lines\0A-w words\0A-c chars\0A\00"
define void @wc_help(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"-h help\0A-l lines\0A-w words\0A-c chars\0A\00"
define void @wc_help(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}