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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
char *getenv_nonull(char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *, char *,
                          char *, char *, char *, char *);
void process_udhcpc_callback(int argc, char *argv[]) {
  printf("%s,%s,%s,%s,%s,%s,%s,%s,%s\n", argv[1], getenv_nonull("interface"),
         getenv_nonull("ip"), getenv_nonull("broadcast"),
         getenv_nonull("subnet"), getenv_nonull("router"),
         getenv_nonull("domain"), getenv_nonull("dns"),
         getenv_nonull("message"));
}


x86 assembly (clang, -O0):
<process_udhcpc_callback>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x68,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x50(%rbp)
lea    0xed9(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,-0x48(%rbp)
lea    0xed3(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,-0x40(%rbp)
lea    0xec6(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,-0x38(%rbp)
lea    0xec0(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,-0x30(%rbp)
lea    0xeb7(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,%rbx
lea    0xeaf(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,-0x28(%rbp)
lea    0xea6(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,-0x20(%rbp)
lea    0xe9a(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    -0x28(%rbp),%r11
mov    -0x20(%rbp),%r10
lea    0xe26(%rip),%rdi
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <printf@plt>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_udhcpc_callback>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x8(%rsi),%rax
mov    %rax,0x10(%rsp)
lea    0xede(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,0x8(%rsp)
lea    0xed7(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,%r12
lea    0xecb(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,%r13
lea    0xec6(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,%rbp
lea    0xebe(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,%rbx
lea    0xeb6(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,%r14
lea    0xeae(%rip),%rdi
call   1040 <getenv_nonull@plt>
mov    %rax,%r15
lea    0xea3(%rip),%rdi
call   1040 <getenv_nonull@plt>
lea    0xe4b(%rip),%rdi
mov    0x10(%rsp),%rsi
mov    0x8(%rsp),%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
push   %rax
push   %r15
push   %r14
push   %rbx
call   1030 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"%s,%s,%s,%s,%s,%s,%s,%s,%s\0A\00"
@.str.1 = [10 x i8] c"interface\00"
@.str.2 = [3 x i8] c"ip\00"
@.str.3 = [10 x i8] c"broadcast\00"
@.str.4 = [7 x i8] c"subnet\00"
@.str.5 = [7 x i8] c"router\00"
@.str.6 = [7 x i8] c"domain\00"
@.str.7 = [4 x i8] c"dns\00"
@.str.8 = [8 x i8] c"message\00"
define void @process_udhcpc_callback(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i8* @getenv_nonull(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%9 = call i8* @getenv_nonull(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%10 = call i8* @getenv_nonull(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%11 = call i8* @getenv_nonull(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%12 = call i8* @getenv_nonull(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%13 = call i8* @getenv_nonull(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%14 = call i8* @getenv_nonull(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%15 = call i8* @getenv_nonull(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9, i8* %10, i8* %11, i8* %12, i8* %13, i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"%s,%s,%s,%s,%s,%s,%s,%s,%s\0A\00"
@.str.1 = [10 x i8] c"interface\00"
@.str.2 = [3 x i8] c"ip\00"
@.str.3 = [10 x i8] c"broadcast\00"
@.str.4 = [7 x i8] c"subnet\00"
@.str.5 = [7 x i8] c"router\00"
@.str.6 = [7 x i8] c"domain\00"
@.str.7 = [4 x i8] c"dns\00"
@.str.8 = [8 x i8] c"message\00"
define void @process_udhcpc_callback(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i8* @getenv_nonull(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i8* @getenv_nonull(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i8* @getenv_nonull(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i8* @getenv_nonull(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i8* @getenv_nonull(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%10 = tail call i8* @getenv_nonull(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%11 = tail call i8* @getenv_nonull(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%12 = tail call i8* @getenv_nonull(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%13 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i8* %10, i8* %11, i8* %12)
ret void
}