int parse_tca_u32_link(char *msg, char **mp, struct rtattr *u32) {
  char handle[128] = "";
  if (RTA_PAYLOAD(u32) < sizeof(unsigned)) {
    rec_log("error: %s: payload too short", __func__);
    return (1);
  }
  parse_u32_handle(handle, sizeof(handle), *(unsigned *)RTA_DATA(u32));
  *mp = add_log(msg, *mp, "link=%s ", handle);
  return (0);
}


x86 assembly (clang, -O0):
<parse_tca_u32_link>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <memset@plt>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <RTA_PAYLOAD@plt>
cltq
cmp    $0x4,%rax
jae    11c2 <parse_tca_u32_link+0x62>
lea    0xe58(%rip),%rdi
lea    0xe6e(%rip),%rsi
mov    $0x0,%al
call   1070 <rec_log@plt>
movl   $0x1,-0x4(%rbp)
jmp    1223 <parse_tca_u32_link+0xc3>
lea    -0xa0(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1060 <RTA_DATA@plt>
mov    -0xa8(%rbp),%rdi
cltq
mov    (%rax),%edx
mov    $0x80,%esi
mov    $0x0,%al
call   1040 <parse_u32_handle@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
lea    -0xa0(%rbp),%rcx
lea    0xe25(%rip),%rdx
mov    $0x0,%al
call   1080 <add_log@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_tca_u32_link>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
xor    %ebp,%ebp
mov    %rdx,%rdi
xor    %eax,%eax
call   1030 <RTA_PAYLOAD@plt>
cmp    $0x3,%eax
ja     11bd <parse_tca_u32_link+0x6d>
lea    0xe58(%rip),%rdi
lea    0xe6e(%rip),%rsi
xor    %eax,%eax
call   1060 <rec_log@plt>
mov    $0x1,%ebp
jmp    11f9 <parse_tca_u32_link+0xa9>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <RTA_DATA@plt>
cltq
mov    (%rax),%edx
mov    %rsp,%rbx
mov    $0x80,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <parse_u32_handle@plt>
mov    (%r15),%rsi
lea    0xe49(%rip),%rdx
mov    %r14,%rdi
mov    %rbx,%rcx
xor    %eax,%eax
call   1070 <add_log@plt>
cltq
mov    %rax,(%r15)
mov    %ebp,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.rtattr = type opaque
@.str = [29 x i8] c"error: %s: payload too short\00"
@__func__.parse_tca_u32_link = [19 x i8] c"parse_tca_u32_link\00"
@.str.1 = [9 x i8] c"link=%s \00"
define i32 @parse_tca_u32_link(i8* %0, i8** %1, %struct.rtattr* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca %struct.rtattr*
%8 = alloca [128 x i8]
store i8* %0, i8** %5
store i8** %1, i8*** %6
store %struct.rtattr* %2, %struct.rtattr** %7
%9 = bitcast [128 x i8]* %8 to i8*
%10 = load %struct.rtattr*, %struct.rtattr** %7
%11 = call i32 (%struct.rtattr*, ...) bitcast (i32 (...)* @RTA_PAYLOAD to i32 (%struct.rtattr*, ...)*)(%struct.rtattr* %10)
%12 = sext i32 %11 to i64
%13 = icmp ult i64 %12, 4
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @rec_log to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.parse_tca_u32_link, i64 0, i64 0))
store i32 1, i32* %4
br label %32
16: ; preds = %3
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 0
%18 = load %struct.rtattr*, %struct.rtattr** %7
%19 = call i32 (%struct.rtattr*, ...) bitcast (i32 (...)* @RTA_DATA to i32 (%struct.rtattr*, ...)*)(%struct.rtattr* %18)
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load i32, i32* %21
%23 = call i32 (i8*, i64, i32, ...) bitcast (i32 (...)* @parse_u32_handle to i32 (i8*, i64, i32, ...)*)(i8* %17, i64 128, i32 %22)
%24 = load i8*, i8** %5
%25 = load i8**, i8*** %6
%26 = load i8*, i8** %25
%27 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 0
%28 = call i32 (i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @add_log to i32 (i8*, i8*, i8*, i8*, ...)*)(i8* %24, i8* %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %27)
%29 = sext i32 %28 to i64
%30 = inttoptr i64 %29 to i8*
%31 = load i8**, i8*** %6
store i8* %30, i8** %31
store i32 0, i32* %4
br label %32
32: ; preds = %16, %14
%33 = load i32, i32* %4
ret i32 %33
}

LLVM IR (-O2):
%struct.rtattr = type opaque
@.str = [29 x i8] c"error: %s: payload too short\00"
@__func__.parse_tca_u32_link = [19 x i8] c"parse_tca_u32_link\00"
@.str.1 = [9 x i8] c"link=%s \00"
define i32 @parse_tca_u32_link(i8* %0, i8** nocapture %1, %struct.rtattr* %2) {
%4 = alloca [128 x i8]
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%6 = tail call i32 (%struct.rtattr*, ...) bitcast (i32 (...)* @RTA_PAYLOAD to i32 (%struct.rtattr*, ...)*)(%struct.rtattr* %2)
%7 = icmp ult i32 %6, 4
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @rec_log to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.parse_tca_u32_link, i64 0, i64 0))
br label %20
10: ; preds = %3
%11 = tail call i32 (%struct.rtattr*, ...) bitcast (i32 (...)* @RTA_DATA to i32 (%struct.rtattr*, ...)*)(%struct.rtattr* %2)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load i32, i32* %13
%15 = call i32 (i8*, i64, i32, ...) bitcast (i32 (...)* @parse_u32_handle to i32 (i8*, i64, i32, ...)*)(i8* %5, i64 128, i32 %14)
%16 = load i8*, i8** %1
%17 = call i32 (i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @add_log to i32 (i8*, i8*, i8*, i8*, ...)*)(i8* %0, i8* %16, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
store i8* %19, i8** %1
br label %20
20: ; preds = %10, %8
%21 = phi i32 [ 1, %8 ], [ 0, %10 ]
ret i32 %21
}